// 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 "GGSN_Tests.hh" namespace GGSN__Tests { /* Literal string constants */ const unsigned char bs_1_bits[] = { 0 }, bs_4_bits[] = { 8 }, bs_2_bits[] = { 2 }, bs_0_bits[] = { 1 }, bs_3_bits[] = { 3 }; extern const BITSTRING bs_1(1, bs_1_bits), bs_4(4, bs_4_bits), bs_2(2, bs_2_bits), bs_0(1, bs_0_bits), bs_3(8, bs_3_bits); const unsigned char hs_0_nibbles[] = { 98, 2 }, hs_2_nibbles[] = { 98, 66, 2 }, hs_1_nibbles[] = { 36, 15 }; extern const HEXSTRING hs_0(3, hs_0_nibbles), hs_2(5, hs_2_nibbles), hs_1(3, hs_1_nibbles); const unsigned char os_6_octets[] = { 0 }, os_9_octets[] = { 0, 0 }, os_16_octets[] = { 0, 0, 0, 0 }, os_14_octets[] = { 0, 0, 0, 4 }, os_7_octets[] = { 0, 1 }, os_8_octets[] = { 0, 2 }, os_21_octets[] = { 0, 3 }, os_22_octets[] = { 0, 13 }, os_0_octets[] = { 1 }, os_11_octets[] = { 2 }, os_23_octets[] = { 2, 0, 0, 10, 129, 6 }, os_24_octets[] = { 2, 0, 0, 10, 131, 6 }, os_10_octets[] = { 3 }, os_2_octets[] = { 5, 105, 110, 101, 116, 54 }, os_3_octets[] = { 6, 105, 110, 101, 116, 52, 54 }, os_1_octets[] = { 8, 105, 110, 116, 101, 114, 110, 101, 116 }, os_4_octets[] = { 17 }, os_12_octets[] = { 128 }, os_20_octets[] = { 128, 33 }, os_13_octets[] = { 129 }, os_5_octets[] = { 152 }, os_15_octets[] = { 192 }, os_17_octets[] = { 192, 33 }, os_18_octets[] = { 192, 35 }, os_19_octets[] = { 194, 35 }, os_25_octets[] = { 220 }; extern const OCTETSTRING os_6(1, os_6_octets), os_9(2, os_9_octets), os_16(4, os_16_octets), os_14(4, os_14_octets), os_7(2, os_7_octets), os_8(2, os_8_octets), os_21(2, os_21_octets), os_22(2, os_22_octets), os_0(1, os_0_octets), os_11(1, os_11_octets), os_23(6, os_23_octets), os_24(6, os_24_octets), os_10(1, os_10_octets), os_2(6, os_2_octets), os_3(7, os_3_octets), os_1(9, os_1_octets), os_4(1, os_4_octets), os_12(1, os_12_octets), os_20(2, os_20_octets), os_13(1, os_13_octets), os_5(1, os_5_octets), os_15(1, os_15_octets), os_17(2, os_17_octets), os_18(2, os_18_octets), os_19(2, os_19_octets), os_25(1, os_25_octets); extern const CHARSTRING cs_20(8, "() start"), cs_41(4, "1234"), cs_1(9, "127.0.0.6"), cs_0(11, "127.23.42.1"), cs_42(12, "192.168.10.2"), cs_2(13, "192.168.100.1"), cs_5(20, "2001:4860:4860::8844"), cs_4(20, "2001:4860:4860::8888"), cs_3(7, "8.8.8.8"), cs_28(49, "Cause not expected when requesting a non v4v6 EUA"), cs_29(52, "Cause not expected when requesting+receiving EUAv4v6"), cs_36(9, "Connected"), cs_24(53, "CreatePDPContextResp: cause expectancies didn't match"), cs_37(52, "DeletePDPContextReq: cause expectancies didn't match"), cs_38(64, "DeletePDPContextReq: tearDownIndicator expectancies didn't match"), cs_39(53, "DeletePDPContextResp: cause expectancies didn't match"), cs_30(47, "EUA received on createPDPContextResponse cause="), cs_25(31, "EUAv4 expectancies didn't match"), cs_27(33, "EUAv4v6 expectancies didn't match"), cs_26(31, "EUAv6 expectancies didn't match"), cs_21(15, "GGSN_Tests.ttcn"), cs_22(43, "GTP Echo Req rceived but not enabled in VTY"), cs_31(41, "IPv4 DNS Container requested, but missing"), cs_32(41, "IPv6 DNS Container requested, but missing"), cs_46(18, "Rx Unexpected GTPC"), cs_47(18, "Rx Unexpected GTPU"), cs_45(18, "Rx Unexpected TEIC"), cs_48(65, "TImeout waiting for Gy UPDATE triggered by Volume-Quota-Threshold"), cs_44(24, "Timeout waiting for ping"), cs_40(58, "Unexpected request to submit icmpv6 rs in IPv4 PDP context"), cs_33(53, "UpdatePDPContextResp: cause expectancies didn't match"), cs_13(10, "apn inet46"), cs_12(9, "apn inet6"), cs_8(12, "apn internet"), cs_15(14, "echo-interval "), cs_6(6, "enable"), cs_14(3, "end"), cs_11(4, "exit"), cs_43(27, "fde4:8dba:82e1:2000:1:2:3:4"), cs_9(25, "g-pdu tx-sequence-numbers"), cs_7(10, "ggsn ggsn0"), cs_18(11, "localdomain"), cs_16(16, "no echo-interval"), cs_10(28, "no g-pdu tx-sequence-numbers"), cs_19(15, "ocs.localdomain"), cs_35(4, "omit"), cs_17(16, "pcrf.localdomain"), cs_23(26, "pingpong T_default timeout"), cs_34(15, "smf.localdomain"); const unsigned char module_checksum[] = { 0x7f, 0xc9, 0x2b, 0x0d, 0xb7, 0xf9, 0xd6, 0xef, 0x21, 0xff, 0x1c, 0x48, 0x57, 0xc1, 0x87, 0xd5 }; /* Global variable definitions */ INTEGER const_GTP0__PORT; const INTEGER& GTP0__PORT = const_GTP0__PORT; INTEGER const_GTP1C__PORT; const INTEGER& GTP1C__PORT = const_GTP1C__PORT; INTEGER const_GTP1U__PORT; const INTEGER& GTP1U__PORT = const_GTP1U__PORT; INTEGER const_PCRF__PORT; const INTEGER& PCRF__PORT = const_PCRF__PORT; INTEGER const_OCS__PORT; const INTEGER& OCS__PORT = const_OCS__PORT; // No XER for GGSN__Impl const TTCN_Typedescriptor_t GGSN__Impl_descr_ = { "@GGSN_Tests.GGSN_Impl", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for GGSN__Conf const TTCN_Typedescriptor_t GGSN__Conf_descr_ = { "@GGSN_Tests.GGSN_Conf", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; CHARSTRING modulepar_m__bind__ip__gtpc; const CHARSTRING& m__bind__ip__gtpc = modulepar_m__bind__ip__gtpc; CHARSTRING modulepar_m__bind__ip__gtpu; const CHARSTRING& m__bind__ip__gtpu = modulepar_m__bind__ip__gtpu; CHARSTRING modulepar_m__ggsn__ip__gtpc; const CHARSTRING& m__ggsn__ip__gtpc = modulepar_m__ggsn__ip__gtpc; CHARSTRING modulepar_m__ggsn__ip__gtpu; const CHARSTRING& m__ggsn__ip__gtpu = modulepar_m__ggsn__ip__gtpu; CHARSTRING modulepar_m__ggsn__ip4__dns1; const CHARSTRING& m__ggsn__ip4__dns1 = modulepar_m__ggsn__ip4__dns1; CHARSTRING modulepar_m__ggsn__ip4__dns2; const CHARSTRING& m__ggsn__ip4__dns2 = modulepar_m__ggsn__ip4__dns2; CHARSTRING modulepar_m__ggsn__ip6__dns1; const CHARSTRING& m__ggsn__ip6__dns1 = modulepar_m__ggsn__ip6__dns1; CHARSTRING modulepar_m__ggsn__ip6__dns2; const CHARSTRING& m__ggsn__ip6__dns2 = modulepar_m__ggsn__ip6__dns2; INTEGER modulepar_mp__t3__response; const INTEGER& mp__t3__response = modulepar_mp__t3__response; INTEGER modulepar_mp__n3__requests; const INTEGER& mp__n3__requests = modulepar_mp__n3__requests; GGSN__Impl modulepar_m__ggsn__impl; const GGSN__Impl& m__ggsn__impl = modulepar_m__ggsn__impl; GGSN__Conf modulepar_m__ggsn__conf; const GGSN__Conf& m__ggsn__conf = modulepar_m__ggsn__conf; const XERdescriptor_t PdpContext_imsi_xer_ = { {"imsi>\n", "imsi>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t PdpContext_imsi_descr_ = { "@GGSN_Tests.PdpContext.imsi", NULL, &HEXSTRING_raw_, NULL, &PdpContext_imsi_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t PdpContext_apn_xer_ = { {"apn>\n", "apn>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PdpContext_apn_oer_ext_arr_[0] = {}; const int PdpContext_apn_oer_p_[0] = {}; const TTCN_OERdescriptor_t PdpContext_apn_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PdpContext_apn_oer_ext_arr_, 0, PdpContext_apn_oer_p_}; const TTCN_Typedescriptor_t PdpContext_apn_descr_ = { "@GGSN_Tests.PdpContext.apn", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &PdpContext_apn_xer_, &OCTETSTRING_json_, &PdpContext_apn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_eua_default_coding("RAW"); const XERdescriptor_t PdpContext_nsapi_xer_ = { {"nsapi>\n", "nsapi>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t PdpContext_nsapi_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t PdpContext_nsapi_descr_ = { "@GGSN_Tests.PdpContext.nsapi", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &PdpContext_nsapi_xer_, &BITSTRING_json_, &PdpContext_nsapi_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_nsapi_default_coding("RAW"); const XERdescriptor_t PdpContext_teid_xer_ = { {"teid>\n", "teid>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PdpContext_teid_oer_ext_arr_[0] = {}; const int PdpContext_teid_oer_p_[0] = {}; const TTCN_OERdescriptor_t PdpContext_teid_oer_ = { -1, TRUE, 4, FALSE, 0, 0, PdpContext_teid_oer_ext_arr_, 0, PdpContext_teid_oer_p_}; const TTCN_Typedescriptor_t PdpContext_teid_descr_ = { "@GGSN_Tests.PdpContext.teid", &OCTETSTRING_ber_, &General__Types::OCT4_raw_, &OCTETSTRING_text_, &PdpContext_teid_xer_, &OCTETSTRING_json_, &PdpContext_teid_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_teid_default_coding("RAW"); const XERdescriptor_t PdpContext_teic_xer_ = { {"teic>\n", "teic>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PdpContext_teic_oer_ext_arr_[0] = {}; const int PdpContext_teic_oer_p_[0] = {}; const TTCN_OERdescriptor_t PdpContext_teic_oer_ = { -1, TRUE, 4, FALSE, 0, 0, PdpContext_teic_oer_ext_arr_, 0, PdpContext_teic_oer_p_}; const TTCN_Typedescriptor_t PdpContext_teic_descr_ = { "@GGSN_Tests.PdpContext.teic", &OCTETSTRING_ber_, &General__Types::OCT4_raw_, &OCTETSTRING_text_, &PdpContext_teic_xer_, &OCTETSTRING_json_, &PdpContext_teic_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_teic_default_coding("RAW"); const XERdescriptor_t PdpContext_teid__remote_xer_ = { {"teid_remote>\n", "teid_remote>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PdpContext_teid__remote_oer_ext_arr_[0] = {}; const int PdpContext_teid__remote_oer_p_[0] = {}; const TTCN_OERdescriptor_t PdpContext_teid__remote_oer_ = { -1, TRUE, 4, FALSE, 0, 0, PdpContext_teid__remote_oer_ext_arr_, 0, PdpContext_teid__remote_oer_p_}; const TTCN_Typedescriptor_t PdpContext_teid__remote_descr_ = { "@GGSN_Tests.PdpContext.teid_remote", &OCTETSTRING_ber_, &General__Types::OCT4_raw_, &OCTETSTRING_text_, &PdpContext_teid__remote_xer_, &OCTETSTRING_json_, &PdpContext_teid__remote_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_teid__remote_default_coding("RAW"); const XERdescriptor_t PdpContext_teic__remote_xer_ = { {"teic_remote>\n", "teic_remote>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PdpContext_teic__remote_oer_ext_arr_[0] = {}; const int PdpContext_teic__remote_oer_p_[0] = {}; const TTCN_OERdescriptor_t PdpContext_teic__remote_oer_ = { -1, TRUE, 4, FALSE, 0, 0, PdpContext_teic__remote_oer_ext_arr_, 0, PdpContext_teic__remote_oer_p_}; const TTCN_Typedescriptor_t PdpContext_teic__remote_descr_ = { "@GGSN_Tests.PdpContext.teic_remote", &OCTETSTRING_ber_, &General__Types::OCT4_raw_, &OCTETSTRING_text_, &PdpContext_teic__remote_xer_, &OCTETSTRING_json_, &PdpContext_teic__remote_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_teic__remote_default_coding("RAW"); // No XER for PdpContext const TTCN_Typedescriptor_t PdpContext_descr_ = { "@GGSN_Tests.PdpContext", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t PdpContext_msisdn_xer_ = { {"msisdn>\n", "msisdn>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PdpContext_msisdn_oer_ext_arr_[0] = {}; const int PdpContext_msisdn_oer_p_[0] = {}; const TTCN_OERdescriptor_t PdpContext_msisdn_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PdpContext_msisdn_oer_ext_arr_, 0, PdpContext_msisdn_oer_p_}; const TTCN_Typedescriptor_t PdpContext_msisdn_descr_ = { "@GGSN_Tests.PdpContext.msisdn", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &PdpContext_msisdn_xer_, &OCTETSTRING_json_, &PdpContext_msisdn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_pco__req_default_coding("RAW"); UNIVERSAL_CHARSTRING PdpContext_pco__neg_default_coding("RAW"); const XERdescriptor_t PdpContext_ip6__prefix_xer_ = { {"ip6_prefix>\n", "ip6_prefix>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PdpContext_ip6__prefix_oer_ext_arr_[0] = {}; const int PdpContext_ip6__prefix_oer_p_[0] = {}; const TTCN_OERdescriptor_t PdpContext_ip6__prefix_oer_ = { -1, TRUE, 16, FALSE, 0, 0, PdpContext_ip6__prefix_oer_ext_arr_, 0, PdpContext_ip6__prefix_oer_p_}; const TTCN_Typedescriptor_t PdpContext_ip6__prefix_descr_ = { "@GGSN_Tests.PdpContext.ip6_prefix", &OCTETSTRING_ber_, &General__Types::OCT16_raw_, &OCTETSTRING_text_, &PdpContext_ip6__prefix_xer_, &OCTETSTRING_json_, &PdpContext_ip6__prefix_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_ip6__prefix_default_coding("RAW"); const XERdescriptor_t PdpContext_ratType_xer_ = { {"ratType>\n", "ratType>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PdpContext_ratType_oer_ext_arr_[0] = {}; const int PdpContext_ratType_oer_p_[0] = {}; const TTCN_OERdescriptor_t PdpContext_ratType_oer_ = { -1, TRUE, 1, FALSE, 0, 0, PdpContext_ratType_oer_ext_arr_, 0, PdpContext_ratType_oer_p_}; const TTCN_Typedescriptor_t PdpContext_ratType_descr_ = { "@GGSN_Tests.PdpContext.ratType", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &PdpContext_ratType_xer_, &OCTETSTRING_json_, &PdpContext_ratType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_ratType_default_coding("RAW"); UNIVERSAL_CHARSTRING PdpContext_uli_default_coding("RAW"); const XERdescriptor_t PdpContext_charging__char_xer_ = { {"charging_char>\n", "charging_char>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PdpContext_charging__char_oer_ext_arr_[0] = {}; const int PdpContext_charging__char_oer_p_[0] = {}; const TTCN_OERdescriptor_t PdpContext_charging__char_oer_ = { -1, TRUE, 2, FALSE, 0, 0, PdpContext_charging__char_oer_ext_arr_, 0, PdpContext_charging__char_oer_p_}; const TTCN_Typedescriptor_t PdpContext_charging__char_descr_ = { "@GGSN_Tests.PdpContext.charging_char", &OCTETSTRING_ber_, &General__Types::OCT2_raw_, &OCTETSTRING_text_, &PdpContext_charging__char_xer_, &OCTETSTRING_json_, &PdpContext_charging__char_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_charging__char_default_coding("RAW"); const XERdescriptor_t PdpContext_imeisv_xer_ = { {"imeisv>\n", "imeisv>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PdpContext_imeisv_oer_ext_arr_[0] = {}; const int PdpContext_imeisv_oer_p_[0] = {}; const TTCN_OERdescriptor_t PdpContext_imeisv_oer_ = { -1, TRUE, 8, FALSE, 0, 0, PdpContext_imeisv_oer_ext_arr_, 0, PdpContext_imeisv_oer_p_}; const TTCN_Typedescriptor_t PdpContext_imeisv_descr_ = { "@GGSN_Tests.PdpContext.imeisv", &OCTETSTRING_ber_, &General__Types::OCT8_raw_, &OCTETSTRING_text_, &PdpContext_imeisv_xer_, &OCTETSTRING_json_, &PdpContext_imeisv_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PdpContext_imeisv_default_coding("RAW"); UNIVERSAL_CHARSTRING PdpContext_ms__tz_default_coding("RAW"); const TTCN_Typedescriptor_t& GT__CT_descr_ = COMPONENT_descr_; GTPv1C__CodecPort::GTPC__PT GT__CT_component_GTPC("GTPC"); GTPv1U__CodecPort::GTPU__PT GT__CT_component_GTPU("GTPU"); BOOLEAN GT__CT_component_g__initialized; OCTETSTRING GT__CT_component_g__restart__ctr; OCTETSTRING GT__CT_component_g__sgsn__ip__c; OCTETSTRING GT__CT_component_g__sgsn__ip__u; GTPv1C__CodecPort::Gtp1cPeer GT__CT_component_g__peer__c; GTPv1U__CodecPort::Gtp1uPeer GT__CT_component_g__peer__u; TIMER GT__CT_component_T__default("T_default", 3.0); INTEGER GT__CT_component_g__c__seq__nr; INTEGER GT__CT_component_g__d__seq__nr; TELNETasp__PortType::TELNETasp__PT GT__CT_component_GGSNVTY("GGSNVTY"); BOOLEAN GT__CT_component_use__gtpu__txseq; INTEGER GT__CT_component_g__use__echo__intval; DIAMETER__Emulation::DIAMETER__conn__parameters GT__CT_component_g__gx__pars; COMPONENT GT__CT_component_vc__Gx; DIAMETER__Emulation::DIAMETER__PT GT__CT_component_Gx__UNIT("Gx_UNIT"); DIAMETER__Emulation::DIAMETEREM__PROC__PT GT__CT_component_Gx__PROC("Gx_PROC"); DIAMETER__Emulation::DIAMETER__conn__parameters GT__CT_component_g__gy__pars; COMPONENT GT__CT_component_vc__Gy; DIAMETER__Emulation::DIAMETER__PT GT__CT_component_Gy__UNIT("Gy_UNIT"); DIAMETER__Emulation::DIAMETEREM__PROC__PT GT__CT_component_Gy__PROC("Gy_PROC"); INTEGER GT__CT_component_g__gy__validity__time; INTEGER GT__CT_component_g__gy__volume__quota; INTEGER GT__CT_component_g__gy__volume__threshold; DIAMETER__Types::PDU__DIAMETER GT__CT_component_g__rx__gy; OCTETSTRING const_c__ApnInternet; const OCTETSTRING& c__ApnInternet = const_c__ApnInternet; OCTETSTRING const_c__ApnInet6; const OCTETSTRING& c__ApnInet6 = const_c__ApnInet6; OCTETSTRING const_c__ApnInet46; const OCTETSTRING& c__ApnInet46 = const_c__ApnInet46; OCTETSTRING const_t__DefinePDP_ratType_defval; const OCTETSTRING& t__DefinePDP_ratType_defval = const_t__DefinePDP_ratType_defval; OCTETSTRING_template template_f__handle__create__req_exp__cause_defval; const OCTETSTRING_template& f__handle__create__req_exp__cause_defval = template_f__handle__create__req_exp__cause_defval; OCTETSTRING const_f__handle__update__req_exp__cause_defval; const OCTETSTRING& f__handle__update__req_exp__cause_defval = const_f__handle__update__req_exp__cause_defval; OCTETSTRING_template template_f__pdp__ctx__act_exp__cause_defval; const OCTETSTRING_template& f__pdp__ctx__act_exp__cause_defval = template_f__pdp__ctx__act_exp__cause_defval; OCTETSTRING_template template_f__pdp__ctx__exp__del__req_expect__cause_defval; const OCTETSTRING_template& f__pdp__ctx__exp__del__req_expect__cause_defval = template_f__pdp__ctx__exp__del__req_expect__cause_defval; BOOLEAN const_f__pdp__ctx__exp__del__req_expect__teardown_defval; const BOOLEAN& f__pdp__ctx__exp__del__req_expect__teardown_defval = const_f__pdp__ctx__exp__del__req_expect__teardown_defval; OCTETSTRING const_f__pdp__ctx__del_expect__causevalue_defval; const OCTETSTRING& f__pdp__ctx__del_expect__causevalue_defval = const_f__pdp__ctx__del_expect__causevalue_defval; BOOLEAN const_f__pdp__ctx__del_expect__diameter_defval; const BOOLEAN& f__pdp__ctx__del_expect__diameter_defval = const_f__pdp__ctx__del_expect__diameter_defval; OCTETSTRING const_f__pdp__ctx__update_exp__cause_defval; const OCTETSTRING& f__pdp__ctx__update_exp__cause_defval = const_f__pdp__ctx__update_exp__cause_defval; OCTETSTRING_template template_f__pdp__ctx__update_new__teid_defval; const OCTETSTRING_template& f__pdp__ctx__update_new__teid_defval = template_f__pdp__ctx__update_new__teid_defval; OCTETSTRING_template template_f__pdp__ctx__update_new__teic_defval; const OCTETSTRING_template& f__pdp__ctx__update_new__teic_defval = template_f__pdp__ctx__update_new__teic_defval; General__Types::OCT2List const_protocol__ids__nodupes; const General__Types::OCT2List& protocol__ids__nodupes = const_protocol__ids__nodupes; // No XER for TEIClist const TTCN_Typedescriptor_t TEIClist_descr_ = { "@GGSN_Tests.TEIClist", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &General__Types::OCT4_descr_, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t TEIClist_0_xer_ = { {"OCT4>\n", "OCT4>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int TEIClist_0_oer_ext_arr_[0] = {}; const int TEIClist_0_oer_p_[0] = {}; const TTCN_OERdescriptor_t TEIClist_0_oer_ = { -1, TRUE, 4, FALSE, 0, 0, TEIClist_0_oer_ext_arr_, 0, TEIClist_0_oer_p_}; const TTCN_Typedescriptor_t TEIClist_0_descr_ = { "@GGSN_Tests.TEIClist.", &OCTETSTRING_ber_, &General__Types::OCT4_raw_, &OCTETSTRING_text_, &TEIClist_0_xer_, &OCTETSTRING_json_, &TEIClist_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING TEIClist_0_default_coding("RAW"); TTCN_Module module_object("GGSN_Tests", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, set_module_param, NULL, log_module_param, init_comp_type, init_system_port, start_ptc_function, module_control_part); 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 */ GGSN__Impl::GGSN__Impl() { enum_value = UNBOUND_VALUE; } GGSN__Impl::GGSN__Impl(int other_value) { if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @GGSN_Tests.GGSN_Impl with invalid numeric value %d.", other_value); enum_value = (enum_type)other_value; } GGSN__Impl::GGSN__Impl(enum_type other_value) { enum_value = other_value; } GGSN__Impl::GGSN__Impl(const GGSN__Impl& other_value) : Base_Type() { if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); enum_value = other_value.enum_value; } GGSN__Impl& GGSN__Impl::operator=(int other_value) { if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @GGSN_Tests.GGSN_Impl.", other_value); enum_value = (enum_type)other_value; return *this; } GGSN__Impl& GGSN__Impl::operator=(enum_type other_value) { enum_value = other_value; return *this; } GGSN__Impl& GGSN__Impl::operator=(const GGSN__Impl& other_value) { if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); enum_value = other_value.enum_value; return *this; } boolean GGSN__Impl::operator==(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); return enum_value == other_value; } boolean GGSN__Impl::operator==(const GGSN__Impl& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); return enum_value == other_value.enum_value; } boolean GGSN__Impl::operator<(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); return enum_value < other_value; } boolean GGSN__Impl::operator<(const GGSN__Impl& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); return enum_value < other_value.enum_value; } boolean GGSN__Impl::operator>(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); return enum_value > other_value; } boolean GGSN__Impl::operator>(const GGSN__Impl& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); return enum_value > other_value.enum_value; } const char *GGSN__Impl::enum_to_str(enum_type enum_par) { switch (enum_par) { case GGSN__IMPL__OSMOCOM: return "GGSN_IMPL_OSMOCOM"; case GGSN__IMPL__OPEN5GS: return "GGSN_IMPL_OPEN5GS"; default: return ""; } } GGSN__Impl::enum_type GGSN__Impl::str_to_enum(const char *str_par) { if (!strcmp(str_par, "GGSN_IMPL_OSMOCOM")) return GGSN__IMPL__OSMOCOM; else if (!strcmp(str_par, "GGSN_IMPL_OPEN5GS")) return GGSN__IMPL__OPEN5GS; else return UNKNOWN_VALUE; } boolean GGSN__Impl::is_valid_enum(int int_par) { switch (int_par) { case 0: case 1: return TRUE; default: return FALSE; } } int GGSN__Impl::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 @GGSN_Tests.GGSN_Impl.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par; } int GGSN__Impl::enum2int(const GGSN__Impl& 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 @GGSN_Tests.GGSN_Impl.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par.enum_value; } void GGSN__Impl::int2enum(int int_val) { if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @GGSN_Tests.GGSN_Impl.", int_val); enum_value = (enum_type)int_val; } GGSN__Impl::operator GGSN__Impl::enum_type() const { if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @GGSN_Tests.GGSN_Impl."); return enum_value; } void GGSN__Impl::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 GGSN__Impl::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", "@GGSN_Tests.GGSN_Impl"); enum_value = str_to_enum(param.get_enumerated()); if (!is_valid_enum(enum_value)) { param.error("Invalid enumerated value for type @GGSN_Tests.GGSN_Impl."); } } void GGSN__Impl::encode_text(Text_Buf& text_buf) const { if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); text_buf.push_int(enum_value); } void GGSN__Impl::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 @GGSN_Tests.GGSN_Impl.", enum_value); } void GGSN__Impl_template::copy_template(const GGSN__Impl_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 GGSN__Impl_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 GGSN__Impl_template(*other_value.implication_.precondition); implication_.implied_template = new GGSN__Impl_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 @GGSN_Tests.GGSN_Impl."); } } GGSN__Impl_template::GGSN__Impl_template() { } GGSN__Impl_template::GGSN__Impl_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } GGSN__Impl_template::GGSN__Impl_template(int other_value) : Base_Template(SPECIFIC_VALUE) { if (!GGSN__Impl::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @GGSN_Tests.GGSN_Impl with unknown numeric value %d.", other_value); single_value = (GGSN__Impl::enum_type)other_value; } GGSN__Impl_template::GGSN__Impl_template(GGSN__Impl::enum_type other_value) : Base_Template(SPECIFIC_VALUE) { single_value = other_value; } GGSN__Impl_template::GGSN__Impl_template(const GGSN__Impl& other_value) : Base_Template(SPECIFIC_VALUE) { if (other_value.enum_value == GGSN__Impl::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @GGSN_Tests.GGSN_Impl."); single_value = other_value.enum_value; } GGSN__Impl_template::GGSN__Impl_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (GGSN__Impl::enum_type)(const GGSN__Impl&)other_value; break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of enumerated type @GGSN_Tests.GGSN_Impl from an unbound optional field."); } } GGSN__Impl_template::GGSN__Impl_template(GGSN__Impl_template* p_precondition, GGSN__Impl_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } GGSN__Impl_template::GGSN__Impl_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; } GGSN__Impl_template::GGSN__Impl_template(const GGSN__Impl_template& other_value) : Base_Template() { copy_template(other_value); } GGSN__Impl_template::~GGSN__Impl_template() { clean_up(); } boolean GGSN__Impl_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; return TRUE; } boolean GGSN__Impl_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value != GGSN__Impl::UNBOUND_VALUE; } void GGSN__Impl_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; } GGSN__Impl_template& GGSN__Impl_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } GGSN__Impl_template& GGSN__Impl_template::operator=(int other_value) { if (!GGSN__Impl::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @GGSN_Tests.GGSN_Impl.", other_value); clean_up(); set_selection(SPECIFIC_VALUE); single_value = (GGSN__Impl::enum_type)other_value; return *this; } GGSN__Impl_template& GGSN__Impl_template::operator=(GGSN__Impl::enum_type other_value) { clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value; return *this; } GGSN__Impl_template& GGSN__Impl_template::operator=(const GGSN__Impl& other_value) { if (other_value.enum_value == GGSN__Impl::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @GGSN_Tests.GGSN_Impl to a template."); clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value.enum_value; return *this; } GGSN__Impl_template& GGSN__Impl_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (GGSN__Impl::enum_type)(const GGSN__Impl&)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 @GGSN_Tests.GGSN_Impl."); } return *this; } GGSN__Impl_template& GGSN__Impl_template::operator=(const GGSN__Impl_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean GGSN__Impl_template::match(GGSN__Impl::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 @GGSN_Tests.GGSN_Impl."); } return FALSE; } boolean GGSN__Impl_template::match(const GGSN__Impl& other_value, boolean) const { if (other_value.enum_value == GGSN__Impl::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @GGSN_Tests.GGSN_Impl with an unbound value."); return match(other_value.enum_value); } GGSN__Impl::enum_type GGSN__Impl_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 @GGSN_Tests.GGSN_Impl."); return single_value; } void GGSN__Impl_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 @GGSN_Tests.GGSN_Impl."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new GGSN__Impl_template[list_length]; } GGSN__Impl_template& GGSN__Impl_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 @GGSN_Tests.GGSN_Impl."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @GGSN_Tests.GGSN_Impl."); return value_list.list_value[list_index]; } void GGSN__Impl_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_enum(GGSN__Impl::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 GGSN__Impl_template::log_match(const GGSN__Impl& 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 GGSN__Impl_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 @GGSN_Tests.GGSN_Impl."); } } void GGSN__Impl_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = (GGSN__Impl::enum_type)text_buf.pull_int().get_val(); if (!GGSN__Impl::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @GGSN_Tests.GGSN_Impl.", 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 GGSN__Impl_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 @GGSN_Tests.GGSN_Impl."); } } boolean GGSN__Impl_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean GGSN__Impl_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: { GGSN__Impl_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: { GGSN__Impl::enum_type enum_val = GGSN__Impl::str_to_enum(m_p->get_enumerated()); if (!GGSN__Impl::is_valid_enum(enum_val)) { param.error("Invalid enumerated value for type @GGSN_Tests.GGSN_Impl."); } *this = enum_val; } break; case Module_Param::MP_Implication_Template: { GGSN__Impl_template* precondition = new GGSN__Impl_template; precondition->set_param(*m_p->get_elem(0)); GGSN__Impl_template* implied_template = new GGSN__Impl_template; implied_template->set_param(*m_p->get_elem(1)); *this = GGSN__Impl_template(precondition, implied_template); } break; default: param.type_error("enumerated template", "@GGSN_Tests.GGSN_Impl"); } is_ifpresent = param.get_ifpresent(); } void GGSN__Impl_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 : "@GGSN_Tests.GGSN_Impl"); } GGSN__Conf::GGSN__Conf() { enum_value = UNBOUND_VALUE; } GGSN__Conf::GGSN__Conf(int other_value) { if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @GGSN_Tests.GGSN_Conf with invalid numeric value %d.", other_value); enum_value = (enum_type)other_value; } GGSN__Conf::GGSN__Conf(enum_type other_value) { enum_value = other_value; } GGSN__Conf::GGSN__Conf(const GGSN__Conf& other_value) : Base_Type() { if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); enum_value = other_value.enum_value; } GGSN__Conf& GGSN__Conf::operator=(int other_value) { if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @GGSN_Tests.GGSN_Conf.", other_value); enum_value = (enum_type)other_value; return *this; } GGSN__Conf& GGSN__Conf::operator=(enum_type other_value) { enum_value = other_value; return *this; } GGSN__Conf& GGSN__Conf::operator=(const GGSN__Conf& other_value) { if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); enum_value = other_value.enum_value; return *this; } boolean GGSN__Conf::operator==(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); return enum_value == other_value; } boolean GGSN__Conf::operator==(const GGSN__Conf& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); return enum_value == other_value.enum_value; } boolean GGSN__Conf::operator<(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); return enum_value < other_value; } boolean GGSN__Conf::operator<(const GGSN__Conf& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); return enum_value < other_value.enum_value; } boolean GGSN__Conf::operator>(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); return enum_value > other_value; } boolean GGSN__Conf::operator>(const GGSN__Conf& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); return enum_value > other_value.enum_value; } const char *GGSN__Conf::enum_to_str(enum_type enum_par) { switch (enum_par) { case GGSN__CONF__ALL: return "GGSN_CONF_ALL"; case GGSN__CONF__V4__ONLY: return "GGSN_CONF_V4_ONLY"; case GGSN__CONF__V6__ONLY: return "GGSN_CONF_V6_ONLY"; case GGSN__CONF__V4V6__ONLY: return "GGSN_CONF_V4V6_ONLY"; default: return ""; } } GGSN__Conf::enum_type GGSN__Conf::str_to_enum(const char *str_par) { if (!strcmp(str_par, "GGSN_CONF_ALL")) return GGSN__CONF__ALL; else if (!strcmp(str_par, "GGSN_CONF_V4_ONLY")) return GGSN__CONF__V4__ONLY; else if (!strcmp(str_par, "GGSN_CONF_V6_ONLY")) return GGSN__CONF__V6__ONLY; else if (!strcmp(str_par, "GGSN_CONF_V4V6_ONLY")) return GGSN__CONF__V4V6__ONLY; else return UNKNOWN_VALUE; } boolean GGSN__Conf::is_valid_enum(int int_par) { switch (int_par) { case 0: case 1: case 2: case 3: return TRUE; default: return FALSE; } } int GGSN__Conf::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 @GGSN_Tests.GGSN_Conf.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par; } int GGSN__Conf::enum2int(const GGSN__Conf& 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 @GGSN_Tests.GGSN_Conf.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par.enum_value; } void GGSN__Conf::int2enum(int int_val) { if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @GGSN_Tests.GGSN_Conf.", int_val); enum_value = (enum_type)int_val; } GGSN__Conf::operator GGSN__Conf::enum_type() const { if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @GGSN_Tests.GGSN_Conf."); return enum_value; } void GGSN__Conf::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 GGSN__Conf::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", "@GGSN_Tests.GGSN_Conf"); enum_value = str_to_enum(param.get_enumerated()); if (!is_valid_enum(enum_value)) { param.error("Invalid enumerated value for type @GGSN_Tests.GGSN_Conf."); } } void GGSN__Conf::encode_text(Text_Buf& text_buf) const { if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); text_buf.push_int(enum_value); } void GGSN__Conf::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 @GGSN_Tests.GGSN_Conf.", enum_value); } void GGSN__Conf_template::copy_template(const GGSN__Conf_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 GGSN__Conf_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 GGSN__Conf_template(*other_value.implication_.precondition); implication_.implied_template = new GGSN__Conf_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 @GGSN_Tests.GGSN_Conf."); } } GGSN__Conf_template::GGSN__Conf_template() { } GGSN__Conf_template::GGSN__Conf_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } GGSN__Conf_template::GGSN__Conf_template(int other_value) : Base_Template(SPECIFIC_VALUE) { if (!GGSN__Conf::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @GGSN_Tests.GGSN_Conf with unknown numeric value %d.", other_value); single_value = (GGSN__Conf::enum_type)other_value; } GGSN__Conf_template::GGSN__Conf_template(GGSN__Conf::enum_type other_value) : Base_Template(SPECIFIC_VALUE) { single_value = other_value; } GGSN__Conf_template::GGSN__Conf_template(const GGSN__Conf& other_value) : Base_Template(SPECIFIC_VALUE) { if (other_value.enum_value == GGSN__Conf::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @GGSN_Tests.GGSN_Conf."); single_value = other_value.enum_value; } GGSN__Conf_template::GGSN__Conf_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (GGSN__Conf::enum_type)(const GGSN__Conf&)other_value; break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of enumerated type @GGSN_Tests.GGSN_Conf from an unbound optional field."); } } GGSN__Conf_template::GGSN__Conf_template(GGSN__Conf_template* p_precondition, GGSN__Conf_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } GGSN__Conf_template::GGSN__Conf_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; } GGSN__Conf_template::GGSN__Conf_template(const GGSN__Conf_template& other_value) : Base_Template() { copy_template(other_value); } GGSN__Conf_template::~GGSN__Conf_template() { clean_up(); } boolean GGSN__Conf_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; return TRUE; } boolean GGSN__Conf_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value != GGSN__Conf::UNBOUND_VALUE; } void GGSN__Conf_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; } GGSN__Conf_template& GGSN__Conf_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } GGSN__Conf_template& GGSN__Conf_template::operator=(int other_value) { if (!GGSN__Conf::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @GGSN_Tests.GGSN_Conf.", other_value); clean_up(); set_selection(SPECIFIC_VALUE); single_value = (GGSN__Conf::enum_type)other_value; return *this; } GGSN__Conf_template& GGSN__Conf_template::operator=(GGSN__Conf::enum_type other_value) { clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value; return *this; } GGSN__Conf_template& GGSN__Conf_template::operator=(const GGSN__Conf& other_value) { if (other_value.enum_value == GGSN__Conf::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @GGSN_Tests.GGSN_Conf to a template."); clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value.enum_value; return *this; } GGSN__Conf_template& GGSN__Conf_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (GGSN__Conf::enum_type)(const GGSN__Conf&)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 @GGSN_Tests.GGSN_Conf."); } return *this; } GGSN__Conf_template& GGSN__Conf_template::operator=(const GGSN__Conf_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean GGSN__Conf_template::match(GGSN__Conf::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 @GGSN_Tests.GGSN_Conf."); } return FALSE; } boolean GGSN__Conf_template::match(const GGSN__Conf& other_value, boolean) const { if (other_value.enum_value == GGSN__Conf::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @GGSN_Tests.GGSN_Conf with an unbound value."); return match(other_value.enum_value); } GGSN__Conf::enum_type GGSN__Conf_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 @GGSN_Tests.GGSN_Conf."); return single_value; } void GGSN__Conf_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 @GGSN_Tests.GGSN_Conf."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new GGSN__Conf_template[list_length]; } GGSN__Conf_template& GGSN__Conf_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 @GGSN_Tests.GGSN_Conf."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @GGSN_Tests.GGSN_Conf."); return value_list.list_value[list_index]; } void GGSN__Conf_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_enum(GGSN__Conf::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 GGSN__Conf_template::log_match(const GGSN__Conf& 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 GGSN__Conf_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 @GGSN_Tests.GGSN_Conf."); } } void GGSN__Conf_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = (GGSN__Conf::enum_type)text_buf.pull_int().get_val(); if (!GGSN__Conf::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @GGSN_Tests.GGSN_Conf.", 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 GGSN__Conf_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 @GGSN_Tests.GGSN_Conf."); } } boolean GGSN__Conf_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean GGSN__Conf_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: { GGSN__Conf_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: { GGSN__Conf::enum_type enum_val = GGSN__Conf::str_to_enum(m_p->get_enumerated()); if (!GGSN__Conf::is_valid_enum(enum_val)) { param.error("Invalid enumerated value for type @GGSN_Tests.GGSN_Conf."); } *this = enum_val; } break; case Module_Param::MP_Implication_Template: { GGSN__Conf_template* precondition = new GGSN__Conf_template; precondition->set_param(*m_p->get_elem(0)); GGSN__Conf_template* implied_template = new GGSN__Conf_template; implied_template->set_param(*m_p->get_elem(1)); *this = GGSN__Conf_template(precondition, implied_template); } break; default: param.type_error("enumerated template", "@GGSN_Tests.GGSN_Conf"); } is_ifpresent = param.get_ifpresent(); } void GGSN__Conf_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 : "@GGSN_Tests.GGSN_Conf"); } PdpContext::PdpContext() { } PdpContext::PdpContext(const HEXSTRING& par_imsi, const OPTIONAL< OCTETSTRING >& par_msisdn, const OCTETSTRING& par_apn, const OPTIONAL< GTPC__Types::ProtConfigOptions >& par_pco__req, const OPTIONAL< GTPC__Types::ProtConfigOptions >& par_pco__neg, const GTPC__Types::EndUserAddress& par_eua, const OPTIONAL< OCTETSTRING >& par_ip6__prefix, const BITSTRING& par_nsapi, const OCTETSTRING& par_teid, const OCTETSTRING& par_teic, const OCTETSTRING& par_teid__remote, const OCTETSTRING& par_teic__remote, const OPTIONAL< OCTETSTRING >& par_ratType, const OPTIONAL< GTPC__Types::UserLocationInformation >& par_uli, const OPTIONAL< OCTETSTRING >& par_charging__char, const OPTIONAL< OCTETSTRING >& par_imeisv, const OPTIONAL< GTPC__Types::MS__TimeZone >& par_ms__tz) : field_imsi(par_imsi), field_msisdn(par_msisdn), field_apn(par_apn), field_pco__req(par_pco__req), field_pco__neg(par_pco__neg), field_eua(par_eua), field_ip6__prefix(par_ip6__prefix), field_nsapi(par_nsapi), field_teid(par_teid), field_teic(par_teic), field_teid__remote(par_teid__remote), field_teic__remote(par_teic__remote), field_ratType(par_ratType), field_uli(par_uli), field_charging__char(par_charging__char), field_imeisv(par_imeisv), field_ms__tz(par_ms__tz) { } PdpContext::PdpContext(const PdpContext& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @GGSN_Tests.PdpContext."); if (other_value.imsi().is_bound()) field_imsi = other_value.imsi(); else field_imsi.clean_up(); if (other_value.msisdn().is_bound()) field_msisdn = other_value.msisdn(); else field_msisdn.clean_up(); if (other_value.apn().is_bound()) field_apn = other_value.apn(); else field_apn.clean_up(); if (other_value.pco__req().is_bound()) field_pco__req = other_value.pco__req(); else field_pco__req.clean_up(); if (other_value.pco__neg().is_bound()) field_pco__neg = other_value.pco__neg(); else field_pco__neg.clean_up(); if (other_value.eua().is_bound()) field_eua = other_value.eua(); else field_eua.clean_up(); if (other_value.ip6__prefix().is_bound()) field_ip6__prefix = other_value.ip6__prefix(); else field_ip6__prefix.clean_up(); if (other_value.nsapi().is_bound()) field_nsapi = other_value.nsapi(); else field_nsapi.clean_up(); if (other_value.teid().is_bound()) field_teid = other_value.teid(); else field_teid.clean_up(); if (other_value.teic().is_bound()) field_teic = other_value.teic(); else field_teic.clean_up(); if (other_value.teid__remote().is_bound()) field_teid__remote = other_value.teid__remote(); else field_teid__remote.clean_up(); if (other_value.teic__remote().is_bound()) field_teic__remote = other_value.teic__remote(); else field_teic__remote.clean_up(); if (other_value.ratType().is_bound()) field_ratType = other_value.ratType(); else field_ratType.clean_up(); if (other_value.uli().is_bound()) field_uli = other_value.uli(); else field_uli.clean_up(); if (other_value.charging__char().is_bound()) field_charging__char = other_value.charging__char(); else field_charging__char.clean_up(); if (other_value.imeisv().is_bound()) field_imeisv = other_value.imeisv(); else field_imeisv.clean_up(); if (other_value.ms__tz().is_bound()) field_ms__tz = other_value.ms__tz(); else field_ms__tz.clean_up(); } void PdpContext::clean_up() { field_imsi.clean_up(); field_msisdn.clean_up(); field_apn.clean_up(); field_pco__req.clean_up(); field_pco__neg.clean_up(); field_eua.clean_up(); field_ip6__prefix.clean_up(); field_nsapi.clean_up(); field_teid.clean_up(); field_teic.clean_up(); field_teid__remote.clean_up(); field_teic__remote.clean_up(); field_ratType.clean_up(); field_uli.clean_up(); field_charging__char.clean_up(); field_imeisv.clean_up(); field_ms__tz.clean_up(); } const TTCN_Typedescriptor_t* PdpContext::get_descriptor() const { return &PdpContext_descr_; } PdpContext& PdpContext::operator=(const PdpContext& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @GGSN_Tests.PdpContext."); if (other_value.imsi().is_bound()) field_imsi = other_value.imsi(); else field_imsi.clean_up(); if (other_value.msisdn().is_bound()) field_msisdn = other_value.msisdn(); else field_msisdn.clean_up(); if (other_value.apn().is_bound()) field_apn = other_value.apn(); else field_apn.clean_up(); if (other_value.pco__req().is_bound()) field_pco__req = other_value.pco__req(); else field_pco__req.clean_up(); if (other_value.pco__neg().is_bound()) field_pco__neg = other_value.pco__neg(); else field_pco__neg.clean_up(); if (other_value.eua().is_bound()) field_eua = other_value.eua(); else field_eua.clean_up(); if (other_value.ip6__prefix().is_bound()) field_ip6__prefix = other_value.ip6__prefix(); else field_ip6__prefix.clean_up(); if (other_value.nsapi().is_bound()) field_nsapi = other_value.nsapi(); else field_nsapi.clean_up(); if (other_value.teid().is_bound()) field_teid = other_value.teid(); else field_teid.clean_up(); if (other_value.teic().is_bound()) field_teic = other_value.teic(); else field_teic.clean_up(); if (other_value.teid__remote().is_bound()) field_teid__remote = other_value.teid__remote(); else field_teid__remote.clean_up(); if (other_value.teic__remote().is_bound()) field_teic__remote = other_value.teic__remote(); else field_teic__remote.clean_up(); if (other_value.ratType().is_bound()) field_ratType = other_value.ratType(); else field_ratType.clean_up(); if (other_value.uli().is_bound()) field_uli = other_value.uli(); else field_uli.clean_up(); if (other_value.charging__char().is_bound()) field_charging__char = other_value.charging__char(); else field_charging__char.clean_up(); if (other_value.imeisv().is_bound()) field_imeisv = other_value.imeisv(); else field_imeisv.clean_up(); if (other_value.ms__tz().is_bound()) field_ms__tz = other_value.ms__tz(); else field_ms__tz.clean_up(); } return *this; } boolean PdpContext::operator==(const PdpContext& other_value) const { return field_imsi==other_value.field_imsi && field_msisdn==other_value.field_msisdn && field_apn==other_value.field_apn && field_pco__req==other_value.field_pco__req && field_pco__neg==other_value.field_pco__neg && field_eua==other_value.field_eua && field_ip6__prefix==other_value.field_ip6__prefix && field_nsapi==other_value.field_nsapi && field_teid==other_value.field_teid && field_teic==other_value.field_teic && field_teid__remote==other_value.field_teid__remote && field_teic__remote==other_value.field_teic__remote && field_ratType==other_value.field_ratType && field_uli==other_value.field_uli && field_charging__char==other_value.field_charging__char && field_imeisv==other_value.field_imeisv && field_ms__tz==other_value.field_ms__tz; } boolean PdpContext::is_bound() const { return (field_imsi.is_bound()) || (OPTIONAL_OMIT == field_msisdn.get_selection() || field_msisdn.is_bound()) || (field_apn.is_bound()) || (OPTIONAL_OMIT == field_pco__req.get_selection() || field_pco__req.is_bound()) || (OPTIONAL_OMIT == field_pco__neg.get_selection() || field_pco__neg.is_bound()) || (field_eua.is_bound()) || (OPTIONAL_OMIT == field_ip6__prefix.get_selection() || field_ip6__prefix.is_bound()) || (field_nsapi.is_bound()) || (field_teid.is_bound()) || (field_teic.is_bound()) || (field_teid__remote.is_bound()) || (field_teic__remote.is_bound()) || (OPTIONAL_OMIT == field_ratType.get_selection() || field_ratType.is_bound()) || (OPTIONAL_OMIT == field_uli.get_selection() || field_uli.is_bound()) || (OPTIONAL_OMIT == field_charging__char.get_selection() || field_charging__char.is_bound()) || (OPTIONAL_OMIT == field_imeisv.get_selection() || field_imeisv.is_bound()) || (OPTIONAL_OMIT == field_ms__tz.get_selection() || field_ms__tz.is_bound()); } boolean PdpContext::is_value() const { return field_imsi.is_value() && (OPTIONAL_OMIT == field_msisdn.get_selection() || field_msisdn.is_value()) && field_apn.is_value() && (OPTIONAL_OMIT == field_pco__req.get_selection() || field_pco__req.is_value()) && (OPTIONAL_OMIT == field_pco__neg.get_selection() || field_pco__neg.is_value()) && field_eua.is_value() && (OPTIONAL_OMIT == field_ip6__prefix.get_selection() || field_ip6__prefix.is_value()) && field_nsapi.is_value() && field_teid.is_value() && field_teic.is_value() && field_teid__remote.is_value() && field_teic__remote.is_value() && (OPTIONAL_OMIT == field_ratType.get_selection() || field_ratType.is_value()) && (OPTIONAL_OMIT == field_uli.get_selection() || field_uli.is_value()) && (OPTIONAL_OMIT == field_charging__char.get_selection() || field_charging__char.is_value()) && (OPTIONAL_OMIT == field_imeisv.get_selection() || field_imeisv.is_value()) && (OPTIONAL_OMIT == field_ms__tz.get_selection() || field_ms__tz.is_value()); } int PdpContext::size_of() const { int ret_val = 8; if (field_msisdn.ispresent()) ret_val++; if (field_pco__req.ispresent()) ret_val++; if (field_pco__neg.ispresent()) ret_val++; if (field_ip6__prefix.ispresent()) ret_val++; if (field_ratType.ispresent()) ret_val++; if (field_uli.ispresent()) ret_val++; if (field_charging__char.ispresent()) ret_val++; if (field_imeisv.ispresent()) ret_val++; if (field_ms__tz.ispresent()) ret_val++; return ret_val; } void PdpContext::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ imsi := "); field_imsi.log(); TTCN_Logger::log_event_str(", msisdn := "); field_msisdn.log(); TTCN_Logger::log_event_str(", apn := "); field_apn.log(); TTCN_Logger::log_event_str(", pco_req := "); field_pco__req.log(); TTCN_Logger::log_event_str(", pco_neg := "); field_pco__neg.log(); TTCN_Logger::log_event_str(", eua := "); field_eua.log(); TTCN_Logger::log_event_str(", ip6_prefix := "); field_ip6__prefix.log(); TTCN_Logger::log_event_str(", nsapi := "); field_nsapi.log(); TTCN_Logger::log_event_str(", teid := "); field_teid.log(); TTCN_Logger::log_event_str(", teic := "); field_teic.log(); TTCN_Logger::log_event_str(", teid_remote := "); field_teid__remote.log(); TTCN_Logger::log_event_str(", teic_remote := "); field_teic__remote.log(); TTCN_Logger::log_event_str(", ratType := "); field_ratType.log(); TTCN_Logger::log_event_str(", uli := "); field_uli.log(); TTCN_Logger::log_event_str(", charging_char := "); field_charging__char.log(); TTCN_Logger::log_event_str(", imeisv := "); field_imeisv.log(); TTCN_Logger::log_event_str(", ms_tz := "); field_ms__tz.log(); TTCN_Logger::log_event_str(" }"); } void PdpContext::set_implicit_omit() { if (imsi().is_bound()) imsi().set_implicit_omit(); if (!msisdn().is_bound()) msisdn() = OMIT_VALUE; else msisdn().set_implicit_omit(); if (apn().is_bound()) apn().set_implicit_omit(); if (!pco__req().is_bound()) pco__req() = OMIT_VALUE; else pco__req().set_implicit_omit(); if (!pco__neg().is_bound()) pco__neg() = OMIT_VALUE; else pco__neg().set_implicit_omit(); if (eua().is_bound()) eua().set_implicit_omit(); if (!ip6__prefix().is_bound()) ip6__prefix() = OMIT_VALUE; else ip6__prefix().set_implicit_omit(); if (nsapi().is_bound()) nsapi().set_implicit_omit(); if (teid().is_bound()) teid().set_implicit_omit(); if (teic().is_bound()) teic().set_implicit_omit(); if (teid__remote().is_bound()) teid__remote().set_implicit_omit(); if (teic__remote().is_bound()) teic__remote().set_implicit_omit(); if (!ratType().is_bound()) ratType() = OMIT_VALUE; else ratType().set_implicit_omit(); if (!uli().is_bound()) uli() = OMIT_VALUE; else uli().set_implicit_omit(); if (!charging__char().is_bound()) charging__char() = OMIT_VALUE; else charging__char().set_implicit_omit(); if (!imeisv().is_bound()) imeisv() = OMIT_VALUE; else imeisv().set_implicit_omit(); if (!ms__tz().is_bound()) ms__tz() = OMIT_VALUE; else ms__tz().set_implicit_omit(); } void PdpContext::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "set value"); switch (param.get_type()) { case Module_Param::MP_Value_List: if (170 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) imsi().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) msisdn().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) apn().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pco__req().set_param(*param.get_elem(3)); if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) pco__neg().set_param(*param.get_elem(4)); if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) eua().set_param(*param.get_elem(5)); if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) ip6__prefix().set_param(*param.get_elem(6)); if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) nsapi().set_param(*param.get_elem(7)); if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) teid().set_param(*param.get_elem(8)); if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) teic().set_param(*param.get_elem(9)); if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) teid__remote().set_param(*param.get_elem(10)); if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) teic__remote().set_param(*param.get_elem(11)); if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) ratType().set_param(*param.get_elem(12)); if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) uli().set_param(*param.get_elem(13)); if (param.get_size()>14 && param.get_elem(14)->get_type()!=Module_Param::MP_NotUsed) charging__char().set_param(*param.get_elem(14)); if (param.get_size()>15 && param.get_elem(15)->get_type()!=Module_Param::MP_NotUsed) imeisv().set_param(*param.get_elem(15)); if (param.get_size()>16 && param.get_elem(16)->get_type()!=Module_Param::MP_NotUsed) ms__tz().set_param(*param.get_elem(16)); 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(), "imsi")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { imsi().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "msisdn")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { msisdn().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "apn")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { apn().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "pco_req")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { pco__req().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "pco_neg")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { pco__neg().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "eua")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { eua().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ip6_prefix")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ip6__prefix().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "nsapi")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { nsapi().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "teid")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { teid().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "teic")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { teic().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "teid_remote")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { teid__remote().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "teic_remote")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { teic__remote().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ratType")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ratType().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "uli")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { uli().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "charging_char")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { charging__char().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "imeisv")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { imeisv().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ms_tz")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ms__tz().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @GGSN_Tests.PdpContext: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("set value", "@GGSN_Tests.PdpContext"); } } void PdpContext::encode_text(Text_Buf& text_buf) const { field_imsi.encode_text(text_buf); field_msisdn.encode_text(text_buf); field_apn.encode_text(text_buf); field_pco__req.encode_text(text_buf); field_pco__neg.encode_text(text_buf); field_eua.encode_text(text_buf); field_ip6__prefix.encode_text(text_buf); field_nsapi.encode_text(text_buf); field_teid.encode_text(text_buf); field_teic.encode_text(text_buf); field_teid__remote.encode_text(text_buf); field_teic__remote.encode_text(text_buf); field_ratType.encode_text(text_buf); field_uli.encode_text(text_buf); field_charging__char.encode_text(text_buf); field_imeisv.encode_text(text_buf); field_ms__tz.encode_text(text_buf); } void PdpContext::decode_text(Text_Buf& text_buf) { field_imsi.decode_text(text_buf); field_msisdn.decode_text(text_buf); field_apn.decode_text(text_buf); field_pco__req.decode_text(text_buf); field_pco__neg.decode_text(text_buf); field_eua.decode_text(text_buf); field_ip6__prefix.decode_text(text_buf); field_nsapi.decode_text(text_buf); field_teid.decode_text(text_buf); field_teic.decode_text(text_buf); field_teid__remote.decode_text(text_buf); field_teic__remote.decode_text(text_buf); field_ratType.decode_text(text_buf); field_uli.decode_text(text_buf); field_charging__char.decode_text(text_buf); field_imeisv.decode_text(text_buf); field_ms__tz.decode_text(text_buf); } struct PdpContext_template::single_value_struct { HEXSTRING_template field_imsi; OCTETSTRING_template field_msisdn; OCTETSTRING_template field_apn; GTPC__Types::ProtConfigOptions_template field_pco__req; GTPC__Types::ProtConfigOptions_template field_pco__neg; GTPC__Types::EndUserAddress_template field_eua; OCTETSTRING_template field_ip6__prefix; BITSTRING_template field_nsapi; OCTETSTRING_template field_teid; OCTETSTRING_template field_teic; OCTETSTRING_template field_teid__remote; OCTETSTRING_template field_teic__remote; OCTETSTRING_template field_ratType; GTPC__Types::UserLocationInformation_template field_uli; OCTETSTRING_template field_charging__char; OCTETSTRING_template field_imeisv; GTPC__Types::MS__TimeZone_template field_ms__tz; }; void PdpContext_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_imsi = ANY_VALUE; single_value->field_msisdn = ANY_OR_OMIT; single_value->field_apn = ANY_VALUE; single_value->field_pco__req = ANY_OR_OMIT; single_value->field_pco__neg = ANY_OR_OMIT; single_value->field_eua = ANY_VALUE; single_value->field_ip6__prefix = ANY_OR_OMIT; single_value->field_nsapi = ANY_VALUE; single_value->field_teid = ANY_VALUE; single_value->field_teic = ANY_VALUE; single_value->field_teid__remote = ANY_VALUE; single_value->field_teic__remote = ANY_VALUE; single_value->field_ratType = ANY_OR_OMIT; single_value->field_uli = ANY_OR_OMIT; single_value->field_charging__char = ANY_OR_OMIT; single_value->field_imeisv = ANY_OR_OMIT; single_value->field_ms__tz = ANY_OR_OMIT; } } } void PdpContext_template::copy_value(const PdpContext& other_value) { single_value = new single_value_struct; if (other_value.imsi().is_bound()) { single_value->field_imsi = other_value.imsi(); } else { single_value->field_imsi.clean_up(); } if (other_value.msisdn().is_bound()) { if (other_value.msisdn().ispresent()) single_value->field_msisdn = other_value.msisdn()(); else single_value->field_msisdn = OMIT_VALUE; } else { single_value->field_msisdn.clean_up(); } if (other_value.apn().is_bound()) { single_value->field_apn = other_value.apn(); } else { single_value->field_apn.clean_up(); } if (other_value.pco__req().is_bound()) { if (other_value.pco__req().ispresent()) single_value->field_pco__req = other_value.pco__req()(); else single_value->field_pco__req = OMIT_VALUE; } else { single_value->field_pco__req.clean_up(); } if (other_value.pco__neg().is_bound()) { if (other_value.pco__neg().ispresent()) single_value->field_pco__neg = other_value.pco__neg()(); else single_value->field_pco__neg = OMIT_VALUE; } else { single_value->field_pco__neg.clean_up(); } if (other_value.eua().is_bound()) { single_value->field_eua = other_value.eua(); } else { single_value->field_eua.clean_up(); } if (other_value.ip6__prefix().is_bound()) { if (other_value.ip6__prefix().ispresent()) single_value->field_ip6__prefix = other_value.ip6__prefix()(); else single_value->field_ip6__prefix = OMIT_VALUE; } else { single_value->field_ip6__prefix.clean_up(); } if (other_value.nsapi().is_bound()) { single_value->field_nsapi = other_value.nsapi(); } else { single_value->field_nsapi.clean_up(); } if (other_value.teid().is_bound()) { single_value->field_teid = other_value.teid(); } else { single_value->field_teid.clean_up(); } if (other_value.teic().is_bound()) { single_value->field_teic = other_value.teic(); } else { single_value->field_teic.clean_up(); } if (other_value.teid__remote().is_bound()) { single_value->field_teid__remote = other_value.teid__remote(); } else { single_value->field_teid__remote.clean_up(); } if (other_value.teic__remote().is_bound()) { single_value->field_teic__remote = other_value.teic__remote(); } else { single_value->field_teic__remote.clean_up(); } if (other_value.ratType().is_bound()) { if (other_value.ratType().ispresent()) single_value->field_ratType = other_value.ratType()(); else single_value->field_ratType = OMIT_VALUE; } else { single_value->field_ratType.clean_up(); } if (other_value.uli().is_bound()) { if (other_value.uli().ispresent()) single_value->field_uli = other_value.uli()(); else single_value->field_uli = OMIT_VALUE; } else { single_value->field_uli.clean_up(); } if (other_value.charging__char().is_bound()) { if (other_value.charging__char().ispresent()) single_value->field_charging__char = other_value.charging__char()(); else single_value->field_charging__char = OMIT_VALUE; } else { single_value->field_charging__char.clean_up(); } if (other_value.imeisv().is_bound()) { if (other_value.imeisv().ispresent()) single_value->field_imeisv = other_value.imeisv()(); else single_value->field_imeisv = OMIT_VALUE; } else { single_value->field_imeisv.clean_up(); } if (other_value.ms__tz().is_bound()) { if (other_value.ms__tz().ispresent()) single_value->field_ms__tz = other_value.ms__tz()(); else single_value->field_ms__tz = OMIT_VALUE; } else { single_value->field_ms__tz.clean_up(); } set_selection(SPECIFIC_VALUE); } void PdpContext_template::copy_template(const PdpContext_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.imsi().get_selection()) { single_value->field_imsi = other_value.imsi(); } else { single_value->field_imsi.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.msisdn().get_selection()) { single_value->field_msisdn = other_value.msisdn(); } else { single_value->field_msisdn.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.apn().get_selection()) { single_value->field_apn = other_value.apn(); } else { single_value->field_apn.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.pco__req().get_selection()) { single_value->field_pco__req = other_value.pco__req(); } else { single_value->field_pco__req.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.pco__neg().get_selection()) { single_value->field_pco__neg = other_value.pco__neg(); } else { single_value->field_pco__neg.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.eua().get_selection()) { single_value->field_eua = other_value.eua(); } else { single_value->field_eua.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ip6__prefix().get_selection()) { single_value->field_ip6__prefix = other_value.ip6__prefix(); } else { single_value->field_ip6__prefix.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.nsapi().get_selection()) { single_value->field_nsapi = other_value.nsapi(); } else { single_value->field_nsapi.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.teid().get_selection()) { single_value->field_teid = other_value.teid(); } else { single_value->field_teid.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.teic().get_selection()) { single_value->field_teic = other_value.teic(); } else { single_value->field_teic.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.teid__remote().get_selection()) { single_value->field_teid__remote = other_value.teid__remote(); } else { single_value->field_teid__remote.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.teic__remote().get_selection()) { single_value->field_teic__remote = other_value.teic__remote(); } else { single_value->field_teic__remote.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ratType().get_selection()) { single_value->field_ratType = other_value.ratType(); } else { single_value->field_ratType.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.uli().get_selection()) { single_value->field_uli = other_value.uli(); } else { single_value->field_uli.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.charging__char().get_selection()) { single_value->field_charging__char = other_value.charging__char(); } else { single_value->field_charging__char.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.imeisv().get_selection()) { single_value->field_imeisv = other_value.imeisv(); } else { single_value->field_imeisv.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ms__tz().get_selection()) { single_value->field_ms__tz = other_value.ms__tz(); } else { single_value->field_ms__tz.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 PdpContext_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 PdpContext_template(*other_value.implication_.precondition); implication_.implied_template = new PdpContext_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 @GGSN_Tests.PdpContext."); break; } set_selection(other_value); } PdpContext_template::PdpContext_template() { } PdpContext_template::PdpContext_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } PdpContext_template::PdpContext_template(const PdpContext& other_value) { copy_value(other_value); } PdpContext_template::PdpContext_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PdpContext&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @GGSN_Tests.PdpContext from an unbound optional field."); } } PdpContext_template::PdpContext_template(PdpContext_template* p_precondition, PdpContext_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } PdpContext_template::PdpContext_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; } PdpContext_template::PdpContext_template(const PdpContext_template& other_value) : Base_Template() { copy_template(other_value); } PdpContext_template::~PdpContext_template() { clean_up(); } PdpContext_template& PdpContext_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } PdpContext_template& PdpContext_template::operator=(const PdpContext& other_value) { clean_up(); copy_value(other_value); return *this; } PdpContext_template& PdpContext_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PdpContext&)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 @GGSN_Tests.PdpContext."); } return *this; } PdpContext_template& PdpContext_template::operator=(const PdpContext_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean PdpContext_template::match(const PdpContext& 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.imsi().is_bound()) return FALSE; if(!single_value->field_imsi.match(other_value.imsi(), legacy))return FALSE; if(!other_value.msisdn().is_bound()) return FALSE; if((other_value.msisdn().ispresent() ? !single_value->field_msisdn.match((const OCTETSTRING&)other_value.msisdn(), legacy) : !single_value->field_msisdn.match_omit(legacy)))return FALSE; if(!other_value.apn().is_bound()) return FALSE; if(!single_value->field_apn.match(other_value.apn(), legacy))return FALSE; if(!other_value.pco__req().is_bound()) return FALSE; if((other_value.pco__req().ispresent() ? !single_value->field_pco__req.match((const GTPC__Types::ProtConfigOptions&)other_value.pco__req(), legacy) : !single_value->field_pco__req.match_omit(legacy)))return FALSE; if(!other_value.pco__neg().is_bound()) return FALSE; if((other_value.pco__neg().ispresent() ? !single_value->field_pco__neg.match((const GTPC__Types::ProtConfigOptions&)other_value.pco__neg(), legacy) : !single_value->field_pco__neg.match_omit(legacy)))return FALSE; if(!other_value.eua().is_bound()) return FALSE; if(!single_value->field_eua.match(other_value.eua(), legacy))return FALSE; if(!other_value.ip6__prefix().is_bound()) return FALSE; if((other_value.ip6__prefix().ispresent() ? !single_value->field_ip6__prefix.match((const OCTETSTRING&)other_value.ip6__prefix(), legacy) : !single_value->field_ip6__prefix.match_omit(legacy)))return FALSE; if(!other_value.nsapi().is_bound()) return FALSE; if(!single_value->field_nsapi.match(other_value.nsapi(), legacy))return FALSE; if(!other_value.teid().is_bound()) return FALSE; if(!single_value->field_teid.match(other_value.teid(), legacy))return FALSE; if(!other_value.teic().is_bound()) return FALSE; if(!single_value->field_teic.match(other_value.teic(), legacy))return FALSE; if(!other_value.teid__remote().is_bound()) return FALSE; if(!single_value->field_teid__remote.match(other_value.teid__remote(), legacy))return FALSE; if(!other_value.teic__remote().is_bound()) return FALSE; if(!single_value->field_teic__remote.match(other_value.teic__remote(), legacy))return FALSE; if(!other_value.ratType().is_bound()) return FALSE; if((other_value.ratType().ispresent() ? !single_value->field_ratType.match((const OCTETSTRING&)other_value.ratType(), legacy) : !single_value->field_ratType.match_omit(legacy)))return FALSE; if(!other_value.uli().is_bound()) return FALSE; if((other_value.uli().ispresent() ? !single_value->field_uli.match((const GTPC__Types::UserLocationInformation&)other_value.uli(), legacy) : !single_value->field_uli.match_omit(legacy)))return FALSE; if(!other_value.charging__char().is_bound()) return FALSE; if((other_value.charging__char().ispresent() ? !single_value->field_charging__char.match((const OCTETSTRING&)other_value.charging__char(), legacy) : !single_value->field_charging__char.match_omit(legacy)))return FALSE; if(!other_value.imeisv().is_bound()) return FALSE; if((other_value.imeisv().ispresent() ? !single_value->field_imeisv.match((const OCTETSTRING&)other_value.imeisv(), legacy) : !single_value->field_imeisv.match_omit(legacy)))return FALSE; if(!other_value.ms__tz().is_bound()) return FALSE; if((other_value.ms__tz().ispresent() ? !single_value->field_ms__tz.match((const GTPC__Types::MS__TimeZone&)other_value.ms__tz(), legacy) : !single_value->field_ms__tz.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 @GGSN_Tests.PdpContext."); } return FALSE; } boolean PdpContext_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return single_value->field_imsi.is_bound() || (single_value->field_msisdn.is_omit() || single_value->field_msisdn.is_bound()) || single_value->field_apn.is_bound() || (single_value->field_pco__req.is_omit() || single_value->field_pco__req.is_bound()) || (single_value->field_pco__neg.is_omit() || single_value->field_pco__neg.is_bound()) || single_value->field_eua.is_bound() || (single_value->field_ip6__prefix.is_omit() || single_value->field_ip6__prefix.is_bound()) || single_value->field_nsapi.is_bound() || single_value->field_teid.is_bound() || single_value->field_teic.is_bound() || single_value->field_teid__remote.is_bound() || single_value->field_teic__remote.is_bound() || (single_value->field_ratType.is_omit() || single_value->field_ratType.is_bound()) || (single_value->field_uli.is_omit() || single_value->field_uli.is_bound()) || (single_value->field_charging__char.is_omit() || single_value->field_charging__char.is_bound()) || (single_value->field_imeisv.is_omit() || single_value->field_imeisv.is_bound()) || (single_value->field_ms__tz.is_omit() || single_value->field_ms__tz.is_bound()); } boolean PdpContext_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value->field_imsi.is_value() && (single_value->field_msisdn.is_omit() || single_value->field_msisdn.is_value()) && single_value->field_apn.is_value() && (single_value->field_pco__req.is_omit() || single_value->field_pco__req.is_value()) && (single_value->field_pco__neg.is_omit() || single_value->field_pco__neg.is_value()) && single_value->field_eua.is_value() && (single_value->field_ip6__prefix.is_omit() || single_value->field_ip6__prefix.is_value()) && single_value->field_nsapi.is_value() && single_value->field_teid.is_value() && single_value->field_teic.is_value() && single_value->field_teid__remote.is_value() && single_value->field_teic__remote.is_value() && (single_value->field_ratType.is_omit() || single_value->field_ratType.is_value()) && (single_value->field_uli.is_omit() || single_value->field_uli.is_value()) && (single_value->field_charging__char.is_omit() || single_value->field_charging__char.is_value()) && (single_value->field_imeisv.is_omit() || single_value->field_imeisv.is_value()) && (single_value->field_ms__tz.is_omit() || single_value->field_ms__tz.is_value()); } void PdpContext_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; } PdpContext PdpContext_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 @GGSN_Tests.PdpContext."); PdpContext ret_val; if (single_value->field_imsi.is_bound()) { ret_val.imsi() = single_value->field_imsi.valueof(); } if (single_value->field_msisdn.is_omit()) ret_val.msisdn() = OMIT_VALUE; else if (single_value->field_msisdn.is_bound()) { ret_val.msisdn() = single_value->field_msisdn.valueof(); } if (single_value->field_apn.is_bound()) { ret_val.apn() = single_value->field_apn.valueof(); } if (single_value->field_pco__req.is_omit()) ret_val.pco__req() = OMIT_VALUE; else if (single_value->field_pco__req.is_bound()) { ret_val.pco__req() = single_value->field_pco__req.valueof(); } if (single_value->field_pco__neg.is_omit()) ret_val.pco__neg() = OMIT_VALUE; else if (single_value->field_pco__neg.is_bound()) { ret_val.pco__neg() = single_value->field_pco__neg.valueof(); } if (single_value->field_eua.is_bound()) { ret_val.eua() = single_value->field_eua.valueof(); } if (single_value->field_ip6__prefix.is_omit()) ret_val.ip6__prefix() = OMIT_VALUE; else if (single_value->field_ip6__prefix.is_bound()) { ret_val.ip6__prefix() = single_value->field_ip6__prefix.valueof(); } if (single_value->field_nsapi.is_bound()) { ret_val.nsapi() = single_value->field_nsapi.valueof(); } if (single_value->field_teid.is_bound()) { ret_val.teid() = single_value->field_teid.valueof(); } if (single_value->field_teic.is_bound()) { ret_val.teic() = single_value->field_teic.valueof(); } if (single_value->field_teid__remote.is_bound()) { ret_val.teid__remote() = single_value->field_teid__remote.valueof(); } if (single_value->field_teic__remote.is_bound()) { ret_val.teic__remote() = single_value->field_teic__remote.valueof(); } if (single_value->field_ratType.is_omit()) ret_val.ratType() = OMIT_VALUE; else if (single_value->field_ratType.is_bound()) { ret_val.ratType() = single_value->field_ratType.valueof(); } if (single_value->field_uli.is_omit()) ret_val.uli() = OMIT_VALUE; else if (single_value->field_uli.is_bound()) { ret_val.uli() = single_value->field_uli.valueof(); } if (single_value->field_charging__char.is_omit()) ret_val.charging__char() = OMIT_VALUE; else if (single_value->field_charging__char.is_bound()) { ret_val.charging__char() = single_value->field_charging__char.valueof(); } if (single_value->field_imeisv.is_omit()) ret_val.imeisv() = OMIT_VALUE; else if (single_value->field_imeisv.is_bound()) { ret_val.imeisv() = single_value->field_imeisv.valueof(); } if (single_value->field_ms__tz.is_omit()) ret_val.ms__tz() = OMIT_VALUE; else if (single_value->field_ms__tz.is_bound()) { ret_val.ms__tz() = single_value->field_ms__tz.valueof(); } return ret_val; } void PdpContext_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 @GGSN_Tests.PdpContext."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new PdpContext_template[list_length]; } PdpContext_template& PdpContext_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 @GGSN_Tests.PdpContext."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @GGSN_Tests.PdpContext."); return value_list.list_value[list_index]; } HEXSTRING_template& PdpContext_template::imsi() { set_specific(); return single_value->field_imsi; } const HEXSTRING_template& PdpContext_template::imsi() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field imsi of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_imsi; } OCTETSTRING_template& PdpContext_template::msisdn() { set_specific(); return single_value->field_msisdn; } const OCTETSTRING_template& PdpContext_template::msisdn() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field msisdn of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_msisdn; } OCTETSTRING_template& PdpContext_template::apn() { set_specific(); return single_value->field_apn; } const OCTETSTRING_template& PdpContext_template::apn() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field apn of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_apn; } GTPC__Types::ProtConfigOptions_template& PdpContext_template::pco__req() { set_specific(); return single_value->field_pco__req; } const GTPC__Types::ProtConfigOptions_template& PdpContext_template::pco__req() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field pco_req of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_pco__req; } GTPC__Types::ProtConfigOptions_template& PdpContext_template::pco__neg() { set_specific(); return single_value->field_pco__neg; } const GTPC__Types::ProtConfigOptions_template& PdpContext_template::pco__neg() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field pco_neg of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_pco__neg; } GTPC__Types::EndUserAddress_template& PdpContext_template::eua() { set_specific(); return single_value->field_eua; } const GTPC__Types::EndUserAddress_template& PdpContext_template::eua() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field eua of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_eua; } OCTETSTRING_template& PdpContext_template::ip6__prefix() { set_specific(); return single_value->field_ip6__prefix; } const OCTETSTRING_template& PdpContext_template::ip6__prefix() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ip6_prefix of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_ip6__prefix; } BITSTRING_template& PdpContext_template::nsapi() { set_specific(); return single_value->field_nsapi; } const BITSTRING_template& PdpContext_template::nsapi() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field nsapi of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_nsapi; } OCTETSTRING_template& PdpContext_template::teid() { set_specific(); return single_value->field_teid; } const OCTETSTRING_template& PdpContext_template::teid() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field teid of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_teid; } OCTETSTRING_template& PdpContext_template::teic() { set_specific(); return single_value->field_teic; } const OCTETSTRING_template& PdpContext_template::teic() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field teic of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_teic; } OCTETSTRING_template& PdpContext_template::teid__remote() { set_specific(); return single_value->field_teid__remote; } const OCTETSTRING_template& PdpContext_template::teid__remote() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field teid_remote of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_teid__remote; } OCTETSTRING_template& PdpContext_template::teic__remote() { set_specific(); return single_value->field_teic__remote; } const OCTETSTRING_template& PdpContext_template::teic__remote() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field teic_remote of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_teic__remote; } OCTETSTRING_template& PdpContext_template::ratType() { set_specific(); return single_value->field_ratType; } const OCTETSTRING_template& PdpContext_template::ratType() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ratType of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_ratType; } GTPC__Types::UserLocationInformation_template& PdpContext_template::uli() { set_specific(); return single_value->field_uli; } const GTPC__Types::UserLocationInformation_template& PdpContext_template::uli() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field uli of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_uli; } OCTETSTRING_template& PdpContext_template::charging__char() { set_specific(); return single_value->field_charging__char; } const OCTETSTRING_template& PdpContext_template::charging__char() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field charging_char of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_charging__char; } OCTETSTRING_template& PdpContext_template::imeisv() { set_specific(); return single_value->field_imeisv; } const OCTETSTRING_template& PdpContext_template::imeisv() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field imeisv of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_imeisv; } GTPC__Types::MS__TimeZone_template& PdpContext_template::ms__tz() { set_specific(); return single_value->field_ms__tz; } const GTPC__Types::MS__TimeZone_template& PdpContext_template::ms__tz() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ms_tz of a non-specific template of type @GGSN_Tests.PdpContext."); return single_value->field_ms__tz; } int PdpContext_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @GGSN_Tests.PdpContext which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 8; if (single_value->field_msisdn.is_present()) ret_val++; if (single_value->field_pco__req.is_present()) ret_val++; if (single_value->field_pco__neg.is_present()) ret_val++; if (single_value->field_ip6__prefix.is_present()) ret_val++; if (single_value->field_ratType.is_present()) ret_val++; if (single_value->field_uli.is_present()) ret_val++; if (single_value->field_charging__char.is_present()) ret_val++; if (single_value->field_imeisv.is_present()) ret_val++; if (single_value->field_ms__tz.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 @GGSN_Tests.PdpContext 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 @GGSN_Tests.PdpContext containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @GGSN_Tests.PdpContext containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @GGSN_Tests.PdpContext containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @GGSN_Tests.PdpContext containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @GGSN_Tests.PdpContext containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @GGSN_Tests.PdpContext containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @GGSN_Tests.PdpContext containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @GGSN_Tests.PdpContext."); } return 0; } void PdpContext_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ imsi := "); single_value->field_imsi.log(); TTCN_Logger::log_event_str(", msisdn := "); single_value->field_msisdn.log(); TTCN_Logger::log_event_str(", apn := "); single_value->field_apn.log(); TTCN_Logger::log_event_str(", pco_req := "); single_value->field_pco__req.log(); TTCN_Logger::log_event_str(", pco_neg := "); single_value->field_pco__neg.log(); TTCN_Logger::log_event_str(", eua := "); single_value->field_eua.log(); TTCN_Logger::log_event_str(", ip6_prefix := "); single_value->field_ip6__prefix.log(); TTCN_Logger::log_event_str(", nsapi := "); single_value->field_nsapi.log(); TTCN_Logger::log_event_str(", teid := "); single_value->field_teid.log(); TTCN_Logger::log_event_str(", teic := "); single_value->field_teic.log(); TTCN_Logger::log_event_str(", teid_remote := "); single_value->field_teid__remote.log(); TTCN_Logger::log_event_str(", teic_remote := "); single_value->field_teic__remote.log(); TTCN_Logger::log_event_str(", ratType := "); single_value->field_ratType.log(); TTCN_Logger::log_event_str(", uli := "); single_value->field_uli.log(); TTCN_Logger::log_event_str(", charging_char := "); single_value->field_charging__char.log(); TTCN_Logger::log_event_str(", imeisv := "); single_value->field_imeisv.log(); TTCN_Logger::log_event_str(", ms_tz := "); single_value->field_ms__tz.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 PdpContext_template::log_match(const PdpContext& 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_imsi.match(match_value.imsi(), legacy)){ TTCN_Logger::log_logmatch_info(".imsi"); single_value->field_imsi.log_match(match_value.imsi(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.msisdn().ispresent()){ if(!single_value->field_msisdn.match(match_value.msisdn(), legacy)){ TTCN_Logger::log_logmatch_info(".msisdn"); single_value->field_msisdn.log_match(match_value.msisdn(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_msisdn.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".msisdn := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_msisdn.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_apn.match(match_value.apn(), legacy)){ TTCN_Logger::log_logmatch_info(".apn"); single_value->field_apn.log_match(match_value.apn(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.pco__req().ispresent()){ if(!single_value->field_pco__req.match(match_value.pco__req(), legacy)){ TTCN_Logger::log_logmatch_info(".pco_req"); single_value->field_pco__req.log_match(match_value.pco__req(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_pco__req.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".pco_req := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_pco__req.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.pco__neg().ispresent()){ if(!single_value->field_pco__neg.match(match_value.pco__neg(), legacy)){ TTCN_Logger::log_logmatch_info(".pco_neg"); single_value->field_pco__neg.log_match(match_value.pco__neg(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_pco__neg.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".pco_neg := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_pco__neg.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_eua.match(match_value.eua(), legacy)){ TTCN_Logger::log_logmatch_info(".eua"); single_value->field_eua.log_match(match_value.eua(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.ip6__prefix().ispresent()){ if(!single_value->field_ip6__prefix.match(match_value.ip6__prefix(), legacy)){ TTCN_Logger::log_logmatch_info(".ip6_prefix"); single_value->field_ip6__prefix.log_match(match_value.ip6__prefix(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ip6__prefix.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ip6_prefix := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ip6__prefix.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_nsapi.match(match_value.nsapi(), legacy)){ TTCN_Logger::log_logmatch_info(".nsapi"); single_value->field_nsapi.log_match(match_value.nsapi(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_teid.match(match_value.teid(), legacy)){ TTCN_Logger::log_logmatch_info(".teid"); single_value->field_teid.log_match(match_value.teid(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_teic.match(match_value.teic(), legacy)){ TTCN_Logger::log_logmatch_info(".teic"); single_value->field_teic.log_match(match_value.teic(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_teid__remote.match(match_value.teid__remote(), legacy)){ TTCN_Logger::log_logmatch_info(".teid_remote"); single_value->field_teid__remote.log_match(match_value.teid__remote(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_teic__remote.match(match_value.teic__remote(), legacy)){ TTCN_Logger::log_logmatch_info(".teic_remote"); single_value->field_teic__remote.log_match(match_value.teic__remote(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.ratType().ispresent()){ if(!single_value->field_ratType.match(match_value.ratType(), legacy)){ TTCN_Logger::log_logmatch_info(".ratType"); single_value->field_ratType.log_match(match_value.ratType(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ratType.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ratType := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ratType.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.uli().ispresent()){ if(!single_value->field_uli.match(match_value.uli(), legacy)){ TTCN_Logger::log_logmatch_info(".uli"); single_value->field_uli.log_match(match_value.uli(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_uli.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".uli := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_uli.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.charging__char().ispresent()){ if(!single_value->field_charging__char.match(match_value.charging__char(), legacy)){ TTCN_Logger::log_logmatch_info(".charging_char"); single_value->field_charging__char.log_match(match_value.charging__char(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_charging__char.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".charging_char := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_charging__char.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.imeisv().ispresent()){ if(!single_value->field_imeisv.match(match_value.imeisv(), legacy)){ TTCN_Logger::log_logmatch_info(".imeisv"); single_value->field_imeisv.log_match(match_value.imeisv(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_imeisv.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".imeisv := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_imeisv.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.ms__tz().ispresent()){ if(!single_value->field_ms__tz.match(match_value.ms__tz(), legacy)){ TTCN_Logger::log_logmatch_info(".ms_tz"); single_value->field_ms__tz.log_match(match_value.ms__tz(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ms__tz.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ms_tz := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ms__tz.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("{ imsi := "); single_value->field_imsi.log_match(match_value.imsi(), legacy); TTCN_Logger::log_event_str(", msisdn := "); if (match_value.msisdn().ispresent()) { single_value->field_msisdn.log_match(match_value.msisdn(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_msisdn.log(); if (single_value->field_msisdn.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", apn := "); single_value->field_apn.log_match(match_value.apn(), legacy); TTCN_Logger::log_event_str(", pco_req := "); if (match_value.pco__req().ispresent()) { single_value->field_pco__req.log_match(match_value.pco__req(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_pco__req.log(); if (single_value->field_pco__req.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", pco_neg := "); if (match_value.pco__neg().ispresent()) { single_value->field_pco__neg.log_match(match_value.pco__neg(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_pco__neg.log(); if (single_value->field_pco__neg.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", eua := "); single_value->field_eua.log_match(match_value.eua(), legacy); TTCN_Logger::log_event_str(", ip6_prefix := "); if (match_value.ip6__prefix().ispresent()) { single_value->field_ip6__prefix.log_match(match_value.ip6__prefix(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ip6__prefix.log(); if (single_value->field_ip6__prefix.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", nsapi := "); single_value->field_nsapi.log_match(match_value.nsapi(), legacy); TTCN_Logger::log_event_str(", teid := "); single_value->field_teid.log_match(match_value.teid(), legacy); TTCN_Logger::log_event_str(", teic := "); single_value->field_teic.log_match(match_value.teic(), legacy); TTCN_Logger::log_event_str(", teid_remote := "); single_value->field_teid__remote.log_match(match_value.teid__remote(), legacy); TTCN_Logger::log_event_str(", teic_remote := "); single_value->field_teic__remote.log_match(match_value.teic__remote(), legacy); TTCN_Logger::log_event_str(", ratType := "); if (match_value.ratType().ispresent()) { single_value->field_ratType.log_match(match_value.ratType(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ratType.log(); if (single_value->field_ratType.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", uli := "); if (match_value.uli().ispresent()) { single_value->field_uli.log_match(match_value.uli(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_uli.log(); if (single_value->field_uli.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", charging_char := "); if (match_value.charging__char().ispresent()) { single_value->field_charging__char.log_match(match_value.charging__char(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_charging__char.log(); if (single_value->field_charging__char.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", imeisv := "); if (match_value.imeisv().ispresent()) { single_value->field_imeisv.log_match(match_value.imeisv(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_imeisv.log(); if (single_value->field_imeisv.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", ms_tz := "); if (match_value.ms__tz().ispresent()) { single_value->field_ms__tz.log_match(match_value.ms__tz(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ms__tz.log(); if (single_value->field_ms__tz.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 PdpContext_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_imsi.encode_text(text_buf); single_value->field_msisdn.encode_text(text_buf); single_value->field_apn.encode_text(text_buf); single_value->field_pco__req.encode_text(text_buf); single_value->field_pco__neg.encode_text(text_buf); single_value->field_eua.encode_text(text_buf); single_value->field_ip6__prefix.encode_text(text_buf); single_value->field_nsapi.encode_text(text_buf); single_value->field_teid.encode_text(text_buf); single_value->field_teic.encode_text(text_buf); single_value->field_teid__remote.encode_text(text_buf); single_value->field_teic__remote.encode_text(text_buf); single_value->field_ratType.encode_text(text_buf); single_value->field_uli.encode_text(text_buf); single_value->field_charging__char.encode_text(text_buf); single_value->field_imeisv.encode_text(text_buf); single_value->field_ms__tz.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 @GGSN_Tests.PdpContext."); } } void PdpContext_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_imsi.decode_text(text_buf); single_value->field_msisdn.decode_text(text_buf); single_value->field_apn.decode_text(text_buf); single_value->field_pco__req.decode_text(text_buf); single_value->field_pco__neg.decode_text(text_buf); single_value->field_eua.decode_text(text_buf); single_value->field_ip6__prefix.decode_text(text_buf); single_value->field_nsapi.decode_text(text_buf); single_value->field_teid.decode_text(text_buf); single_value->field_teic.decode_text(text_buf); single_value->field_teid__remote.decode_text(text_buf); single_value->field_teic__remote.decode_text(text_buf); single_value->field_ratType.decode_text(text_buf); single_value->field_uli.decode_text(text_buf); single_value->field_charging__char.decode_text(text_buf); single_value->field_imeisv.decode_text(text_buf); single_value->field_ms__tz.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 PdpContext_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 @GGSN_Tests.PdpContext."); } } void PdpContext_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "set 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: { PdpContext_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) imsi().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) msisdn().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) apn().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pco__req().set_param(*param.get_elem(3)); if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) pco__neg().set_param(*param.get_elem(4)); if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) eua().set_param(*param.get_elem(5)); if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) ip6__prefix().set_param(*param.get_elem(6)); if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) nsapi().set_param(*param.get_elem(7)); if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) teid().set_param(*param.get_elem(8)); if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) teic().set_param(*param.get_elem(9)); if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) teid__remote().set_param(*param.get_elem(10)); if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) teic__remote().set_param(*param.get_elem(11)); if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) ratType().set_param(*param.get_elem(12)); if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) uli().set_param(*param.get_elem(13)); if (param.get_size()>14 && param.get_elem(14)->get_type()!=Module_Param::MP_NotUsed) charging__char().set_param(*param.get_elem(14)); if (param.get_size()>15 && param.get_elem(15)->get_type()!=Module_Param::MP_NotUsed) imeisv().set_param(*param.get_elem(15)); if (param.get_size()>16 && param.get_elem(16)->get_type()!=Module_Param::MP_NotUsed) ms__tz().set_param(*param.get_elem(16)); 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(), "imsi")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { imsi().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "msisdn")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { msisdn().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "apn")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { apn().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "pco_req")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { pco__req().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "pco_neg")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { pco__neg().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "eua")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { eua().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ip6_prefix")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ip6__prefix().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "nsapi")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { nsapi().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "teid")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { teid().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "teic")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { teic().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "teid_remote")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { teid__remote().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "teic_remote")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { teic__remote().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ratType")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ratType().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "uli")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { uli().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "charging_char")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { charging__char().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "imeisv")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { imeisv().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ms_tz")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ms__tz().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @GGSN_Tests.PdpContext: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { PdpContext_template* precondition = new PdpContext_template; precondition->set_param(*param.get_elem(0)); PdpContext_template* implied_template = new PdpContext_template; implied_template->set_param(*param.get_elem(1)); *this = PdpContext_template(precondition, implied_template); } break; default: param.type_error("set template", "@GGSN_Tests.PdpContext"); } is_ifpresent = param.get_ifpresent(); } void PdpContext_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_imsi.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_msisdn.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_apn.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_pco__req.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_pco__neg.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_eua.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_ip6__prefix.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_nsapi.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_teid.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_teic.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_teid__remote.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_teic__remote.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_ratType.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_uli.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_charging__char.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_imeisv.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); single_value->field_ms__tz.check_restriction(t_res, t_name ? t_name : "@GGSN_Tests.PdpContext"); 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 : "@GGSN_Tests.PdpContext"); } boolean PdpContext_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean PdpContext_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(gtpu).s__bit() != bs_0)) { current_location.update_lineno(205); /* GGSN_Tests.ttcn, line 205 */ TTCN_Logger::log_str(TTCN_USER, "GTPU sequence number expected but not present"); current_location.update_lineno(206); /* GGSN_Tests.ttcn, line 206 */ return FALSE; } } else { current_location.update_lineno(209); /* GGSN_Tests.ttcn, line 209 */ if ((const_cast< const GTPU__Types::PDU__GTPU&>(gtpu).s__bit() != bs_1)) { current_location.update_lineno(210); /* GGSN_Tests.ttcn, line 210 */ TTCN_Logger::log_str(TTCN_USER, "GTPU sequence number not expected but present"); current_location.update_lineno(211); /* GGSN_Tests.ttcn, line 211 */ return FALSE; } } current_location.update_lineno(214); /* GGSN_Tests.ttcn, line 214 */ return TRUE; } void f__vty__enable__echo__interval(const INTEGER& intval__sec) { TTCN_Location current_location("GGSN_Tests.ttcn", 217, TTCN_Location::LOCATION_FUNCTION, "f_vty_enable_echo_interval"); current_location.update_lineno(218); /* GGSN_Tests.ttcn, line 218 */ Osmocom__VTY__Functions::f__vty__enter__config(GT__CT_component_GGSNVTY); current_location.update_lineno(219); /* GGSN_Tests.ttcn, line 219 */ Osmocom__VTY__Functions::f__vty__transceive(GT__CT_component_GGSNVTY, cs_7, Osmocom__VTY__Functions::f__vty__transceive_strict_defval); current_location.update_lineno(220); /* GGSN_Tests.ttcn, line 220 */ if ((intval__sec > 0)) { current_location.update_lineno(221); /* GGSN_Tests.ttcn, line 221 */ Osmocom__VTY__Functions::f__vty__transceive(GT__CT_component_GGSNVTY, (cs_15 + int2str(intval__sec)), Osmocom__VTY__Functions::f__vty__transceive_strict_defval); } else { current_location.update_lineno(223); /* GGSN_Tests.ttcn, line 223 */ Osmocom__VTY__Functions::f__vty__transceive(GT__CT_component_GGSNVTY, cs_16, Osmocom__VTY__Functions::f__vty__transceive_strict_defval); } current_location.update_lineno(225); /* GGSN_Tests.ttcn, line 225 */ Osmocom__VTY__Functions::f__vty__transceive(GT__CT_component_GGSNVTY, cs_14, Osmocom__VTY__Functions::f__vty__transceive_strict_defval); } void start_f__vty__enable__echo__interval(const COMPONENT& component_reference, const INTEGER& intval__sec) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_vty_enable_echo_interval("); intval__sec.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_vty_enable_echo_interval", text_buf); intval__sec.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } DIAMETER__Types::PDU__DIAMETER_template DiameterForwardUnitdataCallback(const DIAMETER__Types::PDU__DIAMETER& msg) { TTCN_Location current_location("GGSN_Tests.ttcn", 228, TTCN_Location::LOCATION_FUNCTION, "DiameterForwardUnitdataCallback"); current_location.update_lineno(230); /* GGSN_Tests.ttcn, line 230 */ DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER__UNIT.send(msg, NULL); current_location.update_lineno(231); /* GGSN_Tests.ttcn, line 231 */ return DIAMETER__Types::PDU__DIAMETER_template(OMIT_VALUE); } void start_DiameterForwardUnitdataCallback(const COMPONENT& component_reference, const DIAMETER__Types::PDU__DIAMETER& msg) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function DiameterForwardUnitdataCallback("); msg.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "DiameterForwardUnitdataCallback", text_buf); msg.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__init__diameter(const CHARSTRING& id) { TTCN_Location current_location("GGSN_Tests.ttcn", 234, TTCN_Location::LOCATION_FUNCTION, "f_init_diameter"); current_location.update_lineno(235); /* GGSN_Tests.ttcn, line 235 */ DIAMETER__Emulation::DIAMETEROps ops; ops.create__cb() = &DIAMETER__Emulation::ExpectedCreateCallback; ops.unitdata__cb() = &DiameterForwardUnitdataCallback; ops.raw() = TRUE; current_location.update_lineno(242); /* GGSN_Tests.ttcn, line 242 */ GT__CT_component_g__gx__pars.remote__ip() = m__ggsn__ip__gtpc; GT__CT_component_g__gx__pars.remote__sctp__port() = -1; GT__CT_component_g__gx__pars.local__ip() = m__bind__ip__gtpc; GT__CT_component_g__gx__pars.local__sctp__port() = 3868; GT__CT_component_g__gx__pars.origin__host() = cs_17; GT__CT_component_g__gx__pars.origin__realm() = cs_18; GT__CT_component_g__gx__pars.auth__app__id() = OMIT_VALUE; GT__CT_component_g__gx__pars.vendor__app__id() = DIAMETER__ts29__212__Templates::c__DIAMETER__3GPP__Gx__AID; current_location.update_lineno(252); /* GGSN_Tests.ttcn, line 252 */ GT__CT_component_vc__Gx = TTCN_Runtime::create_component("DIAMETER_Emulation", "DIAMETER_Emulation_CT", id, NULL, FALSE); current_location.update_lineno(253); /* GGSN_Tests.ttcn, line 253 */ { Map_Params tmp_3(0); TTCN_Runtime::map_port(GT__CT_component_vc__Gx, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER.get_name(), SYSTEM_COMPREF, "DIAMETER_CODEC_PT", tmp_3); } current_location.update_lineno(254); /* GGSN_Tests.ttcn, line 254 */ TTCN_Runtime::connect_port(GT__CT_component_vc__Gx, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER__UNIT.get_name(), self, GT__CT_component_Gx__UNIT.get_name()); current_location.update_lineno(255); /* GGSN_Tests.ttcn, line 255 */ TTCN_Runtime::connect_port(GT__CT_component_vc__Gx, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER__PROC.get_name(), self, GT__CT_component_Gx__PROC.get_name()); current_location.update_lineno(256); /* GGSN_Tests.ttcn, line 256 */ DIAMETER__Emulation::start_main_(GT__CT_component_vc__Gx, ops, GT__CT_component_g__gx__pars, id); current_location.update_lineno(259); /* GGSN_Tests.ttcn, line 259 */ GT__CT_component_g__gy__pars.remote__ip() = m__ggsn__ip__gtpc; GT__CT_component_g__gy__pars.remote__sctp__port() = -1; GT__CT_component_g__gy__pars.local__ip() = m__bind__ip__gtpc; GT__CT_component_g__gy__pars.local__sctp__port() = 3869; GT__CT_component_g__gy__pars.origin__host() = cs_19; GT__CT_component_g__gy__pars.origin__realm() = cs_18; GT__CT_component_g__gy__pars.auth__app__id() = DIAMETER__Templates::c__DIAMETER__CREDIT__CONTROL__AID; GT__CT_component_g__gy__pars.vendor__app__id() = OMIT_VALUE; current_location.update_lineno(269); /* GGSN_Tests.ttcn, line 269 */ GT__CT_component_vc__Gy = TTCN_Runtime::create_component("DIAMETER_Emulation", "DIAMETER_Emulation_CT", id, NULL, FALSE); current_location.update_lineno(270); /* GGSN_Tests.ttcn, line 270 */ { Map_Params tmp_6(0); TTCN_Runtime::map_port(GT__CT_component_vc__Gy, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER.get_name(), SYSTEM_COMPREF, "DIAMETER_CODEC_PT", tmp_6); } current_location.update_lineno(271); /* GGSN_Tests.ttcn, line 271 */ TTCN_Runtime::connect_port(GT__CT_component_vc__Gy, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER__UNIT.get_name(), self, GT__CT_component_Gy__UNIT.get_name()); current_location.update_lineno(272); /* GGSN_Tests.ttcn, line 272 */ TTCN_Runtime::connect_port(GT__CT_component_vc__Gy, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER__PROC.get_name(), self, GT__CT_component_Gy__PROC.get_name()); current_location.update_lineno(273); /* GGSN_Tests.ttcn, line 273 */ DIAMETER__Emulation::start_main_(GT__CT_component_vc__Gy, ops, GT__CT_component_g__gy__pars, id); current_location.update_lineno(275); /* GGSN_Tests.ttcn, line 275 */ DIAMETER__Emulation::f__diameter__wait__capability(GT__CT_component_Gx__UNIT); current_location.update_lineno(276); /* GGSN_Tests.ttcn, line 276 */ DIAMETER__Emulation::f__diameter__wait__capability(GT__CT_component_Gy__UNIT); current_location.update_lineno(282); /* GGSN_Tests.ttcn, line 282 */ Osmocom__Types::f__sleep(1.0); } void start_f__init__diameter(const COMPONENT& component_reference, const CHARSTRING& id) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_init_diameter("); id.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_init_diameter", text_buf); id.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__init() { TTCN_Location current_location("GGSN_Tests.ttcn", 285, TTCN_Location::LOCATION_FUNCTION, "f_init"); current_location.update_lineno(286); /* GGSN_Tests.ttcn, line 286 */ if ((GT__CT_component_g__initialized == TRUE)) { current_location.update_lineno(287); /* GGSN_Tests.ttcn, line 287 */ return; } current_location.update_lineno(289); /* GGSN_Tests.ttcn, line 289 */ GT__CT_component_g__initialized = TRUE; current_location.update_lineno(291); /* GGSN_Tests.ttcn, line 291 */ GT__CT_component_g__sgsn__ip__c = Native__Functions::f__inet__addr(m__bind__ip__gtpc); current_location.update_lineno(292); /* GGSN_Tests.ttcn, line 292 */ GT__CT_component_g__sgsn__ip__u = Native__Functions::f__inet__addr(m__bind__ip__gtpu); current_location.update_lineno(294); /* GGSN_Tests.ttcn, line 294 */ Socket__API__Definitions::Result res; current_location.update_lineno(295); /* GGSN_Tests.ttcn, line 295 */ { Map_Params tmp_10(0); TTCN_Runtime::map_port(self, GT__CT_component_GTPC.get_name(), SYSTEM_COMPREF, "GTPC", tmp_10); } current_location.update_lineno(296); /* GGSN_Tests.ttcn, line 296 */ { Socket__API__Definitions::ProtoTuple tmp_12; tmp_12.udp() = NULL_VALUE; res = GTPv1C__CodecPort__CtrlFunct::f__IPL4__listen(GT__CT_component_GTPC, m__bind__ip__gtpc, 2123, tmp_12, GTPv1C__CodecPort__CtrlFunct::f__IPL4__listen_options_defval); } current_location.update_lineno(297); /* GGSN_Tests.ttcn, line 297 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("GTP1C ConnectionID: "); const_cast< const Socket__API__Definitions::Result&>(res).connId().log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(298); /* GGSN_Tests.ttcn, line 298 */ GT__CT_component_g__peer__c.connId() = const_cast< const Socket__API__Definitions::Result&>(res).connId(); current_location.update_lineno(300); /* GGSN_Tests.ttcn, line 300 */ { Map_Params tmp_14(0); TTCN_Runtime::map_port(self, GT__CT_component_GTPU.get_name(), SYSTEM_COMPREF, "GTPU", tmp_14); } current_location.update_lineno(301); /* GGSN_Tests.ttcn, line 301 */ { Socket__API__Definitions::ProtoTuple tmp_16; tmp_16.udp() = NULL_VALUE; res = GTPv1U__CodecPort__CtrlFunct::f__GTPU__listen(GT__CT_component_GTPU, m__bind__ip__gtpu, 2152, tmp_16, GTPv1U__CodecPort__CtrlFunct::f__GTPU__listen_options_defval); } current_location.update_lineno(302); /* GGSN_Tests.ttcn, line 302 */ GT__CT_component_g__peer__u.connId() = const_cast< const Socket__API__Definitions::Result&>(res).connId(); current_location.update_lineno(304); /* GGSN_Tests.ttcn, line 304 */ GT__CT_component_g__restart__ctr = Osmocom__Types::f__rnd__octstring(1); current_location.update_lineno(305); /* GGSN_Tests.ttcn, line 305 */ GT__CT_component_g__c__seq__nr = Osmocom__Types::f__rnd__int(65535); current_location.update_lineno(306); /* GGSN_Tests.ttcn, line 306 */ GT__CT_component_g__d__seq__nr = Osmocom__Types::f__rnd__int(65535); current_location.update_lineno(308); /* GGSN_Tests.ttcn, line 308 */ if ((m__ggsn__impl == GGSN__Impl::GGSN__IMPL__OSMOCOM)) { current_location.update_lineno(309); /* GGSN_Tests.ttcn, line 309 */ f__init__vty(); current_location.update_lineno(310); /* GGSN_Tests.ttcn, line 310 */ f__vty__set__gpdu__txseq(BOOLEAN(GT__CT_component_use__gtpu__txseq)); current_location.update_lineno(311); /* GGSN_Tests.ttcn, line 311 */ f__vty__enable__echo__interval(INTEGER(GT__CT_component_g__use__echo__intval)); current_location.update_lineno(313); /* GGSN_Tests.ttcn, line 313 */ Osmocom__VTY__Functions::f__logp(GT__CT_component_GGSNVTY, (TTCN_Runtime::get_testcasename() + cs_20)); } else { current_location.update_lineno(314); /* GGSN_Tests.ttcn, line 314 */ if ((m__ggsn__impl == GGSN__Impl::GGSN__IMPL__OPEN5GS)) { current_location.update_lineno(315); /* GGSN_Tests.ttcn, line 315 */ f__init__diameter(TTCN_Runtime::get_testcasename()); } } } void start_f__init(const COMPONENT& component_reference) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_init("); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_init", text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__shutdown__helper() { TTCN_Location current_location("GGSN_Tests.ttcn", 319, TTCN_Location::LOCATION_FUNCTION, "f_shutdown_helper"); current_location.update_lineno(326); /* GGSN_Tests.ttcn, line 326 */ Osmocom__Types::f__sleep(int2float((mp__t3__response * mp__n3__requests))); current_location.update_lineno(327); /* GGSN_Tests.ttcn, line 327 */ TTCN_Runtime::setverdict(PASS); } void start_f__shutdown__helper(const COMPONENT& component_reference) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_shutdown_helper("); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_shutdown_helper", text_buf); TTCN_Runtime::send_start_component(text_buf); } alt_status pingpong_instance() { TTCN_Location current_location("GGSN_Tests.ttcn", 331, TTCN_Location::LOCATION_ALTSTEP, "pingpong"); current_location.update_lineno(332); /* GGSN_Tests.ttcn, line 332 */ GTPv1C__CodecPort::Gtp1cUnitdata ud; current_location.update_lineno(333); /* GGSN_Tests.ttcn, line 333 */ GTPv1U__CodecPort::Gtp1uUnitdata udu; alt_status ret_val = ALT_NO; current_location.update_lineno(334); /* GGSN_Tests.ttcn, line 334 */ if ((GT__CT_component_g__use__echo__intval > 0)) { current_location.update_lineno(334); /* GGSN_Tests.ttcn, line 334 */ switch (GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__PING(GTPv1C__CodecPort::Gtp1cPeer_template(ANY_VALUE)), &(ud), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(335); /* GGSN_Tests.ttcn, line 335 */ INTEGER seq(oct2int(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).gtpc().opt__part()().sequenceNumber())); current_location.update_lineno(336); /* GGSN_Tests.ttcn, line 336 */ GT__CT_component_GTPC.send(GTPv1C__Templates::ts__GTPC__PONG(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).peer(), seq, GT__CT_component_g__restart__ctr), NULL); current_location.update_lineno(337); /* GGSN_Tests.ttcn, line 337 */ return ALT_REPEAT; } case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } } current_location.update_lineno(339); /* GGSN_Tests.ttcn, line 339 */ if ((GT__CT_component_g__use__echo__intval == 0)) { current_location.update_lineno(339); /* GGSN_Tests.ttcn, line 339 */ switch (GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__PING(GTPv1C__CodecPort::Gtp1cPeer_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(340); /* GGSN_Tests.ttcn, line 340 */ Misc__Helpers::f__shutdown(cs_21, 340, FAIL, cs_22); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } } current_location.update_lineno(343); /* GGSN_Tests.ttcn, line 343 */ switch (GT__CT_component_T__default.timeout(NULL)) { case ALT_YES: { current_location.update_lineno(344); /* GGSN_Tests.ttcn, line 344 */ Misc__Helpers::f__shutdown(cs_21, 344, FAIL, cs_23); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } return ret_val; } void pingpong() { altstep_begin: boolean block_flag = FALSE; alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED; for ( ; ; ) { TTCN_Snapshot::take_new(block_flag); if (altstep_flag != ALT_NO) { altstep_flag = pingpong_instance(); if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return; else if (altstep_flag == ALT_REPEAT) goto altstep_begin; } if (default_flag != ALT_NO) { default_flag = TTCN_Default::try_altsteps(); if (default_flag == ALT_YES || default_flag == ALT_BREAK) return; else if (default_flag == ALT_REPEAT) goto altstep_begin; } if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep pingpong."); else block_flag = TRUE; } } Default_Base *activate_pingpong() { return new pingpong_Default(); } BITSTRING f__rnd__nsapi() { TTCN_Location current_location("GGSN_Tests.ttcn", 355, TTCN_Location::LOCATION_FUNCTION, "f_rnd_nsapi"); current_location.update_lineno(356); /* GGSN_Tests.ttcn, line 356 */ return int2bit(Osmocom__Types::f__rnd__int(16), 4); } OCTETSTRING f__rnd__tei() { TTCN_Location current_location("GGSN_Tests.ttcn", 360, TTCN_Location::LOCATION_FUNCTION, "f_rnd_tei"); current_location.update_lineno(361); /* GGSN_Tests.ttcn, line 361 */ { INTEGER tmp_21; { INTEGER INTEGER_tmp("4294967296"); tmp_21 = INTEGER_tmp; } return int2oct(Osmocom__Types::f__rnd__int(tmp_21), 4); } } OCTETSTRING f__rnd__imeisv() { TTCN_Location current_location("GGSN_Tests.ttcn", 365, TTCN_Location::LOCATION_FUNCTION, "f_rnd_imeisv"); current_location.update_lineno(366); /* GGSN_Tests.ttcn, line 366 */ return hex2oct(Osmocom__Types::f__rnd__hexstring(16, 10)); } PdpContext_template t__DefinePDP(const HEXSTRING& imsi, const CHARSTRING& msisdn, const OCTETSTRING& apn, const GTPC__Types::EndUserAddress& eua, const OCTETSTRING& ratType) { TTCN_Location current_location("GGSN_Tests.ttcn", 370, TTCN_Location::LOCATION_TEMPLATE, "t_DefinePDP"); PdpContext_template ret_val; ret_val.imsi() = imsi; ret_val.msisdn() = (os_4 + TCCEncoding__Functions::f__enc__TBCD(msisdn)); ret_val.nsapi() = f__rnd__nsapi(); ret_val.apn() = apn; ret_val.pco__req() = OMIT_VALUE; ret_val.eua() = eua; ret_val.teid() = f__rnd__tei(); ret_val.teic() = f__rnd__tei(); ret_val.ratType() = ratType; { GTPC__Types::UserLocationInformation_template& tmp_22 = ret_val.uli(); tmp_22.type__gtpc() = os_5; tmp_22.lengthf() = 0; tmp_22.geographicLocationType() = os_6; tmp_22.geographicLocation().geographicLocationCGI() = GTPv1C__Templates::ts__GeographicLocationCGI(HEXSTRING_template(hs_0), HEXSTRING_template(hs_1), OCTETSTRING_template(os_7), OCTETSTRING_template(os_8)); } ret_val.charging__char() = os_9; ret_val.imeisv() = f__rnd__imeisv(); ret_val.ms__tz() = GTPv1C__Templates::f__ts__MS__TimeZone(OCTETSTRING_template(os_10), BITSTRING_template(bs_2)); return ret_val; } void f__send__gtpc(const GTPv1C__CodecPort::Gtp1cUnitdata_template& data) { TTCN_Location current_location("GGSN_Tests.ttcn", 395, TTCN_Location::LOCATION_FUNCTION, "f_send_gtpc"); current_location.update_lineno(396); /* GGSN_Tests.ttcn, line 396 */ GT__CT_component_GTPC.send(data, NULL); current_location.update_lineno(397); /* GGSN_Tests.ttcn, line 397 */ { INTEGER tmp_23; tmp_23 = mod((GT__CT_component_g__c__seq__nr + 1), 65536); GT__CT_component_g__c__seq__nr = tmp_23; } } void start_f__send__gtpc(const COMPONENT& component_reference, const GTPv1C__CodecPort::Gtp1cUnitdata_template& data) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_send_gtpc("); data.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_send_gtpc", text_buf); data.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__send__gtpu(PdpContext& ctx, const OCTETSTRING& data) { TTCN_Location current_location("GGSN_Tests.ttcn", 401, TTCN_Location::LOCATION_FUNCTION, "f_send_gtpu"); current_location.update_lineno(402); /* GGSN_Tests.ttcn, line 402 */ if (GT__CT_component_use__gtpu__txseq) { current_location.update_lineno(403); /* GGSN_Tests.ttcn, line 403 */ GT__CT_component_GTPU.send(GTPv1U__Templates::ts__GTP1U__GPDU(GT__CT_component_g__peer__u, INTEGER_template(GT__CT_component_g__d__seq__nr), const_cast< const PdpContext&>(ctx).teid__remote(), data), NULL); current_location.update_lineno(404); /* GGSN_Tests.ttcn, line 404 */ { INTEGER tmp_24; tmp_24 = mod((GT__CT_component_g__d__seq__nr + 1), 65536); GT__CT_component_g__d__seq__nr = tmp_24; } } else { current_location.update_lineno(406); /* GGSN_Tests.ttcn, line 406 */ GT__CT_component_GTPU.send(GTPv1U__Templates::ts__GTP1U__GPDU(GT__CT_component_g__peer__u, INTEGER_template(OMIT_VALUE), const_cast< const PdpContext&>(ctx).teid__remote(), data), NULL); } } void start_f__send__gtpu(const COMPONENT& component_reference, PdpContext& ctx, const OCTETSTRING& data) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_send_gtpu("); ctx.log(); TTCN_Logger::log_event_str(", "); data.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_send_gtpu", text_buf); ctx.encode_text(text_buf); data.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__handle__create__req(PdpContext& ctx, const GTPv1C__CodecPort::Gtp1cUnitdata& ud, const OCTETSTRING_template& exp__cause) { TTCN_Location current_location("GGSN_Tests.ttcn", 410, TTCN_Location::LOCATION_FUNCTION, "f_handle_create_req"); current_location.update_lineno(411); /* GGSN_Tests.ttcn, line 411 */ GTPC__Types::CreatePDPContextResponse cpr(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).gtpc().gtpc__pdu().createPDPContextResponse()); current_location.update_lineno(413); /* GGSN_Tests.ttcn, line 413 */ if ((!(exp__cause.match(const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).cause().causevalue())))) { current_location.update_lineno(414); /* GGSN_Tests.ttcn, line 414 */ Misc__Helpers::f__shutdown(cs_21, 414, FAIL, cs_24); } current_location.update_lineno(418); /* GGSN_Tests.ttcn, line 418 */ if ((const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).cause().causevalue() == os_12)) { current_location.update_lineno(420); /* GGSN_Tests.ttcn, line 420 */ { boolean tmp_25; tmp_25 = GTPv1C__Templates::t__EuaIPv4(OCTETSTRING_template(ANY_VALUE)).match(const_cast< const PdpContext&>(ctx).eua()); if (tmp_25) tmp_25 = (!(GTPv1C__Templates::tr__EuaIPv4(OCTETSTRING_template(ANY_VALUE)).match(const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).endUserAddress()))); if (tmp_25) { current_location.update_lineno(422); /* GGSN_Tests.ttcn, line 422 */ Misc__Helpers::f__shutdown(cs_21, 422, FAIL, cs_25); } } current_location.update_lineno(425); /* GGSN_Tests.ttcn, line 425 */ { boolean tmp_26; tmp_26 = GTPv1C__Templates::t__EuaIPv6(OCTETSTRING_template(ANY_VALUE)).match(const_cast< const PdpContext&>(ctx).eua()); if (tmp_26) tmp_26 = (!(GTPv1C__Templates::tr__EuaIPv6(OCTETSTRING_template(ANY_VALUE)).match(const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).endUserAddress()))); if (tmp_26) { current_location.update_lineno(427); /* GGSN_Tests.ttcn, line 427 */ Misc__Helpers::f__shutdown(cs_21, 427, FAIL, cs_26); } } current_location.update_lineno(430); /* GGSN_Tests.ttcn, line 430 */ { boolean tmp_27; tmp_27 = GTPv1C__Templates::t__EuaIPv4v6(OCTETSTRING_template(ANY_VALUE), OCTETSTRING_template(ANY_VALUE)).match(const_cast< const PdpContext&>(ctx).eua()); if (tmp_27) tmp_27 = (!(GTPv1C__Templates::tr__EuaIPv4v6(OCTETSTRING_template(ANY_VALUE), OCTETSTRING_template(ANY_VALUE)).match(const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).endUserAddress()))); if (tmp_27) { current_location.update_lineno(432); /* GGSN_Tests.ttcn, line 432 */ Misc__Helpers::f__shutdown(cs_21, 432, FAIL, cs_27); } } } else { current_location.update_lineno(435); /* GGSN_Tests.ttcn, line 435 */ if ((const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).cause().causevalue() == os_13)) { current_location.update_lineno(438); /* GGSN_Tests.ttcn, line 438 */ { boolean tmp_33; { boolean tmp_28 = ctx.is_bound(); if(tmp_28) { const PdpContext& tmp_29 = ctx; const GTPC__Types::EndUserAddress& tmp_30 = tmp_29.eua(); tmp_28 = tmp_30.is_bound(); if(tmp_28) { const GTPC__Types::EndUserAddress& tmp_31 = tmp_30; const GTPC__Types::EndUserAddress__types& tmp_32 = tmp_31.endUserAddress(); tmp_28 = tmp_32.is_bound(); if (tmp_28) { tmp_28 = tmp_32.ischosen(GTPC__Types::EndUserAddress__types::ALT_endUserAddressIPv4andIPv6); } } } tmp_33 = (!(tmp_28)); } if (tmp_33) { current_location.update_lineno(439); /* GGSN_Tests.ttcn, line 439 */ Misc__Helpers::f__shutdown(cs_21, 439, FAIL, cs_28); } } current_location.update_lineno(442); /* GGSN_Tests.ttcn, line 442 */ { boolean tmp_35; { GTPC__Types::EndUserAddress_template tmp_34; tmp_34.set_type(VALUE_LIST, 2); tmp_34.list_item(0) = GTPv1C__Templates::tr__EuaIPv4(OCTETSTRING_template(ANY_VALUE)); tmp_34.list_item(1) = GTPv1C__Templates::tr__EuaIPv6(OCTETSTRING_template(ANY_VALUE)); tmp_35 = (!(tmp_34.match(const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).endUserAddress()))); } if (tmp_35) { current_location.update_lineno(443); /* GGSN_Tests.ttcn, line 443 */ Misc__Helpers::f__shutdown(cs_21, 443, FAIL, cs_29); } } } else { current_location.update_lineno(447); /* GGSN_Tests.ttcn, line 447 */ { boolean tmp_39; { boolean tmp_36 = cpr.is_bound(); if(tmp_36) { const OPTIONAL< GTPC__Types::EndUserAddress >& tmp_37 = cpr.endUserAddress(); switch (tmp_37.get_selection()) { case OPTIONAL_UNBOUND: tmp_36 = FALSE; break; case OPTIONAL_OMIT: tmp_36 = FALSE; break; default: { const GTPC__Types::EndUserAddress& tmp_38 = (const GTPC__Types::EndUserAddress&) tmp_37; tmp_36 = tmp_38.is_present(); break;} } } tmp_39 = tmp_36; } if (tmp_39) { current_location.update_lineno(448); /* GGSN_Tests.ttcn, line 448 */ Misc__Helpers::f__shutdown(cs_21, 448, FAIL, (cs_30 + oct2str(const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).cause().causevalue()))); } } current_location.update_lineno(451); /* GGSN_Tests.ttcn, line 451 */ TTCN_Runtime::setverdict(PASS); current_location.update_lineno(452); /* GGSN_Tests.ttcn, line 452 */ return; } } current_location.update_lineno(456); /* GGSN_Tests.ttcn, line 456 */ { boolean tmp_43; { boolean tmp_40 = ctx.is_bound(); if(tmp_40) { const OPTIONAL< GTPC__Types::ProtConfigOptions >& tmp_41 = ctx.pco__req(); switch (tmp_41.get_selection()) { case OPTIONAL_UNBOUND: tmp_40 = FALSE; break; case OPTIONAL_OMIT: tmp_40 = FALSE; break; default: { const GTPC__Types::ProtConfigOptions& tmp_42 = (const GTPC__Types::ProtConfigOptions&) tmp_41; tmp_40 = tmp_42.is_present(); break;} } } tmp_43 = tmp_40; } if (tmp_43) { current_location.update_lineno(457); /* GGSN_Tests.ttcn, line 457 */ { boolean tmp_44; tmp_44 = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.match(const_cast< const PdpContext&>(ctx).pco__req()); if (tmp_44) tmp_44 = (!(GTPv1C__Templates::tr__PCO__IPv4__DNS__CONT__resp(OCTETSTRING_template(ANY_VALUE)).match(const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).protConfigOptions()))); if (tmp_44) { current_location.update_lineno(459); /* GGSN_Tests.ttcn, line 459 */ Misc__Helpers::f__shutdown(cs_21, 459, FAIL, cs_31); } } current_location.update_lineno(462); /* GGSN_Tests.ttcn, line 462 */ { boolean tmp_45; tmp_45 = GTPv1C__Templates::ts__PCO__IPv6__DNS.match(const_cast< const PdpContext&>(ctx).pco__req()); if (tmp_45) tmp_45 = (!(GTPv1C__Templates::tr__PCO__IPv6__DNS__resp(OCTETSTRING_template(ANY_VALUE)).match(const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).protConfigOptions()))); if (tmp_45) { current_location.update_lineno(464); /* GGSN_Tests.ttcn, line 464 */ Misc__Helpers::f__shutdown(cs_21, 464, FAIL, cs_32); } } } } current_location.update_lineno(468); /* GGSN_Tests.ttcn, line 468 */ ctx.teid__remote() = const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).teidDataI()().teidDataI(); current_location.update_lineno(469); /* GGSN_Tests.ttcn, line 469 */ ctx.teic__remote() = const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).teidControlPlane()().teidControlPlane(); current_location.update_lineno(470); /* GGSN_Tests.ttcn, line 470 */ ctx.eua() = const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).endUserAddress(); current_location.update_lineno(471); /* GGSN_Tests.ttcn, line 471 */ ctx.pco__neg() = const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).protConfigOptions(); current_location.update_lineno(472); /* GGSN_Tests.ttcn, line 472 */ TTCN_Runtime::setverdict(PASS); } void start_f__handle__create__req(const COMPONENT& component_reference, PdpContext& ctx, const GTPv1C__CodecPort::Gtp1cUnitdata& ud, const OCTETSTRING_template& exp__cause) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_handle_create_req("); ctx.log(); TTCN_Logger::log_event_str(", "); ud.log(); TTCN_Logger::log_event_str(", "); exp__cause.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_handle_create_req", text_buf); ctx.encode_text(text_buf); ud.encode_text(text_buf); exp__cause.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__handle__update__req(PdpContext& ctx, const GTPv1C__CodecPort::Gtp1cUnitdata& ud, const OCTETSTRING& exp__cause) { TTCN_Location current_location("GGSN_Tests.ttcn", 475, TTCN_Location::LOCATION_FUNCTION, "f_handle_update_req"); current_location.update_lineno(476); /* GGSN_Tests.ttcn, line 476 */ GTPC__Types::UpdatePDPContextResponseGGSN upr(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).gtpc().gtpc__pdu().updatePDPContextResponse().updatePDPContextResponseGGSN()); current_location.update_lineno(477); /* GGSN_Tests.ttcn, line 477 */ { boolean tmp_50; tmp_50 = (exp__cause == os_12); if (tmp_50) tmp_50 = (exp__cause == const_cast< const GTPC__Types::UpdatePDPContextResponseGGSN&>(upr).cause().causevalue()); if (tmp_50) { current_location.update_lineno(478); /* GGSN_Tests.ttcn, line 478 */ ctx.teid__remote() = const_cast< const GTPC__Types::UpdatePDPContextResponseGGSN&>(upr).teidDataI()().teidDataI(); current_location.update_lineno(479); /* GGSN_Tests.ttcn, line 479 */ ctx.teic__remote() = const_cast< const GTPC__Types::UpdatePDPContextResponseGGSN&>(upr).teidControlPlane()().teidControlPlane(); current_location.update_lineno(480); /* GGSN_Tests.ttcn, line 480 */ { boolean tmp_56; { boolean tmp_53 = upr.is_bound(); if(tmp_53) { const OPTIONAL< GTPC__Types::ProtConfigOptions >& tmp_54 = upr.protConfigOptions(); switch (tmp_54.get_selection()) { case OPTIONAL_UNBOUND: tmp_53 = FALSE; break; case OPTIONAL_OMIT: tmp_53 = FALSE; break; default: { const GTPC__Types::ProtConfigOptions& tmp_55 = (const GTPC__Types::ProtConfigOptions&) tmp_54; tmp_53 = tmp_55.is_present(); break;} } } tmp_56 = tmp_53; } if (tmp_56) { current_location.update_lineno(481); /* GGSN_Tests.ttcn, line 481 */ ctx.pco__neg() = const_cast< const GTPC__Types::UpdatePDPContextResponseGGSN&>(upr).protConfigOptions(); } } current_location.update_lineno(483); /* GGSN_Tests.ttcn, line 483 */ TTCN_Runtime::setverdict(PASS); } else { current_location.update_lineno(484); /* GGSN_Tests.ttcn, line 484 */ boolean tmp_58; tmp_58 = (exp__cause != os_12); if (tmp_58) tmp_58 = (exp__cause == const_cast< const GTPC__Types::UpdatePDPContextResponseGGSN&>(upr).cause().causevalue()); if (tmp_58) { current_location.update_lineno(485); /* GGSN_Tests.ttcn, line 485 */ TTCN_Runtime::setverdict(PASS); } else { current_location.update_lineno(487); /* GGSN_Tests.ttcn, line 487 */ Misc__Helpers::f__shutdown(cs_21, 487, FAIL, cs_33); } } } } void start_f__handle__update__req(const COMPONENT& component_reference, PdpContext& ctx, const GTPv1C__CodecPort::Gtp1cUnitdata& ud, const OCTETSTRING& exp__cause) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_handle_update_req("); ctx.log(); TTCN_Logger::log_event_str(", "); ud.log(); TTCN_Logger::log_event_str(", "); exp__cause.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_handle_update_req", text_buf); ctx.encode_text(text_buf); ud.encode_text(text_buf); exp__cause.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } alt_status as__DIA__Gx__CCR_instance(const DIAMETER__Types::DCC__NONE__CC__Request__Type& req__type) { TTCN_Location current_location("GGSN_Tests.ttcn", 492, TTCN_Location::LOCATION_ALTSTEP, "as_DIA_Gx_CCR"); current_location.update_lineno(493); /* GGSN_Tests.ttcn, line 493 */ DIAMETER__Types::PDU__DIAMETER rx__dia; alt_status ret_val = ALT_NO; current_location.update_lineno(494); /* GGSN_Tests.ttcn, line 494 */ switch (GT__CT_component_Gx__UNIT.receive(DIAMETER__ts29__212__Templates::tr__DIA__Gx__CCR(DIAMETER__Types::DCC__NONE__CC__Request__Type_template(req__type)), &(rx__dia), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(495); /* GGSN_Tests.ttcn, line 495 */ DIAMETER__Types::AVP_template avp; current_location.update_lineno(496); /* GGSN_Tests.ttcn, line 496 */ OCTETSTRING sess__id; current_location.update_lineno(497); /* GGSN_Tests.ttcn, line 497 */ OCTETSTRING req__num; current_location.update_lineno(499); /* GGSN_Tests.ttcn, line 499 */ avp = DIAMETER__Templates::f__DIAMETER__get__avp(rx__dia, DIAMETER__Types::AVP__Code_template(DIAMETER__Types::c__AVP__Code__BASE__NONE__Session__Id)); current_location.update_lineno(500); /* GGSN_Tests.ttcn, line 500 */ sess__id = const_cast< const DIAMETER__Types::AVP_template&>(avp).avp__data().avp__BASE__NONE__Session__Id().valueof(); current_location.update_lineno(502); /* GGSN_Tests.ttcn, line 502 */ avp = DIAMETER__Templates::f__DIAMETER__get__avp(rx__dia, DIAMETER__Types::AVP__Code_template(DIAMETER__Types::c__AVP__Code__DCC__NONE__CC__Request__Number)); current_location.update_lineno(503); /* GGSN_Tests.ttcn, line 503 */ req__num = const_cast< const DIAMETER__Types::AVP_template&>(avp).avp__data().avp__DCC__NONE__CC__Request__Number().valueof(); current_location.update_lineno(505); /* GGSN_Tests.ttcn, line 505 */ GT__CT_component_Gx__UNIT.send(DIAMETER__ts29__212__Templates::ts__DIA__Gx__CCA(OCTETSTRING_template(const_cast< const DIAMETER__Types::PDU__DIAMETER&>(rx__dia).hop__by__hop__id()), OCTETSTRING_template(const_cast< const DIAMETER__Types::PDU__DIAMETER&>(rx__dia).end__to__end__id()), OCTETSTRING_template(sess__id), DIAMETER__Types::DCC__NONE__CC__Request__Type_template(req__type), OCTETSTRING_template(req__num)), NULL); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(508); /* GGSN_Tests.ttcn, line 508 */ switch (GT__CT_component_Gx__UNIT.receive(DIAMETER__Types::PDU__DIAMETER_template(ANY_VALUE), &(rx__dia), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(509); /* GGSN_Tests.ttcn, line 509 */ Misc__Helpers::f__shutdown(cs_21, 509, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received unexpected DIAMETER "),rx__dia.log(),TTCN_Logger::end_event_log2str())); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } return ret_val; } void as__DIA__Gx__CCR(const DIAMETER__Types::DCC__NONE__CC__Request__Type& req__type) { altstep_begin: boolean block_flag = FALSE; alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED; for ( ; ; ) { TTCN_Snapshot::take_new(block_flag); if (altstep_flag != ALT_NO) { altstep_flag = as__DIA__Gx__CCR_instance(req__type); if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return; else if (altstep_flag == ALT_REPEAT) goto altstep_begin; } if (default_flag != ALT_NO) { default_flag = TTCN_Default::try_altsteps(); if (default_flag == ALT_YES || default_flag == ALT_BREAK) return; else if (default_flag == ALT_REPEAT) goto altstep_begin; } if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_DIA_Gx_CCR."); else block_flag = TRUE; } } Default_Base *activate_as__DIA__Gx__CCR(const DIAMETER__Types::DCC__NONE__CC__Request__Type& req__type) { return new as__DIA__Gx__CCR_Default(req__type); } DIAMETER__Types::PDU__DIAMETER_template f__tr__DIA__Gy__CCR(const PdpContext_template& ctx, const DIAMETER__Types::DCC__NONE__CC__Request__Type& req__type) { TTCN_Location current_location("GGSN_Tests.ttcn", 514, TTCN_Location::LOCATION_FUNCTION, "f_tr_DIA_Gy_CCR"); current_location.update_lineno(517); /* GGSN_Tests.ttcn, line 517 */ DIAMETER__Types::PDU__DIAMETER_template tpl; current_location.update_lineno(518); /* GGSN_Tests.ttcn, line 518 */ CHARSTRING smf__origin__host(cs_34); current_location.update_lineno(519); /* GGSN_Tests.ttcn, line 519 */ OCTETSTRING_template imsi(ANY_VALUE); current_location.update_lineno(520); /* GGSN_Tests.ttcn, line 520 */ OCTETSTRING_template msisdn(ANY_VALUE); current_location.update_lineno(521); /* GGSN_Tests.ttcn, line 521 */ OCTETSTRING_template imeisv(ANY_VALUE); current_location.update_lineno(522); /* GGSN_Tests.ttcn, line 522 */ OCTETSTRING_template rat__type(ANY_VALUE); current_location.update_lineno(523); /* GGSN_Tests.ttcn, line 523 */ OCTETSTRING_template charging__char(ANY_VALUE); current_location.update_lineno(524); /* GGSN_Tests.ttcn, line 524 */ OCTETSTRING_template nsapi(ANY_VALUE); current_location.update_lineno(525); /* GGSN_Tests.ttcn, line 525 */ if ((!(ctx.get_istemplate_kind((const char*)cs_35)))) { current_location.update_lineno(526); /* GGSN_Tests.ttcn, line 526 */ PdpContext ctx__val(ctx.valueof()); current_location.update_lineno(527); /* GGSN_Tests.ttcn, line 527 */ imsi = char2oct(TCCEncoding__Functions::f__dec__TBCD(Osmocom__Types::imsi__hex2oct(const_cast< const PdpContext&>(ctx__val).imsi()))); current_location.update_lineno(528); /* GGSN_Tests.ttcn, line 528 */ msisdn = char2oct(TCCEncoding__Functions::f__dec__TBCD(substr(const_cast< const PdpContext&>(ctx__val).msisdn()(), 1, (const_cast< const PdpContext&>(ctx__val).msisdn()().lengthof() - 1)))); current_location.update_lineno(529); /* GGSN_Tests.ttcn, line 529 */ imeisv = char2oct(TCCEncoding__Functions::f__dec__TBCD(const_cast< const PdpContext&>(ctx__val).imeisv())); current_location.update_lineno(530); /* GGSN_Tests.ttcn, line 530 */ rat__type = const_cast< const PdpContext&>(ctx__val).ratType(); current_location.update_lineno(531); /* GGSN_Tests.ttcn, line 531 */ charging__char = char2oct(oct2str(const_cast< const PdpContext&>(ctx__val).charging__char()())); current_location.update_lineno(532); /* GGSN_Tests.ttcn, line 532 */ nsapi = char2oct(hex2str(bit2hex(const_cast< const PdpContext&>(ctx__val).nsapi()))); } { const DIAMETER__Types::DCC__NONE__CC__Request__Type &tmp_70 = req__type; current_location.update_lineno(535); /* GGSN_Tests.ttcn, line 535 */ if(tmp_70 == DIAMETER__Types::DCC__NONE__CC__Request__Type::INITIAL__REQUEST) goto tmp_69_0; current_location.update_lineno(579); /* GGSN_Tests.ttcn, line 579 */ if(tmp_70 == DIAMETER__Types::DCC__NONE__CC__Request__Type::UPDATE__REQUEST) goto tmp_69_1; current_location.update_lineno(625); /* GGSN_Tests.ttcn, line 625 */ if(tmp_70 == DIAMETER__Types::DCC__NONE__CC__Request__Type::TERMINATION__REQUEST) goto tmp_69_2; goto tmp_69_end; tmp_69_0: { current_location.update_lineno(536); /* GGSN_Tests.ttcn, line 536 */ { DIAMETER__Types::AVP__list_template tmp_72; tmp_72.set_type(SUPERSET_MATCH, 16); tmp_72.set_item(0) = DIAMETER__Templates::tr__AVP__SessionId(DIAMETER__Templates::tr__AVP__SessionId_session__id_defval); tmp_72.set_item(1) = DIAMETER__Templates::tr__AVP__OriginHost(CHARSTRING_template(smf__origin__host)); tmp_72.set_item(2) = DIAMETER__Templates::tr__AVP__OriginRealm(CHARSTRING_template(const_cast< const DIAMETER__Emulation::DIAMETER__conn__parameters&>(GT__CT_component_g__gy__pars).origin__realm())); tmp_72.set_item(3) = DIAMETER__Templates::tr__AVP__DestinationRealm(CHARSTRING_template(const_cast< const DIAMETER__Emulation::DIAMETER__conn__parameters&>(GT__CT_component_g__gy__pars).origin__realm())); tmp_72.set_item(4) = DIAMETER__Templates::tr__AVP__AuthAppId(OCTETSTRING_template(os_14)); tmp_72.set_item(5) = DIAMETER__Templates::tr__AVP__ServiceContextId(DIAMETER__Templates::tr__AVP__ServiceContextId_id_defval); tmp_72.set_item(6) = DIAMETER__Templates::tr__AVP__CcReqType(DIAMETER__Types::DCC__NONE__CC__Request__Type_template(req__type)); tmp_72.set_item(7) = DIAMETER__Templates::tr__AVP__CcReqNum(OCTETSTRING_template(ANY_VALUE)); tmp_72.set_item(8) = DIAMETER__Templates::tr__AVP__EventTimestamp(OCTETSTRING_template(ANY_VALUE)); { DIAMETER__Types::AVP__list_template tmp_73; tmp_73.set_size(2); tmp_73[0] = DIAMETER__Templates::tr__AVP__SubcrIdType(DIAMETER__Types::DCC__NONE__Subscription__Id__Type_template(DIAMETER__Types::DCC__NONE__Subscription__Id__Type::END__USER__IMSI)); tmp_73[1] = DIAMETER__Templates::tr__AVP__SubcrIdData(imsi); tmp_72.set_item(9) = DIAMETER__Templates::tr__AVP__SubcrId(tmp_73); } { DIAMETER__Types::AVP__list_template tmp_74; tmp_74.set_size(2); tmp_74[0] = DIAMETER__Templates::tr__AVP__SubcrIdType(DIAMETER__Types::DCC__NONE__Subscription__Id__Type_template(DIAMETER__Types::DCC__NONE__Subscription__Id__Type::END__USER__E164)); tmp_74[1] = DIAMETER__Templates::tr__AVP__SubcrIdData(msisdn); tmp_72.set_item(10) = DIAMETER__Templates::tr__AVP__SubcrId(tmp_74); } tmp_72.set_item(11) = DIAMETER__Templates::tr__AVP__RequestedAction(DIAMETER__Types::DCC__NONE__Requested__Action_template(DIAMETER__Types::DCC__NONE__Requested__Action::DIRECT__DEBITING)); tmp_72.set_item(12) = DIAMETER__Templates::tr__AVP__3GPP__AoCRequestType(DIAMETER__Templates::tr__AVP__3GPP__AoCRequestType_t_defval); tmp_72.set_item(13) = DIAMETER__Templates::tr__AVP__MultipleServicesIndicator(DIAMETER__Templates::tr__AVP__MultipleServicesIndicator_t_defval); { DIAMETER__Types::AVP__list_template tmp_75; tmp_75.set_type(SUPERSET_MATCH, 2); tmp_75.set_item(0) = DIAMETER__Templates::tr__AVP__Requested__Service__Unit(DIAMETER__Templates::tr__AVP__Requested__Service__Unit_content_defval); tmp_75.set_item(1) = DIAMETER__Templates::tr__AVP__PCC__3GPP__QoS__Information(DIAMETER__Templates::tr__AVP__PCC__3GPP__QoS__Information_list_defval); tmp_72.set_item(14) = DIAMETER__Templates::tr__AVP__Multiple__Services__Credit__Control(tmp_75); } { DIAMETER__Types::AVP__list_template tmp_76; tmp_76.set_type(SUPERSET_MATCH, 1); { DIAMETER__Types::AVP__list_template tmp_77; tmp_77.set_type(SUPERSET_MATCH, 14); tmp_77.set_item(0) = DIAMETER__Templates::tr__AVP__3GPP__ChargingId(DIAMETER__Templates::tr__AVP__3GPP__ChargingId_id_defval); { DIAMETER__Types::GI__3GPP__3GPP__PDP__Type_template tmp_78; tmp_78.set_type(VALUE_LIST, 3); tmp_78.list_item(0) = DIAMETER__Types::GI__3GPP__3GPP__PDP__Type::IPv4; tmp_78.list_item(1) = DIAMETER__Types::GI__3GPP__3GPP__PDP__Type::IPv6; tmp_78.list_item(2) = DIAMETER__Types::GI__3GPP__3GPP__PDP__Type::IPv4v6; tmp_77.set_item(1) = DIAMETER__Templates::tr__AVP__3GPP__PDPType(tmp_78); } { DIAMETER__Types::AddressType_template tmp_79; tmp_79.set_type(VALUE_LIST, 2); tmp_79.list_item(0) = DIAMETER__Types::AddressType::IP; tmp_79.list_item(1) = DIAMETER__Types::AddressType::IP6; tmp_77.set_item(2) = DIAMETER__Templates::tr__AVP__3GPP__PDPAddress(DIAMETER__Templates::tr__AVP__Address(tmp_79, OCTETSTRING_template(ANY_VALUE))); } tmp_77.set_item(3) = DIAMETER__Templates::tr__AVP__3GPP__SGSNAddress(DIAMETER__Templates::tr__AVP__Address(DIAMETER__Types::AddressType_template(DIAMETER__Types::AddressType::IP), OCTETSTRING_template(Native__Functions::f__inet__addr(m__bind__ip__gtpc)))); tmp_77.set_item(4) = DIAMETER__Templates::tr__AVP__3GPP__GGSNAddress(DIAMETER__Templates::tr__AVP__Address(DIAMETER__Types::AddressType_template(DIAMETER__Types::AddressType::IP), OCTETSTRING_template(Native__Functions::f__inet__addr(m__ggsn__ip__gtpc)))); tmp_77.set_item(5) = DIAMETER__Templates::tr__AVP__3GPP__CalledStationId(DIAMETER__Templates::tr__AVP__3GPP__CalledStationId_id_defval); tmp_77.set_item(6) = DIAMETER__Templates::tr__AVP__3GPP__SelectionMode(DIAMETER__Templates::tr__AVP__3GPP__SelectionMode_sm_defval); tmp_77.set_item(7) = DIAMETER__Templates::tr__AVP__3GPP__ChargingCharacteristics(charging__char); tmp_77.set_item(8) = DIAMETER__Templates::tr__AVP__3GPP__SGSNMCCMNC(DIAMETER__Templates::tr__AVP__3GPP__SGSNMCCMNC_smn_defval); tmp_77.set_item(9) = DIAMETER__Templates::tr__AVP__3GPP__NSAPI(nsapi); tmp_77.set_item(10) = DIAMETER__Templates::tr__AVP__3GPP__MS__TimeZone(DIAMETER__Templates::tr__AVP__3GPP__MS__TimeZone_ms__tz_defval); tmp_77.set_item(11) = DIAMETER__Templates::tr__AVP__3GPP__ULI(DIAMETER__Templates::tr__AVP__3GPP__ULI_uli_defval); tmp_77.set_item(12) = DIAMETER__ts29__272__Templates::tr__AVP__GI__3GPP__RatType(rat__type); { DIAMETER__Types::AVP__list_template tmp_80; tmp_80.set_size(2); tmp_80[0] = DIAMETER__Templates::tr__AVP__UserEquipmentInfoType(DIAMETER__Types::DCC__NONE__User__Equipment__Info__Type_template(DIAMETER__Types::DCC__NONE__User__Equipment__Info__Type::IMEISV)); tmp_80[1] = DIAMETER__Templates::tr__AVP__UserEquipmentInfoValue(imeisv); tmp_77.set_item(13) = DIAMETER__Templates::tr__AVP__UserEquipmentInfo(tmp_80); } tmp_76.set_item(0) = DIAMETER__Templates::tr__AVP__3GPP__PSInformation(tmp_77); } tmp_72.set_item(15) = DIAMETER__Templates::tr__AVP__3GPP__ServiceInformation(tmp_76); } tpl = DIAMETER__Templates::tr__DIAMETER(BITSTRING_template(bs_3), DIAMETER__Types::Command__Code_template(DIAMETER__Types::Command__Code::Credit__Control), DIAMETER__Templates::tr__DIAMETER_app__id_defval, DIAMETER__Templates::tr__DIAMETER_hbh__id_defval, DIAMETER__Templates::tr__DIAMETER_ete__id_defval, tmp_72); } goto tmp_69_end; } tmp_69_1: { current_location.update_lineno(580); /* GGSN_Tests.ttcn, line 580 */ { DIAMETER__Types::AVP__list_template tmp_82; tmp_82.set_type(SUPERSET_MATCH, 16); tmp_82.set_item(0) = DIAMETER__Templates::tr__AVP__SessionId(DIAMETER__Templates::tr__AVP__SessionId_session__id_defval); tmp_82.set_item(1) = DIAMETER__Templates::tr__AVP__OriginHost(CHARSTRING_template(smf__origin__host)); tmp_82.set_item(2) = DIAMETER__Templates::tr__AVP__OriginRealm(CHARSTRING_template(const_cast< const DIAMETER__Emulation::DIAMETER__conn__parameters&>(GT__CT_component_g__gy__pars).origin__realm())); tmp_82.set_item(3) = DIAMETER__Templates::tr__AVP__DestinationRealm(CHARSTRING_template(const_cast< const DIAMETER__Emulation::DIAMETER__conn__parameters&>(GT__CT_component_g__gy__pars).origin__realm())); tmp_82.set_item(4) = DIAMETER__Templates::tr__AVP__AuthAppId(OCTETSTRING_template(os_14)); tmp_82.set_item(5) = DIAMETER__Templates::tr__AVP__ServiceContextId(DIAMETER__Templates::tr__AVP__ServiceContextId_id_defval); tmp_82.set_item(6) = DIAMETER__Templates::tr__AVP__CcReqType(DIAMETER__Types::DCC__NONE__CC__Request__Type_template(req__type)); tmp_82.set_item(7) = DIAMETER__Templates::tr__AVP__CcReqNum(OCTETSTRING_template(ANY_VALUE)); tmp_82.set_item(8) = DIAMETER__Templates::tr__AVP__DestinationHost(CHARSTRING_template(ANY_VALUE)); tmp_82.set_item(9) = DIAMETER__Templates::tr__AVP__EventTimestamp(OCTETSTRING_template(ANY_VALUE)); { DIAMETER__Types::AVP__list_template tmp_83; tmp_83.set_size(2); tmp_83[0] = DIAMETER__Templates::tr__AVP__SubcrIdType(DIAMETER__Types::DCC__NONE__Subscription__Id__Type_template(DIAMETER__Types::DCC__NONE__Subscription__Id__Type::END__USER__IMSI)); tmp_83[1] = DIAMETER__Templates::tr__AVP__SubcrIdData(imsi); tmp_82.set_item(10) = DIAMETER__Templates::tr__AVP__SubcrId(tmp_83); } { DIAMETER__Types::AVP__list_template tmp_84; tmp_84.set_size(2); tmp_84[0] = DIAMETER__Templates::tr__AVP__SubcrIdType(DIAMETER__Types::DCC__NONE__Subscription__Id__Type_template(DIAMETER__Types::DCC__NONE__Subscription__Id__Type::END__USER__E164)); tmp_84[1] = DIAMETER__Templates::tr__AVP__SubcrIdData(msisdn); tmp_82.set_item(11) = DIAMETER__Templates::tr__AVP__SubcrId(tmp_84); } tmp_82.set_item(12) = DIAMETER__Templates::tr__AVP__RequestedAction(DIAMETER__Types::DCC__NONE__Requested__Action_template(DIAMETER__Types::DCC__NONE__Requested__Action::DIRECT__DEBITING)); tmp_82.set_item(13) = DIAMETER__Templates::tr__AVP__3GPP__AoCRequestType(DIAMETER__Templates::tr__AVP__3GPP__AoCRequestType_t_defval); { DIAMETER__Types::AVP__list_template tmp_85; tmp_85.set_type(SUPERSET_MATCH, 3); tmp_85.set_item(0) = DIAMETER__Templates::tr__AVP__Requested__Service__Unit(DIAMETER__Templates::tr__AVP__Requested__Service__Unit_content_defval); tmp_85.set_item(1) = DIAMETER__Templates::tr__AVP__Used__Service__Unit(DIAMETER__Templates::tr__AVP__Used__Service__Unit_content_defval); tmp_85.set_item(2) = DIAMETER__Templates::tr__AVP__PCC__3GPP__QoS__Information(DIAMETER__Templates::tr__AVP__PCC__3GPP__QoS__Information_list_defval); tmp_82.set_item(14) = DIAMETER__Templates::tr__AVP__Multiple__Services__Credit__Control(tmp_85); } { DIAMETER__Types::AVP__list_template tmp_86; tmp_86.set_type(SUPERSET_MATCH, 1); { DIAMETER__Types::AVP__list_template tmp_87; tmp_87.set_type(SUPERSET_MATCH, 13); tmp_87.set_item(0) = DIAMETER__Templates::tr__AVP__3GPP__ChargingId(DIAMETER__Templates::tr__AVP__3GPP__ChargingId_id_defval); { DIAMETER__Types::AddressType_template tmp_88; tmp_88.set_type(VALUE_LIST, 2); tmp_88.list_item(0) = DIAMETER__Types::AddressType::IP; tmp_88.list_item(1) = DIAMETER__Types::AddressType::IP6; tmp_87.set_item(1) = DIAMETER__Templates::tr__AVP__3GPP__PDPAddress(DIAMETER__Templates::tr__AVP__Address(tmp_88, OCTETSTRING_template(ANY_VALUE))); } tmp_87.set_item(2) = DIAMETER__Templates::tr__AVP__3GPP__SGSNAddress(DIAMETER__Templates::tr__AVP__Address(DIAMETER__Types::AddressType_template(DIAMETER__Types::AddressType::IP), OCTETSTRING_template(Native__Functions::f__inet__addr(m__bind__ip__gtpc)))); tmp_87.set_item(3) = DIAMETER__Templates::tr__AVP__3GPP__GGSNAddress(DIAMETER__Templates::tr__AVP__Address(DIAMETER__Types::AddressType_template(DIAMETER__Types::AddressType::IP), OCTETSTRING_template(Native__Functions::f__inet__addr(m__ggsn__ip__gtpc)))); tmp_87.set_item(4) = DIAMETER__Templates::tr__AVP__3GPP__CalledStationId(DIAMETER__Templates::tr__AVP__3GPP__CalledStationId_id_defval); tmp_87.set_item(5) = DIAMETER__Templates::tr__AVP__3GPP__SelectionMode(DIAMETER__Templates::tr__AVP__3GPP__SelectionMode_sm_defval); tmp_87.set_item(6) = DIAMETER__Templates::tr__AVP__3GPP__ChargingCharacteristics(charging__char); tmp_87.set_item(7) = DIAMETER__Templates::tr__AVP__3GPP__SGSNMCCMNC(DIAMETER__Templates::tr__AVP__3GPP__SGSNMCCMNC_smn_defval); tmp_87.set_item(8) = DIAMETER__Templates::tr__AVP__3GPP__NSAPI(nsapi); tmp_87.set_item(9) = DIAMETER__Templates::tr__AVP__3GPP__MS__TimeZone(DIAMETER__Templates::tr__AVP__3GPP__MS__TimeZone_ms__tz_defval); tmp_87.set_item(10) = DIAMETER__Templates::tr__AVP__3GPP__ULI(DIAMETER__Templates::tr__AVP__3GPP__ULI_uli_defval); tmp_87.set_item(11) = DIAMETER__ts29__272__Templates::tr__AVP__GI__3GPP__RatType(rat__type); { DIAMETER__Types::AVP__list_template tmp_89; tmp_89.set_size(2); tmp_89[0] = DIAMETER__Templates::tr__AVP__UserEquipmentInfoType(DIAMETER__Types::DCC__NONE__User__Equipment__Info__Type_template(DIAMETER__Types::DCC__NONE__User__Equipment__Info__Type::IMEISV)); tmp_89[1] = DIAMETER__Templates::tr__AVP__UserEquipmentInfoValue(imeisv); tmp_87.set_item(12) = DIAMETER__Templates::tr__AVP__UserEquipmentInfo(tmp_89); } tmp_86.set_item(0) = DIAMETER__Templates::tr__AVP__3GPP__PSInformation(tmp_87); } tmp_82.set_item(15) = DIAMETER__Templates::tr__AVP__3GPP__ServiceInformation(tmp_86); } tpl = DIAMETER__Templates::tr__DIAMETER(BITSTRING_template(bs_3), DIAMETER__Types::Command__Code_template(DIAMETER__Types::Command__Code::Credit__Control), DIAMETER__Templates::tr__DIAMETER_app__id_defval, DIAMETER__Templates::tr__DIAMETER_hbh__id_defval, DIAMETER__Templates::tr__DIAMETER_ete__id_defval, tmp_82); } goto tmp_69_end; } tmp_69_2: { current_location.update_lineno(626); /* GGSN_Tests.ttcn, line 626 */ { DIAMETER__Types::AVP__list_template tmp_91; tmp_91.set_type(SUPERSET_MATCH, 17); tmp_91.set_item(0) = DIAMETER__Templates::tr__AVP__SessionId(DIAMETER__Templates::tr__AVP__SessionId_session__id_defval); tmp_91.set_item(1) = DIAMETER__Templates::tr__AVP__OriginHost(CHARSTRING_template(smf__origin__host)); tmp_91.set_item(2) = DIAMETER__Templates::tr__AVP__OriginRealm(CHARSTRING_template(const_cast< const DIAMETER__Emulation::DIAMETER__conn__parameters&>(GT__CT_component_g__gy__pars).origin__realm())); tmp_91.set_item(3) = DIAMETER__Templates::tr__AVP__DestinationRealm(CHARSTRING_template(const_cast< const DIAMETER__Emulation::DIAMETER__conn__parameters&>(GT__CT_component_g__gy__pars).origin__realm())); tmp_91.set_item(4) = DIAMETER__Templates::tr__AVP__AuthAppId(OCTETSTRING_template(os_14)); tmp_91.set_item(5) = DIAMETER__Templates::tr__AVP__ServiceContextId(DIAMETER__Templates::tr__AVP__ServiceContextId_id_defval); tmp_91.set_item(6) = DIAMETER__Templates::tr__AVP__CcReqType(DIAMETER__Types::DCC__NONE__CC__Request__Type_template(req__type)); tmp_91.set_item(7) = DIAMETER__Templates::tr__AVP__CcReqNum(OCTETSTRING_template(ANY_VALUE)); tmp_91.set_item(8) = DIAMETER__Templates::tr__AVP__DestinationHost(CHARSTRING_template(ANY_VALUE)); tmp_91.set_item(9) = DIAMETER__Templates::tr__AVP__EventTimestamp(OCTETSTRING_template(ANY_VALUE)); { DIAMETER__Types::AVP__list_template tmp_92; tmp_92.set_size(2); tmp_92[0] = DIAMETER__Templates::tr__AVP__SubcrIdType(DIAMETER__Types::DCC__NONE__Subscription__Id__Type_template(DIAMETER__Types::DCC__NONE__Subscription__Id__Type::END__USER__IMSI)); tmp_92[1] = DIAMETER__Templates::tr__AVP__SubcrIdData(imsi); tmp_91.set_item(10) = DIAMETER__Templates::tr__AVP__SubcrId(tmp_92); } { DIAMETER__Types::AVP__list_template tmp_93; tmp_93.set_size(2); tmp_93[0] = DIAMETER__Templates::tr__AVP__SubcrIdType(DIAMETER__Types::DCC__NONE__Subscription__Id__Type_template(DIAMETER__Types::DCC__NONE__Subscription__Id__Type::END__USER__E164)); tmp_93[1] = DIAMETER__Templates::tr__AVP__SubcrIdData(msisdn); tmp_91.set_item(11) = DIAMETER__Templates::tr__AVP__SubcrId(tmp_93); } tmp_91.set_item(12) = DIAMETER__Templates::tr__AVP__TerminationCause(DIAMETER__Types::BASE__NONE__Termination__Cause_template(ANY_VALUE)); tmp_91.set_item(13) = DIAMETER__Templates::tr__AVP__RequestedAction(DIAMETER__Types::DCC__NONE__Requested__Action_template(DIAMETER__Types::DCC__NONE__Requested__Action::DIRECT__DEBITING)); tmp_91.set_item(14) = DIAMETER__Templates::tr__AVP__3GPP__AoCRequestType(DIAMETER__Templates::tr__AVP__3GPP__AoCRequestType_t_defval); { DIAMETER__Types::AVP__list_template tmp_94; tmp_94.set_type(SUPERSET_MATCH, 3); tmp_94.set_item(0) = DIAMETER__Templates::tr__AVP__Used__Service__Unit(DIAMETER__Templates::tr__AVP__Used__Service__Unit_content_defval); tmp_94.set_item(1) = DIAMETER__Templates::tr__AVP__3GPP__Reporting__Reason(DIAMETER__Types::DCA__3GPP__Reporting__Reason_template(DIAMETER__Types::DCA__3GPP__Reporting__Reason::FINAL)); tmp_94.set_item(2) = DIAMETER__Templates::tr__AVP__PCC__3GPP__QoS__Information(DIAMETER__Templates::tr__AVP__PCC__3GPP__QoS__Information_list_defval); tmp_91.set_item(15) = DIAMETER__Templates::tr__AVP__Multiple__Services__Credit__Control(tmp_94); } { DIAMETER__Types::AVP__list_template tmp_95; tmp_95.set_type(SUPERSET_MATCH, 1); { DIAMETER__Types::AVP__list_template tmp_96; tmp_96.set_type(SUPERSET_MATCH, 13); tmp_96.set_item(0) = DIAMETER__Templates::tr__AVP__3GPP__ChargingId(DIAMETER__Templates::tr__AVP__3GPP__ChargingId_id_defval); { DIAMETER__Types::AddressType_template tmp_97; tmp_97.set_type(VALUE_LIST, 2); tmp_97.list_item(0) = DIAMETER__Types::AddressType::IP; tmp_97.list_item(1) = DIAMETER__Types::AddressType::IP6; tmp_96.set_item(1) = DIAMETER__Templates::tr__AVP__3GPP__PDPAddress(DIAMETER__Templates::tr__AVP__Address(tmp_97, OCTETSTRING_template(ANY_VALUE))); } tmp_96.set_item(2) = DIAMETER__Templates::tr__AVP__3GPP__SGSNAddress(DIAMETER__Templates::tr__AVP__Address(DIAMETER__Types::AddressType_template(DIAMETER__Types::AddressType::IP), OCTETSTRING_template(Native__Functions::f__inet__addr(m__bind__ip__gtpc)))); tmp_96.set_item(3) = DIAMETER__Templates::tr__AVP__3GPP__GGSNAddress(DIAMETER__Templates::tr__AVP__Address(DIAMETER__Types::AddressType_template(DIAMETER__Types::AddressType::IP), OCTETSTRING_template(Native__Functions::f__inet__addr(m__ggsn__ip__gtpc)))); tmp_96.set_item(4) = DIAMETER__Templates::tr__AVP__3GPP__CalledStationId(DIAMETER__Templates::tr__AVP__3GPP__CalledStationId_id_defval); tmp_96.set_item(5) = DIAMETER__Templates::tr__AVP__3GPP__SelectionMode(DIAMETER__Templates::tr__AVP__3GPP__SelectionMode_sm_defval); tmp_96.set_item(6) = DIAMETER__Templates::tr__AVP__3GPP__ChargingCharacteristics(charging__char); tmp_96.set_item(7) = DIAMETER__Templates::tr__AVP__3GPP__SGSNMCCMNC(DIAMETER__Templates::tr__AVP__3GPP__SGSNMCCMNC_smn_defval); tmp_96.set_item(8) = DIAMETER__Templates::tr__AVP__3GPP__NSAPI(nsapi); tmp_96.set_item(9) = DIAMETER__Templates::tr__AVP__3GPP__MS__TimeZone(DIAMETER__Templates::tr__AVP__3GPP__MS__TimeZone_ms__tz_defval); tmp_96.set_item(10) = DIAMETER__Templates::tr__AVP__3GPP__ULI(DIAMETER__Templates::tr__AVP__3GPP__ULI_uli_defval); tmp_96.set_item(11) = DIAMETER__ts29__272__Templates::tr__AVP__GI__3GPP__RatType(rat__type); { DIAMETER__Types::AVP__list_template tmp_98; tmp_98.set_size(2); tmp_98[0] = DIAMETER__Templates::tr__AVP__UserEquipmentInfoType(DIAMETER__Types::DCC__NONE__User__Equipment__Info__Type_template(DIAMETER__Types::DCC__NONE__User__Equipment__Info__Type::IMEISV)); tmp_98[1] = DIAMETER__Templates::tr__AVP__UserEquipmentInfoValue(imeisv); tmp_96.set_item(12) = DIAMETER__Templates::tr__AVP__UserEquipmentInfo(tmp_98); } tmp_95.set_item(0) = DIAMETER__Templates::tr__AVP__3GPP__PSInformation(tmp_96); } tmp_91.set_item(16) = DIAMETER__Templates::tr__AVP__3GPP__ServiceInformation(tmp_95); } tpl = DIAMETER__Templates::tr__DIAMETER(BITSTRING_template(bs_3), DIAMETER__Types::Command__Code_template(DIAMETER__Types::Command__Code::Credit__Control), DIAMETER__Templates::tr__DIAMETER_app__id_defval, DIAMETER__Templates::tr__DIAMETER_hbh__id_defval, DIAMETER__Templates::tr__DIAMETER_ete__id_defval, tmp_91); } goto tmp_69_end; } tmp_69_end: /* empty */; } current_location.update_lineno(673); /* GGSN_Tests.ttcn, line 673 */ return tpl; } void start_f__tr__DIA__Gy__CCR(const COMPONENT& component_reference, const PdpContext_template& ctx, const DIAMETER__Types::DCC__NONE__CC__Request__Type& req__type) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_tr_DIA_Gy_CCR("); ctx.log(); TTCN_Logger::log_event_str(", "); req__type.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_tr_DIA_Gy_CCR", text_buf); ctx.encode_text(text_buf); req__type.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } alt_status as__DIA__Gy__CCR_instance(const PdpContext_template& ctx, const DIAMETER__Types::DCC__NONE__CC__Request__Type& req__type) { TTCN_Location current_location("GGSN_Tests.ttcn", 676, TTCN_Location::LOCATION_ALTSTEP, "as_DIA_Gy_CCR"); alt_status ret_val = ALT_NO; current_location.update_lineno(677); /* GGSN_Tests.ttcn, line 677 */ switch (GT__CT_component_Gy__UNIT.receive(f__tr__DIA__Gy__CCR(ctx, req__type), &(GT__CT_component_g__rx__gy), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(678); /* GGSN_Tests.ttcn, line 678 */ DIAMETER__Types::PDU__DIAMETER_template tx__dia; current_location.update_lineno(679); /* GGSN_Tests.ttcn, line 679 */ DIAMETER__Types::AVP_template avp; current_location.update_lineno(680); /* GGSN_Tests.ttcn, line 680 */ OCTETSTRING sess__id; current_location.update_lineno(681); /* GGSN_Tests.ttcn, line 681 */ OCTETSTRING req__num; current_location.update_lineno(683); /* GGSN_Tests.ttcn, line 683 */ avp = DIAMETER__Templates::f__DIAMETER__get__avp(GT__CT_component_g__rx__gy, DIAMETER__Types::AVP__Code_template(DIAMETER__Types::c__AVP__Code__BASE__NONE__Session__Id)); current_location.update_lineno(684); /* GGSN_Tests.ttcn, line 684 */ sess__id = const_cast< const DIAMETER__Types::AVP_template&>(avp).avp__data().avp__BASE__NONE__Session__Id().valueof(); current_location.update_lineno(686); /* GGSN_Tests.ttcn, line 686 */ avp = DIAMETER__Templates::f__DIAMETER__get__avp(GT__CT_component_g__rx__gy, DIAMETER__Types::AVP__Code_template(DIAMETER__Types::c__AVP__Code__DCC__NONE__CC__Request__Number)); current_location.update_lineno(687); /* GGSN_Tests.ttcn, line 687 */ req__num = const_cast< const DIAMETER__Types::AVP_template&>(avp).avp__data().avp__DCC__NONE__CC__Request__Number().valueof(); current_location.update_lineno(688); /* GGSN_Tests.ttcn, line 688 */ if ((GT__CT_component_g__gy__validity__time > 0)) { current_location.update_lineno(689); /* GGSN_Tests.ttcn, line 689 */ if ((GT__CT_component_g__gy__volume__quota > 0)) { current_location.update_lineno(690); /* GGSN_Tests.ttcn, line 690 */ tx__dia = DIAMETER__ts32__299__Templates::ts__DIA__Gy__CCA__ValidityTimeVolumeThreshold(OCTETSTRING_template(const_cast< const DIAMETER__Types::PDU__DIAMETER&>(GT__CT_component_g__rx__gy).hop__by__hop__id()), OCTETSTRING_template(const_cast< const DIAMETER__Types::PDU__DIAMETER&>(GT__CT_component_g__rx__gy).end__to__end__id()), OCTETSTRING_template(sess__id), DIAMETER__Types::DCC__NONE__CC__Request__Type_template(req__type), OCTETSTRING_template(req__num), GT__CT_component_g__gy__validity__time, GT__CT_component_g__gy__volume__quota, GT__CT_component_g__gy__volume__threshold); } else { current_location.update_lineno(696); /* GGSN_Tests.ttcn, line 696 */ tx__dia = DIAMETER__ts32__299__Templates::ts__DIA__Gy__CCA__ValidityTime(OCTETSTRING_template(const_cast< const DIAMETER__Types::PDU__DIAMETER&>(GT__CT_component_g__rx__gy).hop__by__hop__id()), OCTETSTRING_template(const_cast< const DIAMETER__Types::PDU__DIAMETER&>(GT__CT_component_g__rx__gy).end__to__end__id()), OCTETSTRING_template(sess__id), DIAMETER__Types::DCC__NONE__CC__Request__Type_template(req__type), OCTETSTRING_template(req__num), GT__CT_component_g__gy__validity__time); } } else { current_location.update_lineno(702); /* GGSN_Tests.ttcn, line 702 */ tx__dia = DIAMETER__ts32__299__Templates::ts__DIA__Gy__CCA(OCTETSTRING_template(const_cast< const DIAMETER__Types::PDU__DIAMETER&>(GT__CT_component_g__rx__gy).hop__by__hop__id()), OCTETSTRING_template(const_cast< const DIAMETER__Types::PDU__DIAMETER&>(GT__CT_component_g__rx__gy).end__to__end__id()), OCTETSTRING_template(sess__id), DIAMETER__Templates::DIAMETER__Resultcode_template(DIAMETER__Templates::DIAMETER__Resultcode::DIAMETER__SUCCESS), DIAMETER__Types::DCC__NONE__CC__Request__Type_template(req__type), OCTETSTRING_template(req__num)); } current_location.update_lineno(705); /* GGSN_Tests.ttcn, line 705 */ GT__CT_component_Gy__UNIT.send(tx__dia, NULL); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(707); /* GGSN_Tests.ttcn, line 707 */ switch (GT__CT_component_Gy__UNIT.receive(DIAMETER__Types::PDU__DIAMETER_template(ANY_VALUE), &(GT__CT_component_g__rx__gy), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(708); /* GGSN_Tests.ttcn, line 708 */ Misc__Helpers::f__shutdown(cs_21, 708, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received unexpected DIAMETER Gy"),GT__CT_component_g__rx__gy.log(),TTCN_Logger::end_event_log2str())); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } return ret_val; } void as__DIA__Gy__CCR(const PdpContext_template& ctx, const DIAMETER__Types::DCC__NONE__CC__Request__Type& req__type) { altstep_begin: boolean block_flag = FALSE; alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED; for ( ; ; ) { TTCN_Snapshot::take_new(block_flag); if (altstep_flag != ALT_NO) { altstep_flag = as__DIA__Gy__CCR_instance(ctx, req__type); if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return; else if (altstep_flag == ALT_REPEAT) goto altstep_begin; } if (default_flag != ALT_NO) { default_flag = TTCN_Default::try_altsteps(); if (default_flag == ALT_YES || default_flag == ALT_BREAK) return; else if (default_flag == ALT_REPEAT) goto altstep_begin; } if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_DIA_Gy_CCR."); else block_flag = TRUE; } } Default_Base *activate_as__DIA__Gy__CCR(const PdpContext_template& ctx, const DIAMETER__Types::DCC__NONE__CC__Request__Type& req__type) { return new as__DIA__Gy__CCR_Default(ctx, req__type); } GTPC__Types::CreatePDPContextResponse f__pdp__ctx__act(PdpContext& ctx, const OCTETSTRING_template& exp__cause) { TTCN_Location current_location("GGSN_Tests.ttcn", 714, TTCN_Location::LOCATION_FUNCTION, "f_pdp_ctx_act"); current_location.update_lineno(715); /* GGSN_Tests.ttcn, line 715 */ GTPv1C__CodecPort::Gtp1cUnitdata ud; current_location.update_lineno(716); /* GGSN_Tests.ttcn, line 716 */ GTPC__Types::CreatePDPContextResponse cpr; current_location.update_lineno(717); /* GGSN_Tests.ttcn, line 717 */ DEFAULT d; current_location.update_lineno(719); /* GGSN_Tests.ttcn, line 719 */ TTCN_Logger::log_str(TTCN_USER, "sending CreatePDP"); current_location.update_lineno(720); /* GGSN_Tests.ttcn, line 720 */ f__send__gtpc(GTPv1C__Templates::ts__GTPC__CreatePDP(GT__CT_component_g__peer__c, GT__CT_component_g__c__seq__nr, const_cast< const PdpContext&>(ctx).imsi(), GT__CT_component_g__restart__ctr, const_cast< const PdpContext&>(ctx).teid(), const_cast< const PdpContext&>(ctx).teic(), const_cast< const PdpContext&>(ctx).nsapi(), const_cast< const PdpContext&>(ctx).eua(), const_cast< const PdpContext&>(ctx).apn(), GT__CT_component_g__sgsn__ip__c, GT__CT_component_g__sgsn__ip__u, const_cast< const PdpContext&>(ctx).msisdn(), GTPC__Types::ProtConfigOptions_template(const_cast< const PdpContext&>(ctx).pco__req()), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).ratType()), GTPC__Types::UserLocationInformation_template(const_cast< const PdpContext&>(ctx).uli()), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).charging__char()), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).imeisv()), GTPC__Types::MS__TimeZone_template(const_cast< const PdpContext&>(ctx).ms__tz()))); current_location.update_lineno(724); /* GGSN_Tests.ttcn, line 724 */ GT__CT_component_T__default.start(); current_location.update_lineno(725); /* GGSN_Tests.ttcn, line 725 */ d = activate_pingpong(); current_location.update_lineno(726); /* GGSN_Tests.ttcn, line 726 */ if (GT__CT_component_Gx__PROC.check_port_state(cs_36)) { current_location.update_lineno(727); /* GGSN_Tests.ttcn, line 727 */ as__DIA__Gx__CCR(DIAMETER__Types::DCC__NONE__CC__Request__Type::INITIAL__REQUEST); } current_location.update_lineno(729); /* GGSN_Tests.ttcn, line 729 */ if (GT__CT_component_Gy__PROC.check_port_state(cs_36)) { current_location.update_lineno(730); /* GGSN_Tests.ttcn, line 730 */ as__DIA__Gy__CCR(PdpContext_template(ctx), DIAMETER__Types::DCC__NONE__CC__Request__Type::INITIAL__REQUEST); } current_location.update_lineno(732); /* GGSN_Tests.ttcn, line 732 */ { tmp_107: alt_status tmp_107_alt_flag_0 = ALT_MAYBE; alt_status tmp_107_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_107_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(733); /* GGSN_Tests.ttcn, line 733 */ tmp_107_alt_flag_0 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::createPDPContextResponse), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).teic()), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(ud), any_compref, NULL, NULL, NULL); if (tmp_107_alt_flag_0 == ALT_YES) { current_location.update_lineno(734); /* GGSN_Tests.ttcn, line 734 */ f__handle__create__req(ctx, ud, exp__cause); current_location.update_lineno(735); /* GGSN_Tests.ttcn, line 735 */ cpr = const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).gtpc().gtpc__pdu().createPDPContextResponse(); break; } } if (tmp_107_default_flag == ALT_MAYBE) { tmp_107_default_flag = TTCN_Default::try_altsteps(); if (tmp_107_default_flag == ALT_YES || tmp_107_default_flag == ALT_BREAK) break; else if (tmp_107_default_flag == ALT_REPEAT) goto tmp_107; } current_location.update_lineno(732); /* GGSN_Tests.ttcn, line 732 */ if (tmp_107_alt_flag_0 == ALT_NO && tmp_107_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 732 and 737."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(738); /* GGSN_Tests.ttcn, line 738 */ TTCN_Default::deactivate(d); ; current_location.update_lineno(739); /* GGSN_Tests.ttcn, line 739 */ GT__CT_component_T__default.stop(); current_location.update_lineno(740); /* GGSN_Tests.ttcn, line 740 */ return cpr; } void start_f__pdp__ctx__act(const COMPONENT& component_reference, PdpContext& ctx, const OCTETSTRING_template& exp__cause) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_pdp_ctx_act("); ctx.log(); TTCN_Logger::log_event_str(", "); exp__cause.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_pdp_ctx_act", text_buf); ctx.encode_text(text_buf); exp__cause.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__pdp__ctx__exp__del__req(const PdpContext& ctx, const OCTETSTRING_template& expect__cause, const BOOLEAN& expect__teardown) { TTCN_Location current_location("GGSN_Tests.ttcn", 743, TTCN_Location::LOCATION_FUNCTION, "f_pdp_ctx_exp_del_req"); current_location.update_lineno(744); /* GGSN_Tests.ttcn, line 744 */ GTPv1C__CodecPort::Gtp1cUnitdata ud; current_location.update_lineno(745); /* GGSN_Tests.ttcn, line 745 */ DEFAULT d; current_location.update_lineno(747); /* GGSN_Tests.ttcn, line 747 */ GT__CT_component_T__default.start(); current_location.update_lineno(748); /* GGSN_Tests.ttcn, line 748 */ d = activate_pingpong(); current_location.update_lineno(749); /* GGSN_Tests.ttcn, line 749 */ { tmp_110: alt_status tmp_110_alt_flag_0 = ALT_MAYBE; alt_status tmp_110_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_110_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(750); /* GGSN_Tests.ttcn, line 750 */ tmp_110_alt_flag_0 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::deletePDPContextRequest), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).teic()), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(ud), any_compref, NULL, NULL, NULL); if (tmp_110_alt_flag_0 == ALT_YES) { current_location.update_lineno(751); /* GGSN_Tests.ttcn, line 751 */ { boolean tmp_111; tmp_111 = expect__cause.get_istemplate_kind((const char*)cs_35); if (tmp_111) { boolean tmp_112 = ud.is_bound(); if(tmp_112) { const GTPv1C__CodecPort::Gtp1cUnitdata& tmp_113 = ud; const GTPC__Types::PDU__GTPC& tmp_114 = tmp_113.gtpc(); tmp_112 = tmp_114.is_bound(); if(tmp_112) { const GTPC__Types::PDU__GTPC& tmp_115 = tmp_114; const GTPC__Types::GTPC__PDUs& tmp_116 = tmp_115.gtpc__pdu(); tmp_112 = tmp_116.is_bound(); if(tmp_112) { tmp_112 = tmp_116.ischosen(GTPC__Types::GTPC__PDUs::ALT_deletePDPContextRequest); } if(tmp_112) { const GTPC__Types::GTPC__PDUs& tmp_117 = tmp_116; const GTPC__Types::DeletePDPContextRequest& tmp_118 = tmp_117.deletePDPContextRequest(); tmp_112 = tmp_118.is_bound(); if(tmp_112) { const OPTIONAL< GTPC__Types::Cause__gtpc >& tmp_119 = tmp_118.cause(); switch (tmp_119.get_selection()) { case OPTIONAL_UNBOUND: case OPTIONAL_OMIT: tmp_112 = FALSE; break; default: break; } if(tmp_112) { const GTPC__Types::Cause__gtpc& tmp_120 = (const GTPC__Types::Cause__gtpc&) tmp_119; tmp_112 = tmp_120.is_bound(); if(tmp_112) { const GTPC__Types::Cause__gtpc& tmp_121 = tmp_120; const OCTETSTRING& tmp_122 = tmp_121.causevalue(); tmp_112 = tmp_122.is_present(); } } } } } } tmp_111 = (!(tmp_112)); } if (tmp_111) { current_location.update_lineno(752); /* GGSN_Tests.ttcn, line 752 */ TTCN_Runtime::setverdict(PASS); } else { current_location.update_lineno(753); /* GGSN_Tests.ttcn, line 753 */ boolean tmp_123; { boolean tmp_124; tmp_124 = (!(expect__cause.get_istemplate_kind((const char*)cs_35))); if (tmp_124) { boolean tmp_125 = ud.is_bound(); if(tmp_125) { const GTPv1C__CodecPort::Gtp1cUnitdata& tmp_126 = ud; const GTPC__Types::PDU__GTPC& tmp_127 = tmp_126.gtpc(); tmp_125 = tmp_127.is_bound(); if(tmp_125) { const GTPC__Types::PDU__GTPC& tmp_128 = tmp_127; const GTPC__Types::GTPC__PDUs& tmp_129 = tmp_128.gtpc__pdu(); tmp_125 = tmp_129.is_bound(); if(tmp_125) { tmp_125 = tmp_129.ischosen(GTPC__Types::GTPC__PDUs::ALT_deletePDPContextRequest); } if(tmp_125) { const GTPC__Types::GTPC__PDUs& tmp_130 = tmp_129; const GTPC__Types::DeletePDPContextRequest& tmp_131 = tmp_130.deletePDPContextRequest(); tmp_125 = tmp_131.is_bound(); if(tmp_125) { const OPTIONAL< GTPC__Types::Cause__gtpc >& tmp_132 = tmp_131.cause(); switch (tmp_132.get_selection()) { case OPTIONAL_UNBOUND: case OPTIONAL_OMIT: tmp_125 = FALSE; break; default: break; } if(tmp_125) { const GTPC__Types::Cause__gtpc& tmp_133 = (const GTPC__Types::Cause__gtpc&) tmp_132; tmp_125 = tmp_133.is_bound(); if(tmp_125) { const GTPC__Types::Cause__gtpc& tmp_134 = tmp_133; const OCTETSTRING& tmp_135 = tmp_134.causevalue(); tmp_125 = tmp_135.is_present(); } } } } } } tmp_124 = tmp_125; } tmp_123 = tmp_124; } if (tmp_123) tmp_123 = (const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).gtpc().gtpc__pdu().deletePDPContextRequest().cause()().causevalue() == expect__cause.valueof()); if (tmp_123) { current_location.update_lineno(756); /* GGSN_Tests.ttcn, line 756 */ TTCN_Runtime::setverdict(PASS); } else { current_location.update_lineno(758); /* GGSN_Tests.ttcn, line 758 */ Misc__Helpers::f__shutdown(cs_21, 758, FAIL, cs_37); } } } current_location.update_lineno(762); /* GGSN_Tests.ttcn, line 762 */ { boolean tmp_145; { boolean tmp_136 = ud.is_bound(); if(tmp_136) { const GTPv1C__CodecPort::Gtp1cUnitdata& tmp_137 = ud; const GTPC__Types::PDU__GTPC& tmp_138 = tmp_137.gtpc(); tmp_136 = tmp_138.is_bound(); if(tmp_136) { const GTPC__Types::PDU__GTPC& tmp_139 = tmp_138; const GTPC__Types::GTPC__PDUs& tmp_140 = tmp_139.gtpc__pdu(); tmp_136 = tmp_140.is_bound(); if(tmp_136) { tmp_136 = tmp_140.ischosen(GTPC__Types::GTPC__PDUs::ALT_deletePDPContextRequest); } if(tmp_136) { const GTPC__Types::GTPC__PDUs& tmp_141 = tmp_140; const GTPC__Types::DeletePDPContextRequest& tmp_142 = tmp_141.deletePDPContextRequest(); tmp_136 = tmp_142.is_bound(); if(tmp_136) { const OPTIONAL< GTPC__Types::TearDownInd >& tmp_143 = tmp_142.tearDownIndicator(); switch (tmp_143.get_selection()) { case OPTIONAL_UNBOUND: tmp_136 = FALSE; break; case OPTIONAL_OMIT: tmp_136 = FALSE; break; default: { const GTPC__Types::TearDownInd& tmp_144 = (const GTPC__Types::TearDownInd&) tmp_143; tmp_136 = tmp_144.is_present(); break;} } } } } } tmp_145 = (expect__teardown == tmp_136); } if (tmp_145) { current_location.update_lineno(763); /* GGSN_Tests.ttcn, line 763 */ TTCN_Runtime::setverdict(PASS); } else { current_location.update_lineno(765); /* GGSN_Tests.ttcn, line 765 */ TTCN_Runtime::setverdict(FAIL); current_location.update_lineno(766); /* GGSN_Tests.ttcn, line 766 */ Misc__Helpers::f__shutdown(cs_21, 766, FAIL, cs_38); } } break; } } if (tmp_110_default_flag == ALT_MAYBE) { tmp_110_default_flag = TTCN_Default::try_altsteps(); if (tmp_110_default_flag == ALT_YES || tmp_110_default_flag == ALT_BREAK) break; else if (tmp_110_default_flag == ALT_REPEAT) goto tmp_110; } current_location.update_lineno(749); /* GGSN_Tests.ttcn, line 749 */ if (tmp_110_alt_flag_0 == ALT_NO && tmp_110_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 749 and 770."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(771); /* GGSN_Tests.ttcn, line 771 */ TTCN_Default::deactivate(d); ; current_location.update_lineno(772); /* GGSN_Tests.ttcn, line 772 */ GT__CT_component_T__default.stop(); } void start_f__pdp__ctx__exp__del__req(const COMPONENT& component_reference, const PdpContext& ctx, const OCTETSTRING_template& expect__cause, const BOOLEAN& expect__teardown) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_pdp_ctx_exp_del_req("); ctx.log(); TTCN_Logger::log_event_str(", "); expect__cause.log(); TTCN_Logger::log_event_str(", "); expect__teardown.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_pdp_ctx_exp_del_req", text_buf); ctx.encode_text(text_buf); expect__cause.encode_text(text_buf); expect__teardown.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__pdp__ctx__del(const PdpContext& ctx, const BITSTRING_template& teardown__ind, const OCTETSTRING& expect__causevalue, const BOOLEAN& expect__diameter) { TTCN_Location current_location("GGSN_Tests.ttcn", 775, TTCN_Location::LOCATION_FUNCTION, "f_pdp_ctx_del"); current_location.update_lineno(776); /* GGSN_Tests.ttcn, line 776 */ GTPv1C__CodecPort::Gtp1cUnitdata ud; current_location.update_lineno(777); /* GGSN_Tests.ttcn, line 777 */ DEFAULT d; current_location.update_lineno(778); /* GGSN_Tests.ttcn, line 778 */ OCTETSTRING expect__teid; current_location.update_lineno(782); /* GGSN_Tests.ttcn, line 782 */ if ((expect__causevalue == os_15)) { current_location.update_lineno(783); /* GGSN_Tests.ttcn, line 783 */ expect__teid = os_16; } else { current_location.update_lineno(785); /* GGSN_Tests.ttcn, line 785 */ expect__teid = const_cast< const PdpContext&>(ctx).teic(); } current_location.update_lineno(788); /* GGSN_Tests.ttcn, line 788 */ { BITSTRING_template tmp_148; tmp_148 = teardown__ind; tmp_148.check_restriction(TR_OMIT); f__send__gtpc(GTPv1C__Templates::ts__GTPC__DeletePDP(GT__CT_component_g__peer__c, GT__CT_component_g__c__seq__nr, const_cast< const PdpContext&>(ctx).teic__remote(), const_cast< const PdpContext&>(ctx).nsapi(), tmp_148)); } current_location.update_lineno(789); /* GGSN_Tests.ttcn, line 789 */ GT__CT_component_T__default.start(); current_location.update_lineno(790); /* GGSN_Tests.ttcn, line 790 */ d = activate_pingpong(); current_location.update_lineno(791); /* GGSN_Tests.ttcn, line 791 */ if ((GT__CT_component_Gx__PROC.check_port_state(cs_36) && expect__diameter)) { current_location.update_lineno(792); /* GGSN_Tests.ttcn, line 792 */ as__DIA__Gx__CCR(DIAMETER__Types::DCC__NONE__CC__Request__Type::TERMINATION__REQUEST); } current_location.update_lineno(794); /* GGSN_Tests.ttcn, line 794 */ if ((GT__CT_component_Gy__PROC.check_port_state(cs_36) && expect__diameter)) { current_location.update_lineno(795); /* GGSN_Tests.ttcn, line 795 */ as__DIA__Gy__CCR(PdpContext_template(ctx), DIAMETER__Types::DCC__NONE__CC__Request__Type::TERMINATION__REQUEST); } current_location.update_lineno(797); /* GGSN_Tests.ttcn, line 797 */ { tmp_150: alt_status tmp_150_alt_flag_0 = ALT_MAYBE; alt_status tmp_150_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_150_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(798); /* GGSN_Tests.ttcn, line 798 */ tmp_150_alt_flag_0 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::deletePDPContextResponse), OCTETSTRING_template(expect__teid), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(ud), any_compref, NULL, NULL, NULL); if (tmp_150_alt_flag_0 == ALT_YES) { current_location.update_lineno(799); /* GGSN_Tests.ttcn, line 799 */ if ((const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).gtpc().gtpc__pdu().deletePDPContextResponse().cause().causevalue() == expect__causevalue)) { current_location.update_lineno(800); /* GGSN_Tests.ttcn, line 800 */ TTCN_Runtime::setverdict(PASS); } else { current_location.update_lineno(802); /* GGSN_Tests.ttcn, line 802 */ Misc__Helpers::f__shutdown(cs_21, 802, FAIL, cs_39); } break; } } if (tmp_150_default_flag == ALT_MAYBE) { tmp_150_default_flag = TTCN_Default::try_altsteps(); if (tmp_150_default_flag == ALT_YES || tmp_150_default_flag == ALT_BREAK) break; else if (tmp_150_default_flag == ALT_REPEAT) goto tmp_150; } current_location.update_lineno(797); /* GGSN_Tests.ttcn, line 797 */ if (tmp_150_alt_flag_0 == ALT_NO && tmp_150_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 797 and 806."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(807); /* GGSN_Tests.ttcn, line 807 */ TTCN_Default::deactivate(d); ; current_location.update_lineno(808); /* GGSN_Tests.ttcn, line 808 */ GT__CT_component_T__default.stop(); } void start_f__pdp__ctx__del(const COMPONENT& component_reference, const PdpContext& ctx, const BITSTRING_template& teardown__ind, const OCTETSTRING& expect__causevalue, const BOOLEAN& expect__diameter) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_pdp_ctx_del("); ctx.log(); TTCN_Logger::log_event_str(", "); teardown__ind.log(); TTCN_Logger::log_event_str(", "); expect__causevalue.log(); TTCN_Logger::log_event_str(", "); expect__diameter.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_pdp_ctx_del", text_buf); ctx.encode_text(text_buf); teardown__ind.encode_text(text_buf); expect__causevalue.encode_text(text_buf); expect__diameter.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__pdp__ctx__update(PdpContext& ctx, const OCTETSTRING& exp__cause, const OCTETSTRING_template& new__teid, const OCTETSTRING_template& new__teic) { TTCN_Location current_location("GGSN_Tests.ttcn", 812, TTCN_Location::LOCATION_FUNCTION, "f_pdp_ctx_update"); current_location.update_lineno(813); /* GGSN_Tests.ttcn, line 813 */ GTPv1C__CodecPort::Gtp1cUnitdata ud; current_location.update_lineno(814); /* GGSN_Tests.ttcn, line 814 */ DEFAULT d; current_location.update_lineno(816); /* GGSN_Tests.ttcn, line 816 */ if ((!(new__teid.get_istemplate_kind((const char*)cs_35)))) { current_location.update_lineno(817); /* GGSN_Tests.ttcn, line 817 */ ctx.teid() = new__teid.valueof(); } current_location.update_lineno(819); /* GGSN_Tests.ttcn, line 819 */ if ((!(new__teic.get_istemplate_kind((const char*)cs_35)))) { current_location.update_lineno(820); /* GGSN_Tests.ttcn, line 820 */ ctx.teic() = new__teic.valueof(); } current_location.update_lineno(823); /* GGSN_Tests.ttcn, line 823 */ TTCN_Logger::log_str(TTCN_USER, "sending UpdatePDP"); current_location.update_lineno(824); /* GGSN_Tests.ttcn, line 824 */ f__send__gtpc(GTPv1C__Templates::ts__GTPC__UpdatePDP(GT__CT_component_g__peer__c, const_cast< const PdpContext&>(ctx).teic__remote(), GT__CT_component_g__c__seq__nr, const_cast< const PdpContext&>(ctx).imsi(), GT__CT_component_g__restart__ctr, const_cast< const PdpContext&>(ctx).teid(), const_cast< const PdpContext&>(ctx).teic(), const_cast< const PdpContext&>(ctx).nsapi(), GT__CT_component_g__sgsn__ip__c, GT__CT_component_g__sgsn__ip__u, GTPC__Types::ProtConfigOptions_template(const_cast< const PdpContext&>(ctx).pco__req()), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).ratType()), GTPC__Types::UserLocationInformation_template(const_cast< const PdpContext&>(ctx).uli()))); current_location.update_lineno(827); /* GGSN_Tests.ttcn, line 827 */ GT__CT_component_T__default.start(); current_location.update_lineno(828); /* GGSN_Tests.ttcn, line 828 */ d = activate_pingpong(); current_location.update_lineno(829); /* GGSN_Tests.ttcn, line 829 */ { tmp_154: alt_status tmp_154_alt_flag_0 = ALT_MAYBE; alt_status tmp_154_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_154_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(830); /* GGSN_Tests.ttcn, line 830 */ tmp_154_alt_flag_0 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::updatePDPContextResponse), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).teic()), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(ud), any_compref, NULL, NULL, NULL); if (tmp_154_alt_flag_0 == ALT_YES) { current_location.update_lineno(831); /* GGSN_Tests.ttcn, line 831 */ f__handle__update__req(ctx, ud, exp__cause); break; } } if (tmp_154_default_flag == ALT_MAYBE) { tmp_154_default_flag = TTCN_Default::try_altsteps(); if (tmp_154_default_flag == ALT_YES || tmp_154_default_flag == ALT_BREAK) break; else if (tmp_154_default_flag == ALT_REPEAT) goto tmp_154; } current_location.update_lineno(829); /* GGSN_Tests.ttcn, line 829 */ if (tmp_154_alt_flag_0 == ALT_NO && tmp_154_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 829 and 833."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(834); /* GGSN_Tests.ttcn, line 834 */ TTCN_Default::deactivate(d); ; current_location.update_lineno(835); /* GGSN_Tests.ttcn, line 835 */ GT__CT_component_T__default.stop(); } void start_f__pdp__ctx__update(const COMPONENT& component_reference, PdpContext& ctx, const OCTETSTRING& exp__cause, const OCTETSTRING_template& new__teid, const OCTETSTRING_template& new__teic) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_pdp_ctx_update("); ctx.log(); TTCN_Logger::log_event_str(", "); exp__cause.log(); TTCN_Logger::log_event_str(", "); new__teid.log(); TTCN_Logger::log_event_str(", "); new__teic.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_pdp_ctx_update", text_buf); ctx.encode_text(text_buf); exp__cause.encode_text(text_buf); new__teid.encode_text(text_buf); new__teic.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } OCTETSTRING f__ctx__get__ipv6__interface__id(const PdpContext& ctx) { TTCN_Location current_location("GGSN_Tests.ttcn", 839, TTCN_Location::LOCATION_FUNCTION, "f_ctx_get_ipv6_interface_id"); current_location.update_lineno(840); /* GGSN_Tests.ttcn, line 840 */ OCTETSTRING interface__id; current_location.update_lineno(841); /* GGSN_Tests.ttcn, line 841 */ { boolean tmp_160; { boolean tmp_155 = ctx.is_bound(); if(tmp_155) { const PdpContext& tmp_156 = ctx; const GTPC__Types::EndUserAddress& tmp_157 = tmp_156.eua(); tmp_155 = tmp_157.is_bound(); if(tmp_155) { const GTPC__Types::EndUserAddress& tmp_158 = tmp_157; const GTPC__Types::EndUserAddress__types& tmp_159 = tmp_158.endUserAddress(); tmp_155 = tmp_159.is_bound(); if (tmp_155) { tmp_155 = tmp_159.ischosen(GTPC__Types::EndUserAddress__types::ALT_endUserAddressIPv4andIPv6); } } } tmp_160 = tmp_155; } if (tmp_160) { current_location.update_lineno(842); /* GGSN_Tests.ttcn, line 842 */ interface__id = const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv6__address(); } else { current_location.update_lineno(843); /* GGSN_Tests.ttcn, line 843 */ boolean tmp_167; { boolean tmp_162 = ctx.is_bound(); if(tmp_162) { const PdpContext& tmp_163 = ctx; const GTPC__Types::EndUserAddress& tmp_164 = tmp_163.eua(); tmp_162 = tmp_164.is_bound(); if(tmp_162) { const GTPC__Types::EndUserAddress& tmp_165 = tmp_164; const GTPC__Types::EndUserAddress__types& tmp_166 = tmp_165.endUserAddress(); tmp_162 = tmp_166.is_bound(); if (tmp_162) { tmp_162 = tmp_166.ischosen(GTPC__Types::EndUserAddress__types::ALT_endUserAddressIPv6); } } } tmp_167 = tmp_162; } if (tmp_167) { current_location.update_lineno(844); /* GGSN_Tests.ttcn, line 844 */ interface__id = const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv6().ipv6__address(); } else { current_location.update_lineno(846); /* GGSN_Tests.ttcn, line 846 */ Misc__Helpers::f__shutdown(cs_21, 846, FAIL, cs_40); } } } current_location.update_lineno(848); /* GGSN_Tests.ttcn, line 848 */ return interface__id; } OCTETSTRING f__icmpv6__rs__for__pdp(const PdpContext& ctx) { TTCN_Location current_location("GGSN_Tests.ttcn", 852, TTCN_Location::LOCATION_FUNCTION, "f_icmpv6_rs_for_pdp"); current_location.update_lineno(853); /* GGSN_Tests.ttcn, line 853 */ OCTETSTRING interface__id(f__ctx__get__ipv6__interface__id(ctx)); current_location.update_lineno(854); /* GGSN_Tests.ttcn, line 854 */ return ICMPv6__Templates::f__gen__icmpv6__router__solicitation(interface__id); } OCTETSTRING f__gen__icmpv6__neigh__solicit__for__pdp(const PdpContext& ctx) { TTCN_Location current_location("GGSN_Tests.ttcn", 858, TTCN_Location::LOCATION_FUNCTION, "f_gen_icmpv6_neigh_solicit_for_pdp"); current_location.update_lineno(859); /* GGSN_Tests.ttcn, line 859 */ OCTETSTRING interface__id(f__ctx__get__ipv6__interface__id(ctx)); current_location.update_lineno(860); /* GGSN_Tests.ttcn, line 860 */ OCTETSTRING link__local(ICMPv6__Templates::f__ipv6__link__local(interface__id)); current_location.update_lineno(861); /* GGSN_Tests.ttcn, line 861 */ OCTETSTRING daddr(ICMPv6__Templates::f__ipv6__sol__node__mcast(link__local)); current_location.update_lineno(863); /* GGSN_Tests.ttcn, line 863 */ return ICMPv6__Templates::f__gen__icmpv6__neigh__solicit(link__local, daddr, link__local); } void f__wait__icmp4(const PdpContext& ctx, const ICMP__Types::PDU__ICMP_template& expected) { TTCN_Location current_location("GGSN_Tests.ttcn", 867, TTCN_Location::LOCATION_FUNCTION, "f_wait_icmp4"); current_location.update_lineno(868); /* GGSN_Tests.ttcn, line 868 */ GTPv1U__CodecPort::Gtp1uUnitdata ud; current_location.update_lineno(869); /* GGSN_Tests.ttcn, line 869 */ GT__CT_component_T__default.start(); current_location.update_lineno(870); /* GGSN_Tests.ttcn, line 870 */ { tmp_169: alt_status tmp_169_alt_flag_0 = ALT_MAYBE; alt_status tmp_169_alt_flag_1 = ALT_MAYBE; alt_status tmp_169_alt_flag_2 = ALT_MAYBE; alt_status tmp_169_alt_flag_3 = ALT_MAYBE; alt_status tmp_169_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_169_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(871); /* GGSN_Tests.ttcn, line 871 */ tmp_169_alt_flag_0 = GT__CT_component_GTPU.receive(GTPv1U__Templates::tr__GTPU__GPDU(GTPv1U__CodecPort::Gtp1uPeer_template(GT__CT_component_g__peer__u), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).teid()), GTPv1U__Templates::tr__GTPU__GPDU_data_defval), &(ud), any_compref, NULL, NULL, NULL); if (tmp_169_alt_flag_0 == ALT_YES) { current_location.update_lineno(872); /* GGSN_Tests.ttcn, line 872 */ if ((f__verify__gtpu__txseq(const_cast< const GTPv1U__CodecPort::Gtp1uUnitdata&>(ud).gtpu(), GT__CT_component_use__gtpu__txseq) == FALSE)) { current_location.update_lineno(873); /* GGSN_Tests.ttcn, line 873 */ TTCN_Runtime::setverdict(FAIL); current_location.update_lineno(874); /* GGSN_Tests.ttcn, line 874 */ TTCN_Runtime::stop_execution(); } current_location.update_lineno(876); /* GGSN_Tests.ttcn, line 876 */ OCTETSTRING gpdu(const_cast< const GTPv1U__CodecPort::Gtp1uUnitdata&>(ud).gtpu().gtpu__IEs().g__PDU__IEs().data()); current_location.update_lineno(877); /* GGSN_Tests.ttcn, line 877 */ IP__Types::IPv4__packet ip4(IP__Types::f__IPv4__dec(gpdu)); current_location.update_lineno(878); /* GGSN_Tests.ttcn, line 878 */ if ((const_cast< const IP__Types::IPv4__packet&>(ip4).header().ver() != 4)) { current_location.update_lineno(879); /* GGSN_Tests.ttcn, line 879 */ goto tmp_169; } current_location.update_lineno(881); /* GGSN_Tests.ttcn, line 881 */ ICMP__Types::PDU__ICMP icmp4(ICMP__Types::f__dec__PDU__ICMP(const_cast< const IP__Types::IPv4__packet&>(ip4).payload())); current_location.update_lineno(882); /* GGSN_Tests.ttcn, line 882 */ if ((!(expected.match(icmp4)))) { current_location.update_lineno(883); /* GGSN_Tests.ttcn, line 883 */ goto tmp_169; } break; } } if (tmp_169_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(886); /* GGSN_Tests.ttcn, line 886 */ tmp_169_alt_flag_1 = GT__CT_component_GTPU.receive(GTPv1U__Templates::tr__GTPU__GPDU(GTPv1U__CodecPort::Gtp1uPeer_template(GT__CT_component_g__peer__u), OCTETSTRING_template(ANY_VALUE), GTPv1U__Templates::tr__GTPU__GPDU_data_defval), &(ud), any_compref, NULL, NULL, NULL); if (tmp_169_alt_flag_1 == ALT_YES) { current_location.update_lineno(887); /* GGSN_Tests.ttcn, line 887 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received wrong local TEID"),TTCN_Logger::end_event_log2str())); break; } } if (tmp_169_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(889); /* GGSN_Tests.ttcn, line 889 */ tmp_169_alt_flag_2 = GT__CT_component_GTPU.receive(any_compref, NULL, NULL, NULL); if (tmp_169_alt_flag_2 == ALT_YES) { current_location.update_lineno(889); /* GGSN_Tests.ttcn, line 889 */ TTCN_Runtime::setverdict(FAIL); break; } } if (tmp_169_alt_flag_3 == ALT_MAYBE) { current_location.update_lineno(890); /* GGSN_Tests.ttcn, line 890 */ tmp_169_alt_flag_3 = GT__CT_component_T__default.timeout(NULL); if (tmp_169_alt_flag_3 == ALT_YES) { current_location.update_lineno(890); /* GGSN_Tests.ttcn, line 890 */ TTCN_Runtime::setverdict(FAIL); break; } } if (tmp_169_default_flag == ALT_MAYBE) { tmp_169_default_flag = TTCN_Default::try_altsteps(); if (tmp_169_default_flag == ALT_YES || tmp_169_default_flag == ALT_BREAK) break; else if (tmp_169_default_flag == ALT_REPEAT) goto tmp_169; } current_location.update_lineno(870); /* GGSN_Tests.ttcn, line 870 */ if (tmp_169_alt_flag_0 == ALT_NO && tmp_169_alt_flag_1 == ALT_NO && tmp_169_alt_flag_2 == ALT_NO && tmp_169_alt_flag_3 == ALT_NO && tmp_169_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 870 and 891."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(892); /* GGSN_Tests.ttcn, line 892 */ GT__CT_component_T__default.stop(); } void start_f__wait__icmp4(const COMPONENT& component_reference, const PdpContext& ctx, const ICMP__Types::PDU__ICMP_template& expected) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp4("); ctx.log(); TTCN_Logger::log_event_str(", "); expected.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_wait_icmp4", text_buf); ctx.encode_text(text_buf); expected.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__wait__icmp4__echo__request(const PdpContext& ctx) { TTCN_Location current_location("GGSN_Tests.ttcn", 896, TTCN_Location::LOCATION_FUNCTION, "f_wait_icmp4_echo_request"); current_location.update_lineno(897); /* GGSN_Tests.ttcn, line 897 */ f__wait__icmp4(ctx, ICMP__Templates::tr__ICMPv4__ERQ); } void start_f__wait__icmp4__echo__request(const COMPONENT& component_reference, const PdpContext& ctx) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp4_echo_request("); ctx.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_wait_icmp4_echo_request", text_buf); ctx.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__wait__icmp4__echo__reply(const PdpContext& ctx) { TTCN_Location current_location("GGSN_Tests.ttcn", 901, TTCN_Location::LOCATION_FUNCTION, "f_wait_icmp4_echo_reply"); current_location.update_lineno(902); /* GGSN_Tests.ttcn, line 902 */ { ICMP__Types::PDU__ICMP_template tmp_170; tmp_170.set_type(VALUE_LIST, 2); tmp_170.list_item(0) = ICMP__Templates::tr__ICMPv4__ERP(ICMP__Templates::tr__ICMPv4__ERP_data_defval); tmp_170.list_item(1) = ICMP__Templates::tr__ICMPv4__DU; f__wait__icmp4(ctx, tmp_170); } } void start_f__wait__icmp4__echo__reply(const COMPONENT& component_reference, const PdpContext& ctx) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp4_echo_reply("); ctx.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_wait_icmp4_echo_reply", text_buf); ctx.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__wait__icmp6(const PdpContext& ctx, const ICMPv6__Types::PDU__ICMPv6_template& expected) { PdpContext ctx_shadow(ctx); TTCN_Location current_location("GGSN_Tests.ttcn", 906, TTCN_Location::LOCATION_FUNCTION, "f_wait_icmp6"); current_location.update_lineno(907); /* GGSN_Tests.ttcn, line 907 */ GTPv1U__CodecPort::Gtp1uUnitdata ud; current_location.update_lineno(908); /* GGSN_Tests.ttcn, line 908 */ GT__CT_component_T__default.start(); current_location.update_lineno(909); /* GGSN_Tests.ttcn, line 909 */ { tmp_171: alt_status tmp_171_alt_flag_0 = ALT_MAYBE; alt_status tmp_171_alt_flag_1 = ALT_MAYBE; alt_status tmp_171_alt_flag_2 = ALT_MAYBE; alt_status tmp_171_alt_flag_3 = ALT_MAYBE; alt_status tmp_171_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_171_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(910); /* GGSN_Tests.ttcn, line 910 */ tmp_171_alt_flag_0 = GT__CT_component_GTPU.receive(GTPv1U__Templates::tr__GTPU__GPDU(GTPv1U__CodecPort::Gtp1uPeer_template(GT__CT_component_g__peer__u), OCTETSTRING_template(ANY_VALUE), GTPv1U__Templates::tr__GTPU__GPDU_data_defval), &(ud), any_compref, NULL, NULL, NULL); if (tmp_171_alt_flag_0 == ALT_YES) { current_location.update_lineno(911); /* GGSN_Tests.ttcn, line 911 */ if ((f__verify__gtpu__txseq(const_cast< const GTPv1U__CodecPort::Gtp1uUnitdata&>(ud).gtpu(), GT__CT_component_use__gtpu__txseq) == FALSE)) { current_location.update_lineno(912); /* GGSN_Tests.ttcn, line 912 */ Misc__Helpers::f__shutdown(cs_21, 912, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received GTPU with wrong txseq while waiting for ICMPv6: "),expected.log(),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(915); /* GGSN_Tests.ttcn, line 915 */ OCTETSTRING gpdu(const_cast< const GTPv1U__CodecPort::Gtp1uUnitdata&>(ud).gtpu().gtpu__IEs().g__PDU__IEs().data()); current_location.update_lineno(916); /* GGSN_Tests.ttcn, line 916 */ IP__Types::IPv6__packet ip6(IP__Types::f__IPv6__dec(gpdu)); current_location.update_lineno(917); /* GGSN_Tests.ttcn, line 917 */ { boolean tmp_172; tmp_172 = (const_cast< const IP__Types::IPv6__packet&>(ip6).header().ver() != 6); if (!tmp_172) tmp_172 = (const_cast< const IP__Types::IPv6__packet&>(ip6).header().nexthead() != 58); if (tmp_172) { current_location.update_lineno(918); /* GGSN_Tests.ttcn, line 918 */ goto tmp_171; } } current_location.update_lineno(920); /* GGSN_Tests.ttcn, line 920 */ ICMPv6__Types::PDU__ICMPv6 icmp6(ICMPv6__Types::f__dec__PDU__ICMPv6(const_cast< const IP__Types::IPv6__packet&>(ip6).payload())); current_location.update_lineno(921); /* GGSN_Tests.ttcn, line 921 */ if ((!(expected.match(icmp6)))) { current_location.update_lineno(922); /* GGSN_Tests.ttcn, line 922 */ goto tmp_171; } current_location.update_lineno(925); /* GGSN_Tests.ttcn, line 925 */ if (ICMPv6__Templates::tr__ICMPv6__RA(OCTETSTRING_template(ANY_VALUE), INTEGER_template(64)).match(icmp6)) { current_location.update_lineno(926); /* GGSN_Tests.ttcn, line 926 */ ctx_shadow.ip6__prefix() = const_cast< const ICMPv6__Types::PDU__ICMPv6&>(icmp6).routerAdvertisement().options()()[0].prefixInformation().prefix(); current_location.update_lineno(927); /* GGSN_Tests.ttcn, line 927 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("RA with /64 prefix "); const_cast< const PdpContext&>(ctx_shadow).ip6__prefix().log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } } break; } } if (tmp_171_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(930); /* GGSN_Tests.ttcn, line 930 */ tmp_171_alt_flag_1 = GT__CT_component_GTPU.receive(GTPv1U__Templates::tr__GTPU__GPDU(GTPv1U__CodecPort::Gtp1uPeer_template(ANY_VALUE), OCTETSTRING_template(ANY_VALUE), GTPv1U__Templates::tr__GTPU__GPDU_data_defval), NULL, any_compref, NULL, NULL, NULL); if (tmp_171_alt_flag_1 == ALT_YES) { current_location.update_lineno(930); /* GGSN_Tests.ttcn, line 930 */ goto tmp_171; } } if (tmp_171_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(931); /* GGSN_Tests.ttcn, line 931 */ tmp_171_alt_flag_2 = GT__CT_component_GTPU.receive(any_compref, NULL, NULL, NULL); if (tmp_171_alt_flag_2 == ALT_YES) { current_location.update_lineno(932); /* GGSN_Tests.ttcn, line 932 */ Misc__Helpers::f__shutdown(cs_21, 932, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received unexpected GTPU while waiting for ICMPv6: "),expected.log(),TTCN_Logger::end_event_log2str())); break; } } if (tmp_171_alt_flag_3 == ALT_MAYBE) { current_location.update_lineno(935); /* GGSN_Tests.ttcn, line 935 */ tmp_171_alt_flag_3 = GT__CT_component_T__default.timeout(NULL); if (tmp_171_alt_flag_3 == ALT_YES) { current_location.update_lineno(936); /* GGSN_Tests.ttcn, line 936 */ Misc__Helpers::f__shutdown(cs_21, 936, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for ICMPv6: "),expected.log(),TTCN_Logger::end_event_log2str())); break; } } if (tmp_171_default_flag == ALT_MAYBE) { tmp_171_default_flag = TTCN_Default::try_altsteps(); if (tmp_171_default_flag == ALT_YES || tmp_171_default_flag == ALT_BREAK) break; else if (tmp_171_default_flag == ALT_REPEAT) goto tmp_171; } current_location.update_lineno(909); /* GGSN_Tests.ttcn, line 909 */ if (tmp_171_alt_flag_0 == ALT_NO && tmp_171_alt_flag_1 == ALT_NO && tmp_171_alt_flag_2 == ALT_NO && tmp_171_alt_flag_3 == ALT_NO && tmp_171_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 909 and 939."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(940); /* GGSN_Tests.ttcn, line 940 */ GT__CT_component_T__default.stop(); } void start_f__wait__icmp6(const COMPONENT& component_reference, const PdpContext& ctx, const ICMPv6__Types::PDU__ICMPv6_template& expected) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp6("); ctx.log(); TTCN_Logger::log_event_str(", "); expected.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_wait_icmp6", text_buf); ctx.encode_text(text_buf); expected.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__wait__rtr__adv(const PdpContext& ctx) { TTCN_Location current_location("GGSN_Tests.ttcn", 944, TTCN_Location::LOCATION_FUNCTION, "f_wait_rtr_adv"); current_location.update_lineno(945); /* GGSN_Tests.ttcn, line 945 */ f__wait__icmp6(ctx, ICMPv6__Templates::tr__ICMPv6__RA(OCTETSTRING_template(ANY_VALUE), INTEGER_template(64))); } void start_f__wait__rtr__adv(const COMPONENT& component_reference, const PdpContext& ctx) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_rtr_adv("); ctx.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_wait_rtr_adv", text_buf); ctx.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__wait__icmp6__echo__request(const PdpContext& ctx) { TTCN_Location current_location("GGSN_Tests.ttcn", 949, TTCN_Location::LOCATION_FUNCTION, "f_wait_icmp6_echo_request"); current_location.update_lineno(950); /* GGSN_Tests.ttcn, line 950 */ f__wait__icmp6(ctx, ICMPv6__Templates::tr__ICMPv6__ERQ); } void start_f__wait__icmp6__echo__request(const COMPONENT& component_reference, const PdpContext& ctx) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp6_echo_request("); ctx.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_wait_icmp6_echo_request", text_buf); ctx.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__wait__icmp6__echo__reply(const PdpContext& ctx) { TTCN_Location current_location("GGSN_Tests.ttcn", 954, TTCN_Location::LOCATION_FUNCTION, "f_wait_icmp6_echo_reply"); current_location.update_lineno(955); /* GGSN_Tests.ttcn, line 955 */ { ICMPv6__Types::PDU__ICMPv6_template tmp_174; tmp_174.set_type(VALUE_LIST, 2); tmp_174.list_item(0) = ICMPv6__Templates::tr__ICMPv6__ERP(ICMPv6__Templates::tr__ICMPv6__ERP_data_defval); tmp_174.list_item(1) = ICMPv6__Templates::tr__ICMPv6__DU; f__wait__icmp6(ctx, tmp_174); } } void start_f__wait__icmp6__echo__reply(const COMPONENT& component_reference, const PdpContext& ctx) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp6_echo_reply("); ctx.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_wait_icmp6_echo_reply", text_buf); ctx.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } OCTETSTRING f__icmpv6__rs__for__pdp46(const PdpContext& ctx) { TTCN_Location current_location("GGSN_Tests.ttcn", 959, TTCN_Location::LOCATION_FUNCTION, "f_icmpv6_rs_for_pdp46"); current_location.update_lineno(960); /* GGSN_Tests.ttcn, line 960 */ OCTETSTRING interface__id(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv6__address()); current_location.update_lineno(961); /* GGSN_Tests.ttcn, line 961 */ return ICMPv6__Templates::f__gen__icmpv6__router__solicitation(interface__id); } OCTETSTRING f__gen__icmpv6__neigh__solicit__for__pdp46(const PdpContext& ctx) { TTCN_Location current_location("GGSN_Tests.ttcn", 965, TTCN_Location::LOCATION_FUNCTION, "f_gen_icmpv6_neigh_solicit_for_pdp46"); current_location.update_lineno(966); /* GGSN_Tests.ttcn, line 966 */ OCTETSTRING interface__id(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv6__address()); current_location.update_lineno(967); /* GGSN_Tests.ttcn, line 967 */ OCTETSTRING link__local(ICMPv6__Templates::f__ipv6__link__local(interface__id)); current_location.update_lineno(968); /* GGSN_Tests.ttcn, line 968 */ OCTETSTRING daddr(ICMPv6__Templates::f__ipv6__sol__node__mcast(link__local)); current_location.update_lineno(970); /* GGSN_Tests.ttcn, line 970 */ return ICMPv6__Templates::f__gen__icmpv6__neigh__solicit(link__local, daddr, link__local); } void f__wait__gtpu__fail(const PdpContext& ) { TTCN_Location current_location("GGSN_Tests.ttcn", 974, TTCN_Location::LOCATION_FUNCTION, "f_wait_gtpu_fail"); current_location.update_lineno(975); /* GGSN_Tests.ttcn, line 975 */ GT__CT_component_T__default.start(); current_location.update_lineno(976); /* GGSN_Tests.ttcn, line 976 */ { tmp_175: alt_status tmp_175_alt_flag_0 = ALT_MAYBE; alt_status tmp_175_alt_flag_1 = ALT_MAYBE; alt_status tmp_175_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_175_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(977); /* GGSN_Tests.ttcn, line 977 */ tmp_175_alt_flag_0 = GT__CT_component_GTPU.receive(any_compref, NULL, NULL, NULL); if (tmp_175_alt_flag_0 == ALT_YES) { current_location.update_lineno(977); /* GGSN_Tests.ttcn, line 977 */ TTCN_Runtime::setverdict(FAIL); break; } } if (tmp_175_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(978); /* GGSN_Tests.ttcn, line 978 */ tmp_175_alt_flag_1 = GT__CT_component_T__default.timeout(NULL); if (tmp_175_alt_flag_1 == ALT_YES) break; } if (tmp_175_default_flag == ALT_MAYBE) { tmp_175_default_flag = TTCN_Default::try_altsteps(); if (tmp_175_default_flag == ALT_YES || tmp_175_default_flag == ALT_BREAK) break; else if (tmp_175_default_flag == ALT_REPEAT) goto tmp_175; } current_location.update_lineno(976); /* GGSN_Tests.ttcn, line 976 */ if (tmp_175_alt_flag_0 == ALT_NO && tmp_175_alt_flag_1 == ALT_NO && tmp_175_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 976 and 979."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(980); /* GGSN_Tests.ttcn, line 980 */ GT__CT_component_T__default.stop(); } void start_f__wait__gtpu__fail(const COMPONENT& component_reference, const PdpContext& ctx) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_gtpu_fail("); ctx.log(); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_wait_gtpu_fail", text_buf); ctx.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } BOOLEAN f__PCO__permits__duplicates(const OCTETSTRING& id) { TTCN_Location current_location("GGSN_Tests.ttcn", 985, TTCN_Location::LOCATION_FUNCTION, "f_PCO_permits_duplicates"); current_location.update_lineno(986); /* GGSN_Tests.ttcn, line 986 */ INTEGER i; current_location.update_lineno(987); /* GGSN_Tests.ttcn, line 987 */ i = 0; current_location.update_lineno(987); /* GGSN_Tests.ttcn, line 987 */ for ( ; ; ) { current_location.update_lineno(987); /* GGSN_Tests.ttcn, line 987 */ if (!(i < 4)) break; current_location.update_lineno(988); /* GGSN_Tests.ttcn, line 988 */ if ((id == protocol__ids__nodupes[i])) { current_location.update_lineno(989); /* GGSN_Tests.ttcn, line 989 */ return FALSE; } current_location.update_lineno(987); /* GGSN_Tests.ttcn, line 987 */ { INTEGER tmp_177; ++i; } } current_location.update_lineno(992); /* GGSN_Tests.ttcn, line 992 */ return TRUE; } void f__PCO__ensure__no__duplicates(const GTPC__Types::ProtConfigOptions& pco) { TTCN_Location current_location("GGSN_Tests.ttcn", 996, TTCN_Location::LOCATION_FUNCTION, "f_PCO_ensure_no_duplicates"); current_location.update_lineno(997); /* GGSN_Tests.ttcn, line 997 */ General__Types::OCT2List protocol__ids(NULL_VALUE); current_location.update_lineno(998); /* GGSN_Tests.ttcn, line 998 */ INTEGER i; current_location.update_lineno(998); /* GGSN_Tests.ttcn, line 998 */ INTEGER j; current_location.update_lineno(999); /* GGSN_Tests.ttcn, line 999 */ i = 0; current_location.update_lineno(999); /* GGSN_Tests.ttcn, line 999 */ for ( ; ; ) { current_location.update_lineno(999); /* GGSN_Tests.ttcn, line 999 */ if (!(i < const_cast< const GTPC__Types::ProtConfigOptions&>(pco).protocols().lengthof())) break; current_location.update_lineno(1000); /* GGSN_Tests.ttcn, line 1000 */ OCTETSTRING id(const_cast< const GTPC__Types::ProtConfigOptions&>(pco).protocols()[i].protocolID()); current_location.update_lineno(1001); /* GGSN_Tests.ttcn, line 1001 */ j = 0; current_location.update_lineno(1001); /* GGSN_Tests.ttcn, line 1001 */ for ( ; ; ) { current_location.update_lineno(1001); /* GGSN_Tests.ttcn, line 1001 */ if (!(j < protocol__ids.lengthof())) break; current_location.update_lineno(1002); /* GGSN_Tests.ttcn, line 1002 */ { boolean tmp_180; tmp_180 = (!(f__PCO__permits__duplicates(id))); if (tmp_180) tmp_180 = (id == const_cast< const General__Types::OCT2List&>(protocol__ids)[j]); if (tmp_180) { current_location.update_lineno(1003); /* GGSN_Tests.ttcn, line 1003 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Duplicate ProtocolID "),id.log(),TTCN_Logger::log_event_str(" already present in "),const_cast< const GTPC__Types::ProtConfigOptions&>(pco).protocols().log(),TTCN_Logger::end_event_log2str())); } } current_location.update_lineno(1001); /* GGSN_Tests.ttcn, line 1001 */ { INTEGER tmp_181; ++j; } } current_location.update_lineno(1006); /* GGSN_Tests.ttcn, line 1006 */ { General__Types::OCT2List tmp_182; { General__Types::OCT2List tmp_183; tmp_183.set_size(1); tmp_183[0] = id; tmp_182 = (protocol__ids + tmp_183); } protocol__ids = tmp_182; } current_location.update_lineno(999); /* GGSN_Tests.ttcn, line 999 */ { INTEGER tmp_184; ++i; } } } verdicttype testcase_TC__pdp6__act__deact(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1011, TTCN_Location::LOCATION_TESTCASE, "TC_pdp6_act_deact"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp6_act_deact", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1012); /* GGSN_Tests.ttcn, line 1012 */ f__init(); current_location.update_lineno(1014); /* GGSN_Tests.ttcn, line 1014 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_2, GTPv1C__Templates::t__EuaIPv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1015); /* GGSN_Tests.ttcn, line 1015 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1016); /* GGSN_Tests.ttcn, line 1016 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1017); /* GGSN_Tests.ttcn, line 1017 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp6_act_deact was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp6__act__deact__pcodns(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1021, TTCN_Location::LOCATION_TESTCASE, "TC_pdp6_act_deact_pcodns"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp6_act_deact_pcodns", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1022); /* GGSN_Tests.ttcn, line 1022 */ f__init(); current_location.update_lineno(1024); /* GGSN_Tests.ttcn, line 1024 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_2, GTPv1C__Templates::t__EuaIPv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1025); /* GGSN_Tests.ttcn, line 1025 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv6__DNS.valueof(); current_location.update_lineno(1026); /* GGSN_Tests.ttcn, line 1026 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1028); /* GGSN_Tests.ttcn, line 1028 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1030); /* GGSN_Tests.ttcn, line 1030 */ OCTETSTRING ggsn__ip6__dns1(Native__Functions::f__inet6__addr(m__ggsn__ip6__dns1)); current_location.update_lineno(1031); /* GGSN_Tests.ttcn, line 1031 */ if ((!(OCTETSTRING_template(ggsn__ip6__dns1).match(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_21, 1))))) { current_location.update_lineno(1032); /* GGSN_Tests.ttcn, line 1032 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary DNS IPv6 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1035); /* GGSN_Tests.ttcn, line 1035 */ OCTETSTRING ggsn__ip6__dns2(Native__Functions::f__inet6__addr(m__ggsn__ip6__dns2)); current_location.update_lineno(1036); /* GGSN_Tests.ttcn, line 1036 */ if ((!(OCTETSTRING_template(ggsn__ip6__dns2).match(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_21, 2))))) { current_location.update_lineno(1037); /* GGSN_Tests.ttcn, line 1037 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Secondary DNS IPv6 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1040); /* GGSN_Tests.ttcn, line 1040 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1041); /* GGSN_Tests.ttcn, line 1041 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp6_act_deact_pcodns was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp6__act__deact__icmp6(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1045, TTCN_Location::LOCATION_TESTCASE, "TC_pdp6_act_deact_icmp6"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp6_act_deact_icmp6", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1046); /* GGSN_Tests.ttcn, line 1046 */ f__init(); current_location.update_lineno(1048); /* GGSN_Tests.ttcn, line 1048 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_2, GTPv1C__Templates::t__EuaIPv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1049); /* GGSN_Tests.ttcn, line 1049 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv6__DNS.valueof(); current_location.update_lineno(1050); /* GGSN_Tests.ttcn, line 1050 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1052); /* GGSN_Tests.ttcn, line 1052 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1054); /* GGSN_Tests.ttcn, line 1054 */ f__send__gtpu(ctx, f__icmpv6__rs__for__pdp(ctx)); current_location.update_lineno(1055); /* GGSN_Tests.ttcn, line 1055 */ f__wait__rtr__adv(ctx); current_location.update_lineno(1056); /* GGSN_Tests.ttcn, line 1056 */ f__send__gtpu(ctx, f__gen__icmpv6__neigh__solicit__for__pdp(ctx)); current_location.update_lineno(1058); /* GGSN_Tests.ttcn, line 1058 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1059); /* GGSN_Tests.ttcn, line 1059 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp6_act_deact_icmp6 was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp6__act__deact__gtpu__access(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1064, TTCN_Location::LOCATION_TESTCASE, "TC_pdp6_act_deact_gtpu_access"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp6_act_deact_gtpu_access", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1065); /* GGSN_Tests.ttcn, line 1065 */ f__init(); current_location.update_lineno(1066); /* GGSN_Tests.ttcn, line 1066 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_2, GTPv1C__Templates::t__EuaIPv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1067); /* GGSN_Tests.ttcn, line 1067 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv6__DNS.valueof(); current_location.update_lineno(1068); /* GGSN_Tests.ttcn, line 1068 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1070); /* GGSN_Tests.ttcn, line 1070 */ f__send__gtpu(ctx, f__icmpv6__rs__for__pdp(ctx)); current_location.update_lineno(1071); /* GGSN_Tests.ttcn, line 1071 */ f__wait__rtr__adv(ctx); current_location.update_lineno(1072); /* GGSN_Tests.ttcn, line 1072 */ f__send__gtpu(ctx, f__gen__icmpv6__neigh__solicit__for__pdp(ctx)); current_location.update_lineno(1074); /* GGSN_Tests.ttcn, line 1074 */ OCTETSTRING dns1__addr(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_21, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval)); current_location.update_lineno(1077); /* GGSN_Tests.ttcn, line 1077 */ OCTETSTRING saddr__ll(ICMPv6__Templates::f__ipv6__link__local(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv6().ipv6__address())); current_location.update_lineno(1078); /* GGSN_Tests.ttcn, line 1078 */ f__send__gtpu(ctx, ICMPv6__Templates::f__gen__icmpv6__echo(saddr__ll, dns1__addr)); current_location.update_lineno(1079); /* GGSN_Tests.ttcn, line 1079 */ if ((m__ggsn__impl == GGSN__Impl::GGSN__IMPL__OSMOCOM)) { current_location.update_lineno(1080); /* GGSN_Tests.ttcn, line 1080 */ f__wait__icmp6__echo__reply(ctx); } else { current_location.update_lineno(1082); /* GGSN_Tests.ttcn, line 1082 */ f__wait__gtpu__fail(ctx); } current_location.update_lineno(1086); /* GGSN_Tests.ttcn, line 1086 */ OCTETSTRING saddr__glob(ICMPv6__Templates::f__ipv6__global(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv6().ipv6__address())); current_location.update_lineno(1087); /* GGSN_Tests.ttcn, line 1087 */ f__send__gtpu(ctx, ICMPv6__Templates::f__gen__icmpv6__echo(saddr__glob, dns1__addr)); current_location.update_lineno(1088); /* GGSN_Tests.ttcn, line 1088 */ f__wait__icmp6__echo__reply(ctx); current_location.update_lineno(1090); /* GGSN_Tests.ttcn, line 1090 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1091); /* GGSN_Tests.ttcn, line 1091 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp6_act_deact_gtpu_access was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp6__act__deact__gtpu__access__wrong__ll__saddr(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1095, TTCN_Location::LOCATION_TESTCASE, "TC_pdp6_act_deact_gtpu_access_wrong_ll_saddr"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp6_act_deact_gtpu_access_wrong_ll_saddr", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1096); /* GGSN_Tests.ttcn, line 1096 */ f__init(); current_location.update_lineno(1097); /* GGSN_Tests.ttcn, line 1097 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_2, GTPv1C__Templates::t__EuaIPv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1098); /* GGSN_Tests.ttcn, line 1098 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv6__DNS.valueof(); current_location.update_lineno(1099); /* GGSN_Tests.ttcn, line 1099 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1101); /* GGSN_Tests.ttcn, line 1101 */ f__send__gtpu(ctx, f__icmpv6__rs__for__pdp(ctx)); current_location.update_lineno(1102); /* GGSN_Tests.ttcn, line 1102 */ f__wait__rtr__adv(ctx); current_location.update_lineno(1103); /* GGSN_Tests.ttcn, line 1103 */ f__send__gtpu(ctx, f__gen__icmpv6__neigh__solicit__for__pdp(ctx)); current_location.update_lineno(1105); /* GGSN_Tests.ttcn, line 1105 */ OCTETSTRING saddr__ll(ICMPv6__Templates::f__ipv6__link__local(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv6().ipv6__address())); current_location.update_lineno(1106); /* GGSN_Tests.ttcn, line 1106 */ OCTETSTRING saddr__ll__wrong(ICMPv6__Templates::f__ipv6__mangle(saddr__ll, 8)); current_location.update_lineno(1107); /* GGSN_Tests.ttcn, line 1107 */ f__send__gtpu(ctx, ICMPv6__Templates::f__gen__icmpv6__router__solicitation(saddr__ll__wrong)); current_location.update_lineno(1108); /* GGSN_Tests.ttcn, line 1108 */ f__wait__gtpu__fail(ctx); current_location.update_lineno(1110); /* GGSN_Tests.ttcn, line 1110 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1111); /* GGSN_Tests.ttcn, line 1111 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp6_act_deact_gtpu_access_wrong_ll_saddr was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp6__act__deact__gtpu__access__wrong__global__saddr(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1115, TTCN_Location::LOCATION_TESTCASE, "TC_pdp6_act_deact_gtpu_access_wrong_global_saddr"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp6_act_deact_gtpu_access_wrong_global_saddr", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1116); /* GGSN_Tests.ttcn, line 1116 */ f__init(); current_location.update_lineno(1117); /* GGSN_Tests.ttcn, line 1117 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_2, GTPv1C__Templates::t__EuaIPv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1118); /* GGSN_Tests.ttcn, line 1118 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv6__DNS.valueof(); current_location.update_lineno(1119); /* GGSN_Tests.ttcn, line 1119 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1121); /* GGSN_Tests.ttcn, line 1121 */ f__send__gtpu(ctx, f__icmpv6__rs__for__pdp(ctx)); current_location.update_lineno(1122); /* GGSN_Tests.ttcn, line 1122 */ f__wait__rtr__adv(ctx); current_location.update_lineno(1123); /* GGSN_Tests.ttcn, line 1123 */ f__send__gtpu(ctx, f__gen__icmpv6__neigh__solicit__for__pdp(ctx)); current_location.update_lineno(1125); /* GGSN_Tests.ttcn, line 1125 */ OCTETSTRING dns1__addr(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_21, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval)); current_location.update_lineno(1126); /* GGSN_Tests.ttcn, line 1126 */ OCTETSTRING saddr__glob(ICMPv6__Templates::f__ipv6__global(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv6().ipv6__address())); current_location.update_lineno(1127); /* GGSN_Tests.ttcn, line 1127 */ OCTETSTRING saddr__wrong(ICMPv6__Templates::f__ipv6__mangle(saddr__glob, ICMPv6__Templates::f__ipv6__mangle_prefix_defval)); current_location.update_lineno(1128); /* GGSN_Tests.ttcn, line 1128 */ f__send__gtpu(ctx, ICMPv6__Templates::f__gen__icmpv6__echo(saddr__wrong, dns1__addr)); current_location.update_lineno(1129); /* GGSN_Tests.ttcn, line 1129 */ f__wait__gtpu__fail(ctx); current_location.update_lineno(1131); /* GGSN_Tests.ttcn, line 1131 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1132); /* GGSN_Tests.ttcn, line 1132 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp6_act_deact_gtpu_access_wrong_global_saddr was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp6__act__deact__gtpu__access__ipv4__apn6(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1136, TTCN_Location::LOCATION_TESTCASE, "TC_pdp6_act_deact_gtpu_access_ipv4_apn6"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp6_act_deact_gtpu_access_ipv4_apn6", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1137); /* GGSN_Tests.ttcn, line 1137 */ f__init(); current_location.update_lineno(1138); /* GGSN_Tests.ttcn, line 1138 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_2, GTPv1C__Templates::t__EuaIPv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1139); /* GGSN_Tests.ttcn, line 1139 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv6__DNS.valueof(); current_location.update_lineno(1140); /* GGSN_Tests.ttcn, line 1140 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1142); /* GGSN_Tests.ttcn, line 1142 */ f__send__gtpu(ctx, f__icmpv6__rs__for__pdp(ctx)); current_location.update_lineno(1143); /* GGSN_Tests.ttcn, line 1143 */ f__wait__rtr__adv(ctx); current_location.update_lineno(1144); /* GGSN_Tests.ttcn, line 1144 */ f__send__gtpu(ctx, f__gen__icmpv6__neigh__solicit__for__pdp(ctx)); current_location.update_lineno(1146); /* GGSN_Tests.ttcn, line 1146 */ OCTETSTRING saddr__v4(Native__Functions::f__inet__addr(cs_42)); current_location.update_lineno(1147); /* GGSN_Tests.ttcn, line 1147 */ OCTETSTRING daddr__v4(Native__Functions::f__inet__addr(cs_3)); current_location.update_lineno(1148); /* GGSN_Tests.ttcn, line 1148 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr__v4, daddr__v4, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(1149); /* GGSN_Tests.ttcn, line 1149 */ f__wait__gtpu__fail(ctx); current_location.update_lineno(1151); /* GGSN_Tests.ttcn, line 1151 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1152); /* GGSN_Tests.ttcn, line 1152 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp6_act_deact_gtpu_access_ipv4_apn6 was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp6__clients__interact(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1156, TTCN_Location::LOCATION_TESTCASE, "TC_pdp6_clients_interact"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp6_clients_interact", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1157); /* GGSN_Tests.ttcn, line 1157 */ f__init(); current_location.update_lineno(1158); /* GGSN_Tests.ttcn, line 1158 */ PdpContext ctxA(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_2, GTPv1C__Templates::t__EuaIPv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1159); /* GGSN_Tests.ttcn, line 1159 */ PdpContext ctxB(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_2, GTPv1C__Templates::t__EuaIPv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1160); /* GGSN_Tests.ttcn, line 1160 */ f__pdp__ctx__act(ctxA, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1161); /* GGSN_Tests.ttcn, line 1161 */ f__send__gtpu(ctxA, f__icmpv6__rs__for__pdp(ctxA)); current_location.update_lineno(1162); /* GGSN_Tests.ttcn, line 1162 */ f__wait__rtr__adv(ctxA); current_location.update_lineno(1163); /* GGSN_Tests.ttcn, line 1163 */ f__send__gtpu(ctxA, f__gen__icmpv6__neigh__solicit__for__pdp(ctxA)); current_location.update_lineno(1165); /* GGSN_Tests.ttcn, line 1165 */ f__pdp__ctx__act(ctxB, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1166); /* GGSN_Tests.ttcn, line 1166 */ f__send__gtpu(ctxB, f__icmpv6__rs__for__pdp(ctxB)); current_location.update_lineno(1167); /* GGSN_Tests.ttcn, line 1167 */ f__wait__rtr__adv(ctxB); current_location.update_lineno(1168); /* GGSN_Tests.ttcn, line 1168 */ f__send__gtpu(ctxB, f__gen__icmpv6__neigh__solicit__for__pdp(ctxB)); current_location.update_lineno(1170); /* GGSN_Tests.ttcn, line 1170 */ OCTETSTRING addrA__ll(ICMPv6__Templates::f__ipv6__link__local(const_cast< const PdpContext&>(ctxA).eua().endUserAddress().endUserAddressIPv6().ipv6__address())); current_location.update_lineno(1171); /* GGSN_Tests.ttcn, line 1171 */ OCTETSTRING addrB__ll(ICMPv6__Templates::f__ipv6__link__local(const_cast< const PdpContext&>(ctxB).eua().endUserAddress().endUserAddressIPv6().ipv6__address())); current_location.update_lineno(1172); /* GGSN_Tests.ttcn, line 1172 */ OCTETSTRING addrA__glob(ICMPv6__Templates::f__ipv6__global(const_cast< const PdpContext&>(ctxA).eua().endUserAddress().endUserAddressIPv6().ipv6__address())); current_location.update_lineno(1173); /* GGSN_Tests.ttcn, line 1173 */ OCTETSTRING addrB__glob(ICMPv6__Templates::f__ipv6__global(const_cast< const PdpContext&>(ctxB).eua().endUserAddress().endUserAddressIPv6().ipv6__address())); current_location.update_lineno(1176); /* GGSN_Tests.ttcn, line 1176 */ f__send__gtpu(ctxA, ICMPv6__Templates::f__gen__icmpv6__echo(addrA__ll, addrB__ll)); current_location.update_lineno(1177); /* GGSN_Tests.ttcn, line 1177 */ f__wait__gtpu__fail(ctxB); current_location.update_lineno(1180); /* GGSN_Tests.ttcn, line 1180 */ f__send__gtpu(ctxA, ICMPv6__Templates::f__gen__icmpv6__echo(addrA__glob, addrB__glob)); current_location.update_lineno(1181); /* GGSN_Tests.ttcn, line 1181 */ f__wait__gtpu__fail(ctxB); current_location.update_lineno(1183); /* GGSN_Tests.ttcn, line 1183 */ f__pdp__ctx__del(ctxA, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1184); /* GGSN_Tests.ttcn, line 1184 */ f__pdp__ctx__del(ctxB, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1185); /* GGSN_Tests.ttcn, line 1185 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp6_clients_interact was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__deact(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1189, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_deact"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_deact", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1190); /* GGSN_Tests.ttcn, line 1190 */ f__init(); current_location.update_lineno(1191); /* GGSN_Tests.ttcn, line 1191 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1192); /* GGSN_Tests.ttcn, line 1192 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1193); /* GGSN_Tests.ttcn, line 1193 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1194); /* GGSN_Tests.ttcn, line 1194 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_deact was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__deact__ipcp(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1198, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_deact_ipcp"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_deact_ipcp", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1199); /* GGSN_Tests.ttcn, line 1199 */ f__init(); current_location.update_lineno(1200); /* GGSN_Tests.ttcn, line 1200 */ OCTETSTRING ggsn__ip4__dns1(Native__Functions::f__inet__addr(m__ggsn__ip4__dns1)); current_location.update_lineno(1201); /* GGSN_Tests.ttcn, line 1201 */ OCTETSTRING ggsn__ip4__dns2(Native__Functions::f__inet__addr(m__ggsn__ip4__dns2)); current_location.update_lineno(1202); /* GGSN_Tests.ttcn, line 1202 */ INTEGER ipcp__req__id(oct2int(Osmocom__Types::f__rnd__octstring(1))); current_location.update_lineno(1203); /* GGSN_Tests.ttcn, line 1203 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1204); /* GGSN_Tests.ttcn, line 1204 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__IPCP(ipcp__req__id).valueof(); current_location.update_lineno(1205); /* GGSN_Tests.ttcn, line 1205 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1206); /* GGSN_Tests.ttcn, line 1206 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1208); /* GGSN_Tests.ttcn, line 1208 */ if ((!(GTPv1C__Templates::tr__PCO__Contains(os_20).match(const_cast< const PdpContext&>(ctx).pco__neg())))) { current_location.update_lineno(1209); /* GGSN_Tests.ttcn, line 1209 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("IPCP not found in PCO"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1212); /* GGSN_Tests.ttcn, line 1212 */ IPCP__Types::IpcpPacket ipcp(IPCP__Types::dec__IpcpPacket(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_20, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval))); current_location.update_lineno(1213); /* GGSN_Tests.ttcn, line 1213 */ if ((!(GTPv1C__Templates::tr__IPCP__Ack__DNS(INTEGER_template(ipcp__req__id), OCTETSTRING_template(ggsn__ip4__dns1), OCTETSTRING_template(ggsn__ip4__dns2)).match(ipcp)))) { current_location.update_lineno(1214); /* GGSN_Tests.ttcn, line 1214 */ if ((!(GTPv1C__Templates::tr__IPCP__Ack__DNS(INTEGER_template(ipcp__req__id), GTPv1C__Templates::tr__IPCP__Ack__DNS_dns1_defval, GTPv1C__Templates::tr__IPCP__Ack__DNS_dns2_defval).match(ipcp)))) { current_location.update_lineno(1215); /* GGSN_Tests.ttcn, line 1215 */ if ((!(GTPv1C__Templates::tr__IPCP__Ack__DNS(INTEGER_template(ANY_VALUE), GTPv1C__Templates::tr__IPCP__Ack__DNS_dns1_defval, GTPv1C__Templates::tr__IPCP__Ack__DNS_dns2_defval).match(ipcp)))) { current_location.update_lineno(1216); /* GGSN_Tests.ttcn, line 1216 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary/Secondary DNS PCO IPCP option not found"),TTCN_Logger::end_event_log2str())); } else { current_location.update_lineno(1218); /* GGSN_Tests.ttcn, line 1218 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary/Secondary DNS PCO IPCP option found but not matching expected identifier"),TTCN_Logger::end_event_log2str())); } } else { current_location.update_lineno(1221); /* GGSN_Tests.ttcn, line 1221 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary/Secondary DNS PCO IPCP option found but not matching expected values"),TTCN_Logger::end_event_log2str())); } } current_location.update_lineno(1224); /* GGSN_Tests.ttcn, line 1224 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1225); /* GGSN_Tests.ttcn, line 1225 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_deact_ipcp was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__deact__ipcp__pap__broken(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1229, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_deact_ipcp_pap_broken"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_deact_ipcp_pap_broken", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1230); /* GGSN_Tests.ttcn, line 1230 */ f__init(); current_location.update_lineno(1231); /* GGSN_Tests.ttcn, line 1231 */ OCTETSTRING ggsn__ip4__dns1(Native__Functions::f__inet__addr(m__ggsn__ip4__dns1)); current_location.update_lineno(1232); /* GGSN_Tests.ttcn, line 1232 */ OCTETSTRING ggsn__ip4__dns2(Native__Functions::f__inet__addr(m__ggsn__ip4__dns2)); current_location.update_lineno(1233); /* GGSN_Tests.ttcn, line 1233 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1234); /* GGSN_Tests.ttcn, line 1234 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__PAP__IPv4__DNS.valueof(); current_location.update_lineno(1235); /* GGSN_Tests.ttcn, line 1235 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1236); /* GGSN_Tests.ttcn, line 1236 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1238); /* GGSN_Tests.ttcn, line 1238 */ if ((!(GTPv1C__Templates::tr__PCO__Contains(os_20).match(const_cast< const PdpContext&>(ctx).pco__neg())))) { current_location.update_lineno(1239); /* GGSN_Tests.ttcn, line 1239 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("IPCP not found in PCO"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1242); /* GGSN_Tests.ttcn, line 1242 */ IPCP__Types::IpcpPacket ipcp(IPCP__Types::dec__IpcpPacket(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_20, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval))); current_location.update_lineno(1243); /* GGSN_Tests.ttcn, line 1243 */ if ((!(GTPv1C__Templates::tr__IPCP__Ack__DNS(INTEGER_template(0), OCTETSTRING_template(ggsn__ip4__dns1), OCTETSTRING_template(ggsn__ip4__dns2)).match(ipcp)))) { current_location.update_lineno(1244); /* GGSN_Tests.ttcn, line 1244 */ if ((!(GTPv1C__Templates::tr__IPCP__Ack__DNS(INTEGER_template(0), GTPv1C__Templates::tr__IPCP__Ack__DNS_dns1_defval, GTPv1C__Templates::tr__IPCP__Ack__DNS_dns2_defval).match(ipcp)))) { current_location.update_lineno(1245); /* GGSN_Tests.ttcn, line 1245 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary/Secondary DNS PCO IPCP option not found"),TTCN_Logger::end_event_log2str())); } else { current_location.update_lineno(1247); /* GGSN_Tests.ttcn, line 1247 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary/Secondary DNS PCO IPCP option found but not matching expected values"),TTCN_Logger::end_event_log2str())); } } current_location.update_lineno(1251); /* GGSN_Tests.ttcn, line 1251 */ if ((!(GTPv1C__Templates::tr__PCO__Contains(os_18).match(const_cast< const PdpContext&>(ctx).pco__neg())))) { current_location.update_lineno(1252); /* GGSN_Tests.ttcn, line 1252 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("PAP not found in PCO"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1254); /* GGSN_Tests.ttcn, line 1254 */ PAP__Types::PapPacket pap(PAP__Types::dec__PapPacket(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_18, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval))); current_location.update_lineno(1255); /* GGSN_Tests.ttcn, line 1255 */ if ((!(PAP__Types::tr__PAP__AuthAck(PAP__Types::tr__PAP__AuthAck_identifier_defval).match(pap)))) { current_location.update_lineno(1256); /* GGSN_Tests.ttcn, line 1256 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("PAP isn't an AuthenticateAck: "),pap.log(),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1258); /* GGSN_Tests.ttcn, line 1258 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1259); /* GGSN_Tests.ttcn, line 1259 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_deact_ipcp_pap_broken was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__deact__pcodns(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1263, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_deact_pcodns"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_deact_pcodns", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1264); /* GGSN_Tests.ttcn, line 1264 */ f__init(); current_location.update_lineno(1265); /* GGSN_Tests.ttcn, line 1265 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1266); /* GGSN_Tests.ttcn, line 1266 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1267); /* GGSN_Tests.ttcn, line 1267 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1269); /* GGSN_Tests.ttcn, line 1269 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1271); /* GGSN_Tests.ttcn, line 1271 */ OCTETSTRING ggsn__ip4__dns1(Native__Functions::f__inet__addr(m__ggsn__ip4__dns1)); current_location.update_lineno(1272); /* GGSN_Tests.ttcn, line 1272 */ if ((!(OCTETSTRING_template(ggsn__ip4__dns1).match(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, 1))))) { current_location.update_lineno(1273); /* GGSN_Tests.ttcn, line 1273 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary DNS IPv4 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1276); /* GGSN_Tests.ttcn, line 1276 */ OCTETSTRING ggsn__ip4__dns2(Native__Functions::f__inet__addr(m__ggsn__ip4__dns2)); current_location.update_lineno(1277); /* GGSN_Tests.ttcn, line 1277 */ if ((!(OCTETSTRING_template(ggsn__ip4__dns2).match(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, 2))))) { current_location.update_lineno(1278); /* GGSN_Tests.ttcn, line 1278 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Secondary DNS IPv4 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1281); /* GGSN_Tests.ttcn, line 1281 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1282); /* GGSN_Tests.ttcn, line 1282 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_deact_pcodns was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__deact__gtpu__access(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1287, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_deact_gtpu_access"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_deact_gtpu_access", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1288); /* GGSN_Tests.ttcn, line 1288 */ f__init(); current_location.update_lineno(1289); /* GGSN_Tests.ttcn, line 1289 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1290); /* GGSN_Tests.ttcn, line 1290 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1291); /* GGSN_Tests.ttcn, line 1291 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1293); /* GGSN_Tests.ttcn, line 1293 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1294); /* GGSN_Tests.ttcn, line 1294 */ OCTETSTRING dns1__addr(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval)); current_location.update_lineno(1297); /* GGSN_Tests.ttcn, line 1297 */ OCTETSTRING saddr(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4().ipv4__address()); current_location.update_lineno(1298); /* GGSN_Tests.ttcn, line 1298 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(1299); /* GGSN_Tests.ttcn, line 1299 */ f__wait__icmp4__echo__reply(ctx); current_location.update_lineno(1301); /* GGSN_Tests.ttcn, line 1301 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1302); /* GGSN_Tests.ttcn, line 1302 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_deact_gtpu_access was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__deact__gtpu__access__wrong__saddr(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1306, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_deact_gtpu_access_wrong_saddr"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_deact_gtpu_access_wrong_saddr", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1307); /* GGSN_Tests.ttcn, line 1307 */ f__init(); current_location.update_lineno(1308); /* GGSN_Tests.ttcn, line 1308 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1309); /* GGSN_Tests.ttcn, line 1309 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1310); /* GGSN_Tests.ttcn, line 1310 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1312); /* GGSN_Tests.ttcn, line 1312 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1313); /* GGSN_Tests.ttcn, line 1313 */ OCTETSTRING dns1__addr(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval)); current_location.update_lineno(1314); /* GGSN_Tests.ttcn, line 1314 */ OCTETSTRING saddr(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4().ipv4__address()); current_location.update_lineno(1315); /* GGSN_Tests.ttcn, line 1315 */ OCTETSTRING saddr__wrong((substr(saddr, 0, 3) + (const_cast< const OCTETSTRING&>(saddr)[3] ^ os_4))); current_location.update_lineno(1316); /* GGSN_Tests.ttcn, line 1316 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr__wrong, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(1317); /* GGSN_Tests.ttcn, line 1317 */ f__wait__gtpu__fail(ctx); current_location.update_lineno(1319); /* GGSN_Tests.ttcn, line 1319 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1320); /* GGSN_Tests.ttcn, line 1320 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_deact_gtpu_access_wrong_saddr was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__deact__gtpu__access__ipv6__apn4(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1324, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_deact_gtpu_access_ipv6_apn4"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_deact_gtpu_access_ipv6_apn4", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1325); /* GGSN_Tests.ttcn, line 1325 */ f__init(); current_location.update_lineno(1326); /* GGSN_Tests.ttcn, line 1326 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1327); /* GGSN_Tests.ttcn, line 1327 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1328); /* GGSN_Tests.ttcn, line 1328 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1331); /* GGSN_Tests.ttcn, line 1331 */ OCTETSTRING saddr__v6(Native__Functions::f__inet6__addr(cs_43)); current_location.update_lineno(1332); /* GGSN_Tests.ttcn, line 1332 */ f__send__gtpu(ctx, ICMPv6__Templates::f__gen__icmpv6__router__solicitation(saddr__v6)); current_location.update_lineno(1333); /* GGSN_Tests.ttcn, line 1333 */ f__wait__gtpu__fail(ctx); current_location.update_lineno(1335); /* GGSN_Tests.ttcn, line 1335 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1336); /* GGSN_Tests.ttcn, line 1336 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_deact_gtpu_access_ipv6_apn4 was stopped."); } return TTCN_Runtime::end_testcase(); } void f__pdp4__clients__interact() { TTCN_Location current_location("GGSN_Tests.ttcn", 1340, TTCN_Location::LOCATION_FUNCTION, "f_pdp4_clients_interact"); current_location.update_lineno(1341); /* GGSN_Tests.ttcn, line 1341 */ f__init(); current_location.update_lineno(1342); /* GGSN_Tests.ttcn, line 1342 */ PdpContext ctxA(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1343); /* GGSN_Tests.ttcn, line 1343 */ PdpContext ctxB(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1344); /* GGSN_Tests.ttcn, line 1344 */ f__pdp__ctx__act(ctxA, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1345); /* GGSN_Tests.ttcn, line 1345 */ f__pdp__ctx__act(ctxB, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1346); /* GGSN_Tests.ttcn, line 1346 */ OCTETSTRING addrA(const_cast< const PdpContext&>(ctxA).eua().endUserAddress().endUserAddressIPv4().ipv4__address()); current_location.update_lineno(1347); /* GGSN_Tests.ttcn, line 1347 */ OCTETSTRING addrB(const_cast< const PdpContext&>(ctxB).eua().endUserAddress().endUserAddressIPv4().ipv4__address()); current_location.update_lineno(1348); /* GGSN_Tests.ttcn, line 1348 */ f__send__gtpu(ctxA, ICMP__Templates::f__gen__icmpv4__echo(addrA, addrB, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(1349); /* GGSN_Tests.ttcn, line 1349 */ f__wait__icmp4__echo__request(ctxB); current_location.update_lineno(1351); /* GGSN_Tests.ttcn, line 1351 */ f__pdp__ctx__del(ctxA, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1352); /* GGSN_Tests.ttcn, line 1352 */ f__pdp__ctx__del(ctxB, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); } void start_f__pdp4__clients__interact(const COMPONENT& component_reference) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_pdp4_clients_interact("); TTCN_Logger::log_event_str(") on component "); component_reference.log(); TTCN_Logger::log_char('.'); TTCN_Logger::end_event(); Text_Buf text_buf; TTCN_Runtime::prepare_start_component(component_reference, "GGSN_Tests", "f_pdp4_clients_interact", text_buf); TTCN_Runtime::send_start_component(text_buf); } verdicttype testcase_TC__pdp4__clients__interact__with__txseq(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1356, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_clients_interact_with_txseq"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_clients_interact_with_txseq", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1357); /* GGSN_Tests.ttcn, line 1357 */ GT__CT_component_use__gtpu__txseq = TRUE; current_location.update_lineno(1358); /* GGSN_Tests.ttcn, line 1358 */ f__pdp4__clients__interact(); current_location.update_lineno(1359); /* GGSN_Tests.ttcn, line 1359 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_clients_interact_with_txseq was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__clients__interact__without__txseq(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1363, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_clients_interact_without_txseq"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_clients_interact_without_txseq", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1364); /* GGSN_Tests.ttcn, line 1364 */ GT__CT_component_use__gtpu__txseq = FALSE; current_location.update_lineno(1365); /* GGSN_Tests.ttcn, line 1365 */ f__pdp4__clients__interact(); current_location.update_lineno(1366); /* GGSN_Tests.ttcn, line 1366 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_clients_interact_without_txseq was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__echo__req__resp(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1369, TTCN_Location::LOCATION_TESTCASE, "TC_echo_req_resp"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_echo_req_resp", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1370); /* GGSN_Tests.ttcn, line 1370 */ f__init(); current_location.update_lineno(1371); /* GGSN_Tests.ttcn, line 1371 */ f__send__gtpc(GTPv1C__Templates::ts__GTPC__PING(GT__CT_component_g__peer__c, GT__CT_component_g__c__seq__nr)); current_location.update_lineno(1372); /* GGSN_Tests.ttcn, line 1372 */ GT__CT_component_T__default.start(); current_location.update_lineno(1373); /* GGSN_Tests.ttcn, line 1373 */ { tmp_199: alt_status tmp_199_alt_flag_0 = ALT_MAYBE; alt_status tmp_199_alt_flag_1 = ALT_MAYBE; alt_status tmp_199_alt_flag_2 = ALT_MAYBE; alt_status tmp_199_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_199_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1374); /* GGSN_Tests.ttcn, line 1374 */ tmp_199_alt_flag_0 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__PONG(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c)), NULL, any_compref, NULL, NULL, NULL); if (tmp_199_alt_flag_0 == ALT_YES) { current_location.update_lineno(1374); /* GGSN_Tests.ttcn, line 1374 */ TTCN_Runtime::setverdict(PASS); break; } } if (tmp_199_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(1375); /* GGSN_Tests.ttcn, line 1375 */ tmp_199_alt_flag_1 = GT__CT_component_GTPC.receive(any_compref, NULL, NULL, NULL); if (tmp_199_alt_flag_1 == ALT_YES) { current_location.update_lineno(1375); /* GGSN_Tests.ttcn, line 1375 */ goto tmp_199; } } if (tmp_199_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(1376); /* GGSN_Tests.ttcn, line 1376 */ tmp_199_alt_flag_2 = GT__CT_component_T__default.timeout(NULL); if (tmp_199_alt_flag_2 == ALT_YES) { current_location.update_lineno(1376); /* GGSN_Tests.ttcn, line 1376 */ TTCN_Runtime::setverdict(FAIL); break; } } if (tmp_199_default_flag == ALT_MAYBE) { tmp_199_default_flag = TTCN_Default::try_altsteps(); if (tmp_199_default_flag == ALT_YES || tmp_199_default_flag == ALT_BREAK) break; else if (tmp_199_default_flag == ALT_REPEAT) goto tmp_199; } current_location.update_lineno(1373); /* GGSN_Tests.ttcn, line 1373 */ if (tmp_199_alt_flag_0 == ALT_NO && tmp_199_alt_flag_1 == ALT_NO && tmp_199_alt_flag_2 == ALT_NO && tmp_199_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 1373 and 1377."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(1378); /* GGSN_Tests.ttcn, line 1378 */ GT__CT_component_T__default.stop(); current_location.update_lineno(1379); /* GGSN_Tests.ttcn, line 1379 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_echo_req_resp was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__echo__req__resp__gtpu(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1382, TTCN_Location::LOCATION_TESTCASE, "TC_echo_req_resp_gtpu"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_echo_req_resp_gtpu", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1383); /* GGSN_Tests.ttcn, line 1383 */ f__init(); current_location.update_lineno(1384); /* GGSN_Tests.ttcn, line 1384 */ GT__CT_component_GTPU.send(GTPv1U__Templates::ts__GTPU__PING(GT__CT_component_g__peer__u, GT__CT_component_g__d__seq__nr), NULL); current_location.update_lineno(1385); /* GGSN_Tests.ttcn, line 1385 */ GT__CT_component_T__default.start(); current_location.update_lineno(1386); /* GGSN_Tests.ttcn, line 1386 */ { tmp_200: alt_status tmp_200_alt_flag_0 = ALT_MAYBE; alt_status tmp_200_alt_flag_1 = ALT_MAYBE; alt_status tmp_200_alt_flag_2 = ALT_MAYBE; alt_status tmp_200_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_200_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1387); /* GGSN_Tests.ttcn, line 1387 */ tmp_200_alt_flag_0 = GT__CT_component_GTPU.receive(GTPv1U__Templates::tr__GTPU__PONG(GTPv1U__CodecPort::Gtp1uPeer_template(GT__CT_component_g__peer__u)), NULL, any_compref, NULL, NULL, NULL); if (tmp_200_alt_flag_0 == ALT_YES) { current_location.update_lineno(1387); /* GGSN_Tests.ttcn, line 1387 */ TTCN_Runtime::setverdict(PASS); break; } } if (tmp_200_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(1388); /* GGSN_Tests.ttcn, line 1388 */ tmp_200_alt_flag_1 = GT__CT_component_GTPU.receive(any_compref, NULL, NULL, NULL); if (tmp_200_alt_flag_1 == ALT_YES) { current_location.update_lineno(1388); /* GGSN_Tests.ttcn, line 1388 */ goto tmp_200; } } if (tmp_200_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(1389); /* GGSN_Tests.ttcn, line 1389 */ tmp_200_alt_flag_2 = GT__CT_component_T__default.timeout(NULL); if (tmp_200_alt_flag_2 == ALT_YES) { current_location.update_lineno(1389); /* GGSN_Tests.ttcn, line 1389 */ TTCN_Runtime::setverdict(FAIL); break; } } if (tmp_200_default_flag == ALT_MAYBE) { tmp_200_default_flag = TTCN_Default::try_altsteps(); if (tmp_200_default_flag == ALT_YES || tmp_200_default_flag == ALT_BREAK) break; else if (tmp_200_default_flag == ALT_REPEAT) goto tmp_200; } current_location.update_lineno(1386); /* GGSN_Tests.ttcn, line 1386 */ if (tmp_200_alt_flag_0 == ALT_NO && tmp_200_alt_flag_1 == ALT_NO && tmp_200_alt_flag_2 == ALT_NO && tmp_200_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 1386 and 1390."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(1391); /* GGSN_Tests.ttcn, line 1391 */ GT__CT_component_T__default.stop(); current_location.update_lineno(1392); /* GGSN_Tests.ttcn, line 1392 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_echo_req_resp_gtpu was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__deact__with__single__dns(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1397, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_deact_with_single_dns"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_deact_with_single_dns", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1403); /* GGSN_Tests.ttcn, line 1403 */ f__init(); current_location.update_lineno(1404); /* GGSN_Tests.ttcn, line 1404 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1405); /* GGSN_Tests.ttcn, line 1405 */ OCTETSTRING ggsn__ip4__dns1(Native__Functions::f__inet__addr(m__ggsn__ip4__dns1)); current_location.update_lineno(1406); /* GGSN_Tests.ttcn, line 1406 */ OCTETSTRING ggsn__ip4__dns2(Native__Functions::f__inet__addr(m__ggsn__ip4__dns2)); current_location.update_lineno(1407); /* GGSN_Tests.ttcn, line 1407 */ OCTETSTRING pco__neg__dns; current_location.update_lineno(1408); /* GGSN_Tests.ttcn, line 1408 */ OCTETSTRING pco__neg__dns__expected; current_location.update_lineno(1411); /* GGSN_Tests.ttcn, line 1411 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__PRI__DNS__IPCP.valueof(); current_location.update_lineno(1412); /* GGSN_Tests.ttcn, line 1412 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1413); /* GGSN_Tests.ttcn, line 1413 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1414); /* GGSN_Tests.ttcn, line 1414 */ pco__neg__dns = GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_20, 1); current_location.update_lineno(1415); /* GGSN_Tests.ttcn, line 1415 */ pco__neg__dns__expected = (os_23 + ggsn__ip4__dns1); current_location.update_lineno(1423); /* GGSN_Tests.ttcn, line 1423 */ if ((!(OCTETSTRING_template(pco__neg__dns__expected).match(pco__neg__dns)))) { current_location.update_lineno(1424); /* GGSN_Tests.ttcn, line 1424 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary DNS IPv4 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1426); /* GGSN_Tests.ttcn, line 1426 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1429); /* GGSN_Tests.ttcn, line 1429 */ ctx = t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof(); current_location.update_lineno(1430); /* GGSN_Tests.ttcn, line 1430 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__SEC__DNS__IPCP.valueof(); current_location.update_lineno(1431); /* GGSN_Tests.ttcn, line 1431 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1432); /* GGSN_Tests.ttcn, line 1432 */ pco__neg__dns = GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_20, 1); current_location.update_lineno(1433); /* GGSN_Tests.ttcn, line 1433 */ pco__neg__dns__expected = (os_24 + ggsn__ip4__dns2); current_location.update_lineno(1434); /* GGSN_Tests.ttcn, line 1434 */ if ((!(OCTETSTRING_template(pco__neg__dns__expected).match(pco__neg__dns)))) { current_location.update_lineno(1435); /* GGSN_Tests.ttcn, line 1435 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Secondary DNS IPv4 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1437); /* GGSN_Tests.ttcn, line 1437 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1438); /* GGSN_Tests.ttcn, line 1438 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_deact_with_single_dns was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__deact__with__separate__dns(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1444, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_deact_with_separate_dns"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_deact_with_separate_dns", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1450); /* GGSN_Tests.ttcn, line 1450 */ f__init(); current_location.update_lineno(1451); /* GGSN_Tests.ttcn, line 1451 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1452); /* GGSN_Tests.ttcn, line 1452 */ OCTETSTRING ggsn__ip4__dns1(Native__Functions::f__inet__addr(m__ggsn__ip4__dns1)); current_location.update_lineno(1453); /* GGSN_Tests.ttcn, line 1453 */ OCTETSTRING ggsn__ip4__dns2(Native__Functions::f__inet__addr(m__ggsn__ip4__dns2)); current_location.update_lineno(1454); /* GGSN_Tests.ttcn, line 1454 */ OCTETSTRING pco__neg__dns; current_location.update_lineno(1455); /* GGSN_Tests.ttcn, line 1455 */ OCTETSTRING pco__neg__dns__expected; current_location.update_lineno(1457); /* GGSN_Tests.ttcn, line 1457 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__SEPARATE__DNS__IPCP.valueof(); current_location.update_lineno(1458); /* GGSN_Tests.ttcn, line 1458 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1461); /* GGSN_Tests.ttcn, line 1461 */ pco__neg__dns = GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_20, 1); current_location.update_lineno(1462); /* GGSN_Tests.ttcn, line 1462 */ pco__neg__dns__expected = (os_23 + ggsn__ip4__dns1); current_location.update_lineno(1463); /* GGSN_Tests.ttcn, line 1463 */ if ((!(OCTETSTRING_template(pco__neg__dns__expected).match(pco__neg__dns)))) { current_location.update_lineno(1464); /* GGSN_Tests.ttcn, line 1464 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary DNS IPv4 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1469); /* GGSN_Tests.ttcn, line 1469 */ pco__neg__dns = GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_20, 2); current_location.update_lineno(1470); /* GGSN_Tests.ttcn, line 1470 */ pco__neg__dns__expected = (os_24 + ggsn__ip4__dns2); current_location.update_lineno(1471); /* GGSN_Tests.ttcn, line 1471 */ if ((!(OCTETSTRING_template(pco__neg__dns__expected).match(pco__neg__dns)))) { current_location.update_lineno(1472); /* GGSN_Tests.ttcn, line 1472 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Secondary DNS IPv4 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1474); /* GGSN_Tests.ttcn, line 1474 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1475); /* GGSN_Tests.ttcn, line 1475 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_deact_with_separate_dns was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__update__teic(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1479, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_update_teic"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_update_teic", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1480); /* GGSN_Tests.ttcn, line 1480 */ f__init(); current_location.update_lineno(1481); /* GGSN_Tests.ttcn, line 1481 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1482); /* GGSN_Tests.ttcn, line 1482 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1483); /* GGSN_Tests.ttcn, line 1483 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1486); /* GGSN_Tests.ttcn, line 1486 */ OCTETSTRING new__teic(const_cast< const PdpContext&>(ctx).teic()); current_location.update_lineno(1487); /* GGSN_Tests.ttcn, line 1487 */ { OCTETSTRING tmp_214; tmp_214 = (const_cast< const OCTETSTRING&>(new__teic)[3] ^ os_4); new__teic[3] = tmp_214; } current_location.update_lineno(1488); /* GGSN_Tests.ttcn, line 1488 */ f__pdp__ctx__update(ctx, f__pdp__ctx__update_exp__cause_defval, f__pdp__ctx__update_new__teid_defval, OCTETSTRING_template(new__teic)); current_location.update_lineno(1490); /* GGSN_Tests.ttcn, line 1490 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1491); /* GGSN_Tests.ttcn, line 1491 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_update_teic was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp4__act__update__teid(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1495, TTCN_Location::LOCATION_TESTCASE, "TC_pdp4_act_update_teid"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp4_act_update_teid", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1496); /* GGSN_Tests.ttcn, line 1496 */ f__init(); current_location.update_lineno(1497); /* GGSN_Tests.ttcn, line 1497 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1498); /* GGSN_Tests.ttcn, line 1498 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1499); /* GGSN_Tests.ttcn, line 1499 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1501); /* GGSN_Tests.ttcn, line 1501 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1502); /* GGSN_Tests.ttcn, line 1502 */ OCTETSTRING dns1__addr(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval)); current_location.update_lineno(1503); /* GGSN_Tests.ttcn, line 1503 */ OCTETSTRING saddr(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4().ipv4__address()); current_location.update_lineno(1506); /* GGSN_Tests.ttcn, line 1506 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(1507); /* GGSN_Tests.ttcn, line 1507 */ f__wait__icmp4__echo__reply(ctx); current_location.update_lineno(1510); /* GGSN_Tests.ttcn, line 1510 */ OCTETSTRING new__teid(const_cast< const PdpContext&>(ctx).teid()); current_location.update_lineno(1511); /* GGSN_Tests.ttcn, line 1511 */ { OCTETSTRING tmp_216; tmp_216 = (const_cast< const OCTETSTRING&>(new__teid)[3] ^ os_4); new__teid[3] = tmp_216; } current_location.update_lineno(1512); /* GGSN_Tests.ttcn, line 1512 */ f__pdp__ctx__update(ctx, f__pdp__ctx__update_exp__cause_defval, OCTETSTRING_template(new__teid), f__pdp__ctx__update_new__teic_defval); current_location.update_lineno(1515); /* GGSN_Tests.ttcn, line 1515 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(1516); /* GGSN_Tests.ttcn, line 1516 */ f__wait__icmp4__echo__reply(ctx); current_location.update_lineno(1518); /* GGSN_Tests.ttcn, line 1518 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1519); /* GGSN_Tests.ttcn, line 1519 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp4_act_update_teid was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__act__deact(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1523, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_act_deact"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_act_deact", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1524); /* GGSN_Tests.ttcn, line 1524 */ f__init(); current_location.update_lineno(1525); /* GGSN_Tests.ttcn, line 1525 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1526); /* GGSN_Tests.ttcn, line 1526 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1527); /* GGSN_Tests.ttcn, line 1527 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1528); /* GGSN_Tests.ttcn, line 1528 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_act_deact was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__act__deact__ipcp(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1532, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_act_deact_ipcp"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_act_deact_ipcp", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1533); /* GGSN_Tests.ttcn, line 1533 */ f__init(); current_location.update_lineno(1534); /* GGSN_Tests.ttcn, line 1534 */ OCTETSTRING ggsn__ip4__dns1(Native__Functions::f__inet__addr(m__ggsn__ip4__dns1)); current_location.update_lineno(1535); /* GGSN_Tests.ttcn, line 1535 */ OCTETSTRING ggsn__ip4__dns2(Native__Functions::f__inet__addr(m__ggsn__ip4__dns2)); current_location.update_lineno(1536); /* GGSN_Tests.ttcn, line 1536 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1537); /* GGSN_Tests.ttcn, line 1537 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__IPCP(GTPv1C__Templates::ts__PCO__IPv4__DNS__IPCP_ipcp__req__id_defval).valueof(); current_location.update_lineno(1538); /* GGSN_Tests.ttcn, line 1538 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1539); /* GGSN_Tests.ttcn, line 1539 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1541); /* GGSN_Tests.ttcn, line 1541 */ if ((!(GTPv1C__Templates::tr__PCO__Contains(os_20).match(const_cast< const PdpContext&>(ctx).pco__neg())))) { current_location.update_lineno(1542); /* GGSN_Tests.ttcn, line 1542 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("IPCP not found in PCO"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1544); /* GGSN_Tests.ttcn, line 1544 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1546); /* GGSN_Tests.ttcn, line 1546 */ IPCP__Types::IpcpPacket ipcp(IPCP__Types::dec__IpcpPacket(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_20, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval))); current_location.update_lineno(1547); /* GGSN_Tests.ttcn, line 1547 */ if ((!(GTPv1C__Templates::tr__IPCP__Ack__DNS(INTEGER_template(0), OCTETSTRING_template(ggsn__ip4__dns1), OCTETSTRING_template(ggsn__ip4__dns2)).match(ipcp)))) { current_location.update_lineno(1548); /* GGSN_Tests.ttcn, line 1548 */ if ((!(GTPv1C__Templates::tr__IPCP__Ack__DNS(INTEGER_template(0), GTPv1C__Templates::tr__IPCP__Ack__DNS_dns1_defval, GTPv1C__Templates::tr__IPCP__Ack__DNS_dns2_defval).match(ipcp)))) { current_location.update_lineno(1549); /* GGSN_Tests.ttcn, line 1549 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary/Secondary DNS PCO IPCP option not found"),TTCN_Logger::end_event_log2str())); } else { current_location.update_lineno(1551); /* GGSN_Tests.ttcn, line 1551 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary/Secondary DNS PCO IPCP option found but not matching expected values"),TTCN_Logger::end_event_log2str())); } } current_location.update_lineno(1554); /* GGSN_Tests.ttcn, line 1554 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1555); /* GGSN_Tests.ttcn, line 1555 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_act_deact_ipcp was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__act__deact__icmp6(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1559, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_act_deact_icmp6"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_act_deact_icmp6", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1560); /* GGSN_Tests.ttcn, line 1560 */ f__init(); current_location.update_lineno(1561); /* GGSN_Tests.ttcn, line 1561 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1562); /* GGSN_Tests.ttcn, line 1562 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv6__DNS.valueof(); current_location.update_lineno(1563); /* GGSN_Tests.ttcn, line 1563 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1565); /* GGSN_Tests.ttcn, line 1565 */ f__send__gtpu(ctx, f__icmpv6__rs__for__pdp46(ctx)); current_location.update_lineno(1566); /* GGSN_Tests.ttcn, line 1566 */ f__wait__rtr__adv(ctx); current_location.update_lineno(1567); /* GGSN_Tests.ttcn, line 1567 */ f__send__gtpu(ctx, f__gen__icmpv6__neigh__solicit__for__pdp46(ctx)); current_location.update_lineno(1569); /* GGSN_Tests.ttcn, line 1569 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1570); /* GGSN_Tests.ttcn, line 1570 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_act_deact_icmp6 was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__act__deact__pcodns4(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1574, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_act_deact_pcodns4"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_act_deact_pcodns4", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1575); /* GGSN_Tests.ttcn, line 1575 */ f__init(); current_location.update_lineno(1577); /* GGSN_Tests.ttcn, line 1577 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1578); /* GGSN_Tests.ttcn, line 1578 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1579); /* GGSN_Tests.ttcn, line 1579 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1581); /* GGSN_Tests.ttcn, line 1581 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1583); /* GGSN_Tests.ttcn, line 1583 */ OCTETSTRING ggsn__ip4__dns1(Native__Functions::f__inet__addr(m__ggsn__ip4__dns1)); current_location.update_lineno(1584); /* GGSN_Tests.ttcn, line 1584 */ if ((!(OCTETSTRING_template(ggsn__ip4__dns1).match(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, 1))))) { current_location.update_lineno(1585); /* GGSN_Tests.ttcn, line 1585 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary DNS IPv4 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1588); /* GGSN_Tests.ttcn, line 1588 */ OCTETSTRING ggsn__ip4__dns2(Native__Functions::f__inet__addr(m__ggsn__ip4__dns2)); current_location.update_lineno(1589); /* GGSN_Tests.ttcn, line 1589 */ if ((!(OCTETSTRING_template(ggsn__ip4__dns2).match(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, 2))))) { current_location.update_lineno(1590); /* GGSN_Tests.ttcn, line 1590 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Secondary DNS IPv4 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1593); /* GGSN_Tests.ttcn, line 1593 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1594); /* GGSN_Tests.ttcn, line 1594 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_act_deact_pcodns4 was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__act__deact__pcodns6(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1598, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_act_deact_pcodns6"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_act_deact_pcodns6", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1599); /* GGSN_Tests.ttcn, line 1599 */ f__init(); current_location.update_lineno(1601); /* GGSN_Tests.ttcn, line 1601 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1602); /* GGSN_Tests.ttcn, line 1602 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv6__DNS.valueof(); current_location.update_lineno(1603); /* GGSN_Tests.ttcn, line 1603 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1605); /* GGSN_Tests.ttcn, line 1605 */ f__PCO__ensure__no__duplicates(const_cast< const PdpContext&>(ctx).pco__neg()); current_location.update_lineno(1607); /* GGSN_Tests.ttcn, line 1607 */ OCTETSTRING ggsn__ip6__dns1(Native__Functions::f__inet6__addr(m__ggsn__ip6__dns1)); current_location.update_lineno(1608); /* GGSN_Tests.ttcn, line 1608 */ if ((!(OCTETSTRING_template(ggsn__ip6__dns1).match(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_21, 1))))) { current_location.update_lineno(1609); /* GGSN_Tests.ttcn, line 1609 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Primary DNS IPv6 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1612); /* GGSN_Tests.ttcn, line 1612 */ OCTETSTRING ggsn__ip6__dns2(Native__Functions::f__inet6__addr(m__ggsn__ip6__dns2)); current_location.update_lineno(1613); /* GGSN_Tests.ttcn, line 1613 */ if ((!(OCTETSTRING_template(ggsn__ip6__dns2).match(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_21, 2))))) { current_location.update_lineno(1614); /* GGSN_Tests.ttcn, line 1614 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Secondary DNS IPv6 PCO option not found"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1617); /* GGSN_Tests.ttcn, line 1617 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1618); /* GGSN_Tests.ttcn, line 1618 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_act_deact_pcodns6 was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__act__deact__gtpu__access(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1623, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_act_deact_gtpu_access"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_act_deact_gtpu_access", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1624); /* GGSN_Tests.ttcn, line 1624 */ f__init(); current_location.update_lineno(1625); /* GGSN_Tests.ttcn, line 1625 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1626); /* GGSN_Tests.ttcn, line 1626 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1627); /* GGSN_Tests.ttcn, line 1627 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1629); /* GGSN_Tests.ttcn, line 1629 */ OCTETSTRING dns1__addr(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval)); current_location.update_lineno(1632); /* GGSN_Tests.ttcn, line 1632 */ OCTETSTRING saddr(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv4__address()); current_location.update_lineno(1633); /* GGSN_Tests.ttcn, line 1633 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(1634); /* GGSN_Tests.ttcn, line 1634 */ f__wait__icmp4__echo__reply(ctx); current_location.update_lineno(1636); /* GGSN_Tests.ttcn, line 1636 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1637); /* GGSN_Tests.ttcn, line 1637 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_act_deact_gtpu_access was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__act__deact__gtpu__access__wrong__saddr__ipv4(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1641, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_act_deact_gtpu_access_wrong_saddr_ipv4"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_act_deact_gtpu_access_wrong_saddr_ipv4", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1642); /* GGSN_Tests.ttcn, line 1642 */ f__init(); current_location.update_lineno(1643); /* GGSN_Tests.ttcn, line 1643 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1644); /* GGSN_Tests.ttcn, line 1644 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1645); /* GGSN_Tests.ttcn, line 1645 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1647); /* GGSN_Tests.ttcn, line 1647 */ OCTETSTRING dns1__addr(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval)); current_location.update_lineno(1648); /* GGSN_Tests.ttcn, line 1648 */ OCTETSTRING saddr(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv4__address()); current_location.update_lineno(1649); /* GGSN_Tests.ttcn, line 1649 */ OCTETSTRING saddr__wrong((substr(saddr, 0, 3) + (const_cast< const OCTETSTRING&>(saddr)[3] ^ os_4))); current_location.update_lineno(1650); /* GGSN_Tests.ttcn, line 1650 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr__wrong, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(1651); /* GGSN_Tests.ttcn, line 1651 */ f__wait__gtpu__fail(ctx); current_location.update_lineno(1653); /* GGSN_Tests.ttcn, line 1653 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1654); /* GGSN_Tests.ttcn, line 1654 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_act_deact_gtpu_access_wrong_saddr_ipv4 was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__act__deact__gtpu__access__wrong__ll__saddr__ipv6(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1658, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_act_deact_gtpu_access_wrong_ll_saddr_ipv6"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_act_deact_gtpu_access_wrong_ll_saddr_ipv6", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1659); /* GGSN_Tests.ttcn, line 1659 */ f__init(); current_location.update_lineno(1660); /* GGSN_Tests.ttcn, line 1660 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1661); /* GGSN_Tests.ttcn, line 1661 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1662); /* GGSN_Tests.ttcn, line 1662 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1664); /* GGSN_Tests.ttcn, line 1664 */ OCTETSTRING saddr__ll(ICMPv6__Templates::f__ipv6__link__local(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv6__address())); current_location.update_lineno(1665); /* GGSN_Tests.ttcn, line 1665 */ OCTETSTRING saddr__ll__wrong(ICMPv6__Templates::f__ipv6__mangle(saddr__ll, 8)); current_location.update_lineno(1666); /* GGSN_Tests.ttcn, line 1666 */ f__send__gtpu(ctx, ICMPv6__Templates::f__gen__icmpv6__router__solicitation(saddr__ll__wrong)); current_location.update_lineno(1667); /* GGSN_Tests.ttcn, line 1667 */ f__wait__gtpu__fail(ctx); current_location.update_lineno(1669); /* GGSN_Tests.ttcn, line 1669 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1670); /* GGSN_Tests.ttcn, line 1670 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_act_deact_gtpu_access_wrong_ll_saddr_ipv6 was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__act__deact__gtpu__access__wrong__global__saddr__ipv6(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1674, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_act_deact_gtpu_access_wrong_global_saddr_ipv6"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_act_deact_gtpu_access_wrong_global_saddr_ipv6", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1675); /* GGSN_Tests.ttcn, line 1675 */ f__init(); current_location.update_lineno(1676); /* GGSN_Tests.ttcn, line 1676 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1677); /* GGSN_Tests.ttcn, line 1677 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv6__DNS.valueof(); current_location.update_lineno(1678); /* GGSN_Tests.ttcn, line 1678 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1680); /* GGSN_Tests.ttcn, line 1680 */ f__send__gtpu(ctx, f__icmpv6__rs__for__pdp(ctx)); current_location.update_lineno(1681); /* GGSN_Tests.ttcn, line 1681 */ f__wait__rtr__adv(ctx); current_location.update_lineno(1682); /* GGSN_Tests.ttcn, line 1682 */ f__send__gtpu(ctx, f__gen__icmpv6__neigh__solicit__for__pdp(ctx)); current_location.update_lineno(1684); /* GGSN_Tests.ttcn, line 1684 */ OCTETSTRING dns1__addr(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_21, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval)); current_location.update_lineno(1685); /* GGSN_Tests.ttcn, line 1685 */ OCTETSTRING saddr__glob(ICMPv6__Templates::f__ipv6__global(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv6__address())); current_location.update_lineno(1686); /* GGSN_Tests.ttcn, line 1686 */ OCTETSTRING saddr__wrong(ICMPv6__Templates::f__ipv6__mangle(saddr__glob, ICMPv6__Templates::f__ipv6__mangle_prefix_defval)); current_location.update_lineno(1687); /* GGSN_Tests.ttcn, line 1687 */ f__send__gtpu(ctx, ICMPv6__Templates::f__gen__icmpv6__echo(saddr__wrong, dns1__addr)); current_location.update_lineno(1688); /* GGSN_Tests.ttcn, line 1688 */ f__wait__gtpu__fail(ctx); current_location.update_lineno(1690); /* GGSN_Tests.ttcn, line 1690 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1691); /* GGSN_Tests.ttcn, line 1691 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_act_deact_gtpu_access_wrong_global_saddr_ipv6 was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__clients__interact(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1695, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_clients_interact"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_clients_interact", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1696); /* GGSN_Tests.ttcn, line 1696 */ f__init(); current_location.update_lineno(1697); /* GGSN_Tests.ttcn, line 1697 */ PdpContext ctxA(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1698); /* GGSN_Tests.ttcn, line 1698 */ PdpContext ctxB(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_3, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1699); /* GGSN_Tests.ttcn, line 1699 */ f__pdp__ctx__act(ctxA, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1700); /* GGSN_Tests.ttcn, line 1700 */ f__send__gtpu(ctxA, f__icmpv6__rs__for__pdp46(ctxA)); current_location.update_lineno(1701); /* GGSN_Tests.ttcn, line 1701 */ f__wait__rtr__adv(ctxA); current_location.update_lineno(1702); /* GGSN_Tests.ttcn, line 1702 */ f__send__gtpu(ctxA, f__gen__icmpv6__neigh__solicit__for__pdp46(ctxA)); current_location.update_lineno(1704); /* GGSN_Tests.ttcn, line 1704 */ f__pdp__ctx__act(ctxB, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1705); /* GGSN_Tests.ttcn, line 1705 */ f__send__gtpu(ctxB, f__icmpv6__rs__for__pdp46(ctxB)); current_location.update_lineno(1706); /* GGSN_Tests.ttcn, line 1706 */ f__wait__rtr__adv(ctxB); current_location.update_lineno(1707); /* GGSN_Tests.ttcn, line 1707 */ f__send__gtpu(ctxB, f__gen__icmpv6__neigh__solicit__for__pdp46(ctxB)); current_location.update_lineno(1709); /* GGSN_Tests.ttcn, line 1709 */ OCTETSTRING addrA__ll(ICMPv6__Templates::f__ipv6__link__local(const_cast< const PdpContext&>(ctxA).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv6__address())); current_location.update_lineno(1710); /* GGSN_Tests.ttcn, line 1710 */ OCTETSTRING addrB__ll(ICMPv6__Templates::f__ipv6__link__local(const_cast< const PdpContext&>(ctxB).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv6__address())); current_location.update_lineno(1711); /* GGSN_Tests.ttcn, line 1711 */ OCTETSTRING addrA__glob(ICMPv6__Templates::f__ipv6__global(const_cast< const PdpContext&>(ctxA).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv6__address())); current_location.update_lineno(1712); /* GGSN_Tests.ttcn, line 1712 */ OCTETSTRING addrB__glob(ICMPv6__Templates::f__ipv6__global(const_cast< const PdpContext&>(ctxB).eua().endUserAddress().endUserAddressIPv4andIPv6().ipv6__address())); current_location.update_lineno(1715); /* GGSN_Tests.ttcn, line 1715 */ f__send__gtpu(ctxA, ICMPv6__Templates::f__gen__icmpv6__echo(addrA__ll, addrB__ll)); current_location.update_lineno(1716); /* GGSN_Tests.ttcn, line 1716 */ f__wait__gtpu__fail(ctxB); current_location.update_lineno(1719); /* GGSN_Tests.ttcn, line 1719 */ f__send__gtpu(ctxA, ICMPv6__Templates::f__gen__icmpv6__echo(addrA__glob, addrB__glob)); current_location.update_lineno(1720); /* GGSN_Tests.ttcn, line 1720 */ f__wait__gtpu__fail(ctxB); current_location.update_lineno(1722); /* GGSN_Tests.ttcn, line 1722 */ f__pdp__ctx__del(ctxA, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1723); /* GGSN_Tests.ttcn, line 1723 */ f__pdp__ctx__del(ctxB, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1724); /* GGSN_Tests.ttcn, line 1724 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_clients_interact was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp46__act__deact__apn4(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1728, TTCN_Location::LOCATION_TESTCASE, "TC_pdp46_act_deact_apn4"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp46_act_deact_apn4", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1729); /* GGSN_Tests.ttcn, line 1729 */ OCTETSTRING cause__accept(os_12); current_location.update_lineno(1730); /* GGSN_Tests.ttcn, line 1730 */ OCTETSTRING cause__new__pdp__type(os_13); current_location.update_lineno(1731); /* GGSN_Tests.ttcn, line 1731 */ OCTETSTRING cause__unknown__pdp(os_25); current_location.update_lineno(1732); /* GGSN_Tests.ttcn, line 1732 */ GTPC__Types::CreatePDPContextResponse cpr; current_location.update_lineno(1734); /* GGSN_Tests.ttcn, line 1734 */ f__init(); current_location.update_lineno(1735); /* GGSN_Tests.ttcn, line 1735 */ PdpContext ctx46(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dynv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1736); /* GGSN_Tests.ttcn, line 1736 */ { OCTETSTRING_template tmp_226; tmp_226.set_type(VALUE_LIST, 2); tmp_226.list_item(0) = os_25; tmp_226.list_item(1) = os_13; cpr = f__pdp__ctx__act(ctx46, tmp_226); } current_location.update_lineno(1738); /* GGSN_Tests.ttcn, line 1738 */ if ((const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).cause().causevalue() == os_13)) { current_location.update_lineno(1746); /* GGSN_Tests.ttcn, line 1746 */ f__pdp__ctx__del(ctx46, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); } else { current_location.update_lineno(1755); /* GGSN_Tests.ttcn, line 1755 */ PdpContext ctx4(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1756); /* GGSN_Tests.ttcn, line 1756 */ f__pdp__ctx__act(ctx4, OCTETSTRING_template(os_12)); current_location.update_lineno(1758); /* GGSN_Tests.ttcn, line 1758 */ PdpContext ctx6(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv6Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1759); /* GGSN_Tests.ttcn, line 1759 */ f__pdp__ctx__act(ctx6, OCTETSTRING_template(os_25)); current_location.update_lineno(1761); /* GGSN_Tests.ttcn, line 1761 */ f__pdp__ctx__del(ctx4, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); } current_location.update_lineno(1763); /* GGSN_Tests.ttcn, line 1763 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp46_act_deact_apn4 was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp__act2__recovery(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1767, TTCN_Location::LOCATION_TESTCASE, "TC_pdp_act2_recovery"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp_act2_recovery", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1768); /* GGSN_Tests.ttcn, line 1768 */ GTPv1C__CodecPort::Gtp1cUnitdata ud; current_location.update_lineno(1769); /* GGSN_Tests.ttcn, line 1769 */ DEFAULT d; current_location.update_lineno(1770); /* GGSN_Tests.ttcn, line 1770 */ BOOLEAN ctxA__deleted(FALSE); current_location.update_lineno(1771); /* GGSN_Tests.ttcn, line 1771 */ BOOLEAN ctxB__created(FALSE); current_location.update_lineno(1773); /* GGSN_Tests.ttcn, line 1773 */ f__init(); current_location.update_lineno(1774); /* GGSN_Tests.ttcn, line 1774 */ PdpContext ctxA(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1775); /* GGSN_Tests.ttcn, line 1775 */ PdpContext ctxB(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1776); /* GGSN_Tests.ttcn, line 1776 */ f__pdp__ctx__act(ctxA, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1778); /* GGSN_Tests.ttcn, line 1778 */ { OCTETSTRING tmp_227; tmp_227 = int2oct(mod((oct2int(GT__CT_component_g__restart__ctr) + 1), 256), 1); GT__CT_component_g__restart__ctr = tmp_227; } current_location.update_lineno(1780); /* GGSN_Tests.ttcn, line 1780 */ TTCN_Logger::log_str(TTCN_USER, "sending 2nd CreatePDP (recovery increased)"); current_location.update_lineno(1781); /* GGSN_Tests.ttcn, line 1781 */ f__send__gtpc(GTPv1C__Templates::ts__GTPC__CreatePDP(GT__CT_component_g__peer__c, GT__CT_component_g__c__seq__nr, const_cast< const PdpContext&>(ctxB).imsi(), GT__CT_component_g__restart__ctr, const_cast< const PdpContext&>(ctxB).teid(), const_cast< const PdpContext&>(ctxB).teic(), const_cast< const PdpContext&>(ctxB).nsapi(), const_cast< const PdpContext&>(ctxB).eua(), const_cast< const PdpContext&>(ctxB).apn(), GT__CT_component_g__sgsn__ip__c, GT__CT_component_g__sgsn__ip__u, const_cast< const PdpContext&>(ctxB).msisdn(), GTPC__Types::ProtConfigOptions_template(const_cast< const PdpContext&>(ctxB).pco__req()), GTPv1C__Templates::ts__GTPC__CreatePDP_ratType_defval, GTPv1C__Templates::ts__GTPC__CreatePDP_uli_defval, GTPv1C__Templates::ts__GTPC__CreatePDP_charging__char_defval, GTPv1C__Templates::ts__GTPC__CreatePDP_imeisv_defval, GTPv1C__Templates::ts__GTPC__CreatePDP_ms__tz_defval)); current_location.update_lineno(1784); /* GGSN_Tests.ttcn, line 1784 */ GT__CT_component_T__default.start(); current_location.update_lineno(1785); /* GGSN_Tests.ttcn, line 1785 */ d = activate_pingpong(); current_location.update_lineno(1786); /* GGSN_Tests.ttcn, line 1786 */ { tmp_229: alt_status tmp_229_alt_flag_0 = ALT_MAYBE; alt_status tmp_229_alt_flag_1 = ALT_MAYBE; alt_status tmp_229_alt_flag_2 = ALT_MAYBE; alt_status tmp_229_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_229_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1787); /* GGSN_Tests.ttcn, line 1787 */ tmp_229_alt_flag_0 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::createPDPContextResponse), OCTETSTRING_template(const_cast< const PdpContext&>(ctxB).teic()), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(ud), any_compref, NULL, NULL, NULL); if (tmp_229_alt_flag_0 == ALT_YES) { current_location.update_lineno(1788); /* GGSN_Tests.ttcn, line 1788 */ f__handle__create__req(ctxB, ud, f__handle__create__req_exp__cause_defval); current_location.update_lineno(1789); /* GGSN_Tests.ttcn, line 1789 */ if ((!(ctxB__created))) { current_location.update_lineno(1790); /* GGSN_Tests.ttcn, line 1790 */ ctxB__created = TRUE; current_location.update_lineno(1791); /* GGSN_Tests.ttcn, line 1791 */ TTCN_Runtime::setverdict(PASS); } else { current_location.update_lineno(1793); /* GGSN_Tests.ttcn, line 1793 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Repeated createPDPContextResponse(ctxB)"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1796); /* GGSN_Tests.ttcn, line 1796 */ if ((!(ctxA__deleted))) { current_location.update_lineno(1797); /* GGSN_Tests.ttcn, line 1797 */ goto tmp_229; } break; } } if (tmp_229_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(1800); /* GGSN_Tests.ttcn, line 1800 */ tmp_229_alt_flag_1 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::deletePDPContextRequest), OCTETSTRING_template(const_cast< const PdpContext&>(ctxA).teic()), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(ud), any_compref, NULL, NULL, NULL); if (tmp_229_alt_flag_1 == ALT_YES) { current_location.update_lineno(1801); /* GGSN_Tests.ttcn, line 1801 */ { boolean tmp_240; { boolean tmp_231 = ud.is_bound(); if(tmp_231) { const GTPv1C__CodecPort::Gtp1cUnitdata& tmp_232 = ud; const GTPC__Types::PDU__GTPC& tmp_233 = tmp_232.gtpc(); tmp_231 = tmp_233.is_bound(); if(tmp_231) { const GTPC__Types::PDU__GTPC& tmp_234 = tmp_233; const GTPC__Types::GTPC__PDUs& tmp_235 = tmp_234.gtpc__pdu(); tmp_231 = tmp_235.is_bound(); if(tmp_231) { tmp_231 = tmp_235.ischosen(GTPC__Types::GTPC__PDUs::ALT_deletePDPContextRequest); } if(tmp_231) { const GTPC__Types::GTPC__PDUs& tmp_236 = tmp_235; const GTPC__Types::DeletePDPContextRequest& tmp_237 = tmp_236.deletePDPContextRequest(); tmp_231 = tmp_237.is_bound(); if(tmp_231) { const OPTIONAL< GTPC__Types::TearDownInd >& tmp_238 = tmp_237.tearDownIndicator(); switch (tmp_238.get_selection()) { case OPTIONAL_UNBOUND: tmp_231 = FALSE; break; case OPTIONAL_OMIT: tmp_231 = FALSE; break; default: { const GTPC__Types::TearDownInd& tmp_239 = (const GTPC__Types::TearDownInd&) tmp_238; tmp_231 = tmp_239.is_present(); break;} } } } } } tmp_240 = tmp_231; } if (tmp_240) { current_location.update_lineno(1802); /* GGSN_Tests.ttcn, line 1802 */ TTCN_Runtime::setverdict(PASS); } else { current_location.update_lineno(1804); /* GGSN_Tests.ttcn, line 1804 */ TTCN_Runtime::setverdict(FAIL); } } current_location.update_lineno(1807); /* GGSN_Tests.ttcn, line 1807 */ if ((!(ctxA__deleted))) { current_location.update_lineno(1808); /* GGSN_Tests.ttcn, line 1808 */ ctxA__deleted = TRUE; current_location.update_lineno(1809); /* GGSN_Tests.ttcn, line 1809 */ TTCN_Runtime::setverdict(PASS); } else { current_location.update_lineno(1811); /* GGSN_Tests.ttcn, line 1811 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Repeated deletePDPContextRequest(ctxA)"),TTCN_Logger::end_event_log2str())); } current_location.update_lineno(1814); /* GGSN_Tests.ttcn, line 1814 */ if ((!(ctxB__created))) { current_location.update_lineno(1815); /* GGSN_Tests.ttcn, line 1815 */ goto tmp_229; } break; } } if (tmp_229_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(1818); /* GGSN_Tests.ttcn, line 1818 */ tmp_229_alt_flag_2 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::deletePDPContextRequest), OCTETSTRING_template(const_cast< const PdpContext&>(ctxB).teic()), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(ud), any_compref, NULL, NULL, NULL); if (tmp_229_alt_flag_2 == ALT_YES) { current_location.update_lineno(1819); /* GGSN_Tests.ttcn, line 1819 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("GGSN dropping still valid pdp ctx"),TTCN_Logger::end_event_log2str())); break; } } if (tmp_229_default_flag == ALT_MAYBE) { tmp_229_default_flag = TTCN_Default::try_altsteps(); if (tmp_229_default_flag == ALT_YES || tmp_229_default_flag == ALT_BREAK) break; else if (tmp_229_default_flag == ALT_REPEAT) goto tmp_229; } current_location.update_lineno(1786); /* GGSN_Tests.ttcn, line 1786 */ if (tmp_229_alt_flag_0 == ALT_NO && tmp_229_alt_flag_1 == ALT_NO && tmp_229_alt_flag_2 == ALT_NO && tmp_229_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 1786 and 1821."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(1822); /* GGSN_Tests.ttcn, line 1822 */ TTCN_Default::deactivate(d); ; current_location.update_lineno(1823); /* GGSN_Tests.ttcn, line 1823 */ GT__CT_component_T__default.stop(); current_location.update_lineno(1825); /* GGSN_Tests.ttcn, line 1825 */ f__pdp__ctx__del(ctxB, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1826); /* GGSN_Tests.ttcn, line 1826 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp_act2_recovery was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__act__deact__retrans__duplicate(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1832, TTCN_Location::LOCATION_TESTCASE, "TC_act_deact_retrans_duplicate"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_act_deact_retrans_duplicate", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1833); /* GGSN_Tests.ttcn, line 1833 */ f__init(); current_location.update_lineno(1834); /* GGSN_Tests.ttcn, line 1834 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1835); /* GGSN_Tests.ttcn, line 1835 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1836); /* GGSN_Tests.ttcn, line 1836 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(1838); /* GGSN_Tests.ttcn, line 1838 */ Osmocom__Types::f__sleep(int2float(mp__t3__response)); current_location.update_lineno(1842); /* GGSN_Tests.ttcn, line 1842 */ if ((GT__CT_component_g__c__seq__nr == 0)) { current_location.update_lineno(1843); /* GGSN_Tests.ttcn, line 1843 */ GT__CT_component_g__c__seq__nr = 65535; } else { current_location.update_lineno(1845); /* GGSN_Tests.ttcn, line 1845 */ { INTEGER tmp_243; --GT__CT_component_g__c__seq__nr; } } current_location.update_lineno(1847); /* GGSN_Tests.ttcn, line 1847 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, FALSE); current_location.update_lineno(1850); /* GGSN_Tests.ttcn, line 1850 */ OCTETSTRING cause__nonexistent(os_15); current_location.update_lineno(1851); /* GGSN_Tests.ttcn, line 1851 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), cause__nonexistent, FALSE); current_location.update_lineno(1852); /* GGSN_Tests.ttcn, line 1852 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_act_deact_retrans_duplicate was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__pdp__act__restart__ctr__echo(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1856, TTCN_Location::LOCATION_TESTCASE, "TC_pdp_act_restart_ctr_echo"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_pdp_act_restart_ctr_echo", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1857); /* GGSN_Tests.ttcn, line 1857 */ GTPv1C__CodecPort::Gtp1cUnitdata ud; current_location.update_lineno(1858); /* GGSN_Tests.ttcn, line 1858 */ GT__CT_component_g__use__echo__intval = 5; current_location.update_lineno(1859); /* GGSN_Tests.ttcn, line 1859 */ TIMER T__echo("T_echo"); current_location.update_lineno(1860); /* GGSN_Tests.ttcn, line 1860 */ f__init(); current_location.update_lineno(1861); /* GGSN_Tests.ttcn, line 1861 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(1862); /* GGSN_Tests.ttcn, line 1862 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(1865); /* GGSN_Tests.ttcn, line 1865 */ T__echo.start((int2float(GT__CT_component_g__use__echo__intval) + 1.0)); current_location.update_lineno(1866); /* GGSN_Tests.ttcn, line 1866 */ { tmp_245: alt_status tmp_245_alt_flag_0 = ALT_MAYBE; alt_status tmp_245_alt_flag_1 = ALT_MAYBE; alt_status tmp_245_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_245_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1867); /* GGSN_Tests.ttcn, line 1867 */ tmp_245_alt_flag_0 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__PING(GTPv1C__CodecPort::Gtp1cPeer_template(ANY_VALUE)), &(ud), any_compref, NULL, NULL, NULL); if (tmp_245_alt_flag_0 == ALT_YES) { current_location.update_lineno(1868); /* GGSN_Tests.ttcn, line 1868 */ INTEGER seq(oct2int(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).gtpc().opt__part()().sequenceNumber())); current_location.update_lineno(1869); /* GGSN_Tests.ttcn, line 1869 */ GT__CT_component_GTPC.send(GTPv1C__Templates::ts__GTPC__PONG(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).peer(), seq, GT__CT_component_g__restart__ctr), NULL); break; } } if (tmp_245_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(1871); /* GGSN_Tests.ttcn, line 1871 */ tmp_245_alt_flag_1 = T__echo.timeout(NULL); if (tmp_245_alt_flag_1 == ALT_YES) { current_location.update_lineno(1872); /* GGSN_Tests.ttcn, line 1872 */ Misc__Helpers::f__shutdown(cs_21, 1872, FAIL, cs_44); break; } } if (tmp_245_default_flag == ALT_MAYBE) { tmp_245_default_flag = TTCN_Default::try_altsteps(); if (tmp_245_default_flag == ALT_YES || tmp_245_default_flag == ALT_BREAK) break; else if (tmp_245_default_flag == ALT_REPEAT) goto tmp_245; } current_location.update_lineno(1866); /* GGSN_Tests.ttcn, line 1866 */ if (tmp_245_alt_flag_0 == ALT_NO && tmp_245_alt_flag_1 == ALT_NO && tmp_245_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 1866 and 1875."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(1876); /* GGSN_Tests.ttcn, line 1876 */ T__echo.stop(); current_location.update_lineno(1881); /* GGSN_Tests.ttcn, line 1881 */ { OCTETSTRING tmp_246; tmp_246 = int2oct(mod((oct2int(GT__CT_component_g__restart__ctr) + 1), 256), 1); GT__CT_component_g__restart__ctr = tmp_246; } current_location.update_lineno(1882); /* GGSN_Tests.ttcn, line 1882 */ T__echo.start((int2float(GT__CT_component_g__use__echo__intval) + 1.0)); current_location.update_lineno(1883); /* GGSN_Tests.ttcn, line 1883 */ { tmp_247: alt_status tmp_247_alt_flag_0 = ALT_MAYBE; alt_status tmp_247_alt_flag_1 = ALT_MAYBE; alt_status tmp_247_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_247_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1884); /* GGSN_Tests.ttcn, line 1884 */ tmp_247_alt_flag_0 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__PING(GTPv1C__CodecPort::Gtp1cPeer_template(ANY_VALUE)), &(ud), any_compref, NULL, NULL, NULL); if (tmp_247_alt_flag_0 == ALT_YES) { current_location.update_lineno(1885); /* GGSN_Tests.ttcn, line 1885 */ INTEGER seq(oct2int(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).gtpc().opt__part()().sequenceNumber())); current_location.update_lineno(1886); /* GGSN_Tests.ttcn, line 1886 */ GT__CT_component_GTPC.send(GTPv1C__Templates::ts__GTPC__PONG(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(ud).peer(), seq, GT__CT_component_g__restart__ctr), NULL); break; } } if (tmp_247_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(1888); /* GGSN_Tests.ttcn, line 1888 */ tmp_247_alt_flag_1 = T__echo.timeout(NULL); if (tmp_247_alt_flag_1 == ALT_YES) { current_location.update_lineno(1889); /* GGSN_Tests.ttcn, line 1889 */ Misc__Helpers::f__shutdown(cs_21, 1889, FAIL, cs_44); break; } } if (tmp_247_default_flag == ALT_MAYBE) { tmp_247_default_flag = TTCN_Default::try_altsteps(); if (tmp_247_default_flag == ALT_YES || tmp_247_default_flag == ALT_BREAK) break; else if (tmp_247_default_flag == ALT_REPEAT) goto tmp_247; } current_location.update_lineno(1883); /* GGSN_Tests.ttcn, line 1883 */ if (tmp_247_alt_flag_0 == ALT_NO && tmp_247_alt_flag_1 == ALT_NO && tmp_247_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 1883 and 1892."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(1893); /* GGSN_Tests.ttcn, line 1893 */ T__echo.stop(); current_location.update_lineno(1894); /* GGSN_Tests.ttcn, line 1894 */ f__pdp__ctx__exp__del__req(ctx, OCTETSTRING_template(OMIT_VALUE), TRUE); current_location.update_lineno(1895); /* GGSN_Tests.ttcn, line 1895 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_pdp_act_restart_ctr_echo was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__lots__of__concurrent__pdp__ctx(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 1899, TTCN_Location::LOCATION_TESTCASE, "TC_lots_of_concurrent_pdp_ctx"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_lots_of_concurrent_pdp_ctx", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(1900); /* GGSN_Tests.ttcn, line 1900 */ GTPv1C__CodecPort::Gtp1cUnitdata udc; current_location.update_lineno(1901); /* GGSN_Tests.ttcn, line 1901 */ GTPv1U__CodecPort::Gtp1uUnitdata udu; current_location.update_lineno(1902); /* GGSN_Tests.ttcn, line 1902 */ INTEGER num__ctx(1000); current_location.update_lineno(1903); /* GGSN_Tests.ttcn, line 1903 */ VALUE_ARRAY ctx; current_location.update_lineno(1904); /* GGSN_Tests.ttcn, line 1904 */ TIMER T__next("T_next", 1.0e-2); current_location.update_lineno(1905); /* GGSN_Tests.ttcn, line 1905 */ INTEGER next__req__ctx(0); current_location.update_lineno(1906); /* GGSN_Tests.ttcn, line 1906 */ INTEGER rx__resp__ctx(0); current_location.update_lineno(1907); /* GGSN_Tests.ttcn, line 1907 */ INTEGER rx__pong(0); current_location.update_lineno(1908); /* GGSN_Tests.ttcn, line 1908 */ OCTETSTRING dns1__addr; current_location.update_lineno(1909); /* GGSN_Tests.ttcn, line 1909 */ OCTETSTRING saddr; current_location.update_lineno(1910); /* GGSN_Tests.ttcn, line 1910 */ INTEGER teic; current_location.update_lineno(1911); /* GGSN_Tests.ttcn, line 1911 */ INTEGER idx; current_location.update_lineno(1913); /* GGSN_Tests.ttcn, line 1913 */ f__init(); { current_location.update_lineno(1915); /* GGSN_Tests.ttcn, line 1915 */ INTEGER i(0); current_location.update_lineno(1915); /* GGSN_Tests.ttcn, line 1915 */ for ( ; ; ) { current_location.update_lineno(1915); /* GGSN_Tests.ttcn, line 1915 */ if (!(i < 1000)) break; current_location.update_lineno(1916); /* GGSN_Tests.ttcn, line 1916 */ { PdpContext& tmp_249 = ctx[i]; /* 7388 */ { INTEGER tmp_250; { INTEGER INTEGER_tmp("4294967296"); tmp_250 = INTEGER_tmp; } tmp_249 = t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), (cs_41 + int2str(Osmocom__Types::f__rnd__int(tmp_250))), os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof(); } } current_location.update_lineno(1917); /* GGSN_Tests.ttcn, line 1917 */ ctx[i].teic() = int2oct((i + 1), 4); current_location.update_lineno(1918); /* GGSN_Tests.ttcn, line 1918 */ ctx[i].teid() = int2oct((i + 1), 4); current_location.update_lineno(1919); /* GGSN_Tests.ttcn, line 1919 */ ctx[i].pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(1915); /* GGSN_Tests.ttcn, line 1915 */ { INTEGER tmp_254; ++i; } } } current_location.update_lineno(1922); /* GGSN_Tests.ttcn, line 1922 */ GT__CT_component_T__default.start(6.0e1); current_location.update_lineno(1924); /* GGSN_Tests.ttcn, line 1924 */ T__next.start(); current_location.update_lineno(1925); /* GGSN_Tests.ttcn, line 1925 */ { tmp_255: alt_status tmp_255_alt_flag_0 = ALT_UNCHECKED; alt_status tmp_255_alt_flag_1 = ALT_UNCHECKED; alt_status tmp_255_alt_flag_2 = ALT_MAYBE; alt_status tmp_255_alt_flag_3 = ALT_MAYBE; alt_status tmp_255_alt_flag_4 = ALT_MAYBE; alt_status tmp_255_alt_flag_5 = ALT_MAYBE; alt_status tmp_255_alt_flag_6 = ALT_MAYBE; alt_status tmp_255_alt_flag_7 = ALT_MAYBE; alt_status tmp_255_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_255_alt_flag_0 == ALT_UNCHECKED) { current_location.update_lineno(1926); /* GGSN_Tests.ttcn, line 1926 */ if (GT__CT_component_Gx__PROC.check_port_state(cs_36)) tmp_255_alt_flag_0 = ALT_MAYBE; else tmp_255_alt_flag_0 = ALT_NO; } if (tmp_255_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1926); /* GGSN_Tests.ttcn, line 1926 */ tmp_255_alt_flag_0 = as__DIA__Gx__CCR_instance(DIAMETER__Types::DCC__NONE__CC__Request__Type::INITIAL__REQUEST); if (tmp_255_alt_flag_0 == ALT_REPEAT) goto tmp_255; if (tmp_255_alt_flag_0 == ALT_BREAK) break; if (tmp_255_alt_flag_0 == ALT_YES) { current_location.update_lineno(1926); /* GGSN_Tests.ttcn, line 1926 */ goto tmp_255; } } if (tmp_255_alt_flag_1 == ALT_UNCHECKED) { current_location.update_lineno(1927); /* GGSN_Tests.ttcn, line 1927 */ if (GT__CT_component_Gy__PROC.check_port_state(cs_36)) tmp_255_alt_flag_1 = ALT_MAYBE; else tmp_255_alt_flag_1 = ALT_NO; } if (tmp_255_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(1927); /* GGSN_Tests.ttcn, line 1927 */ tmp_255_alt_flag_1 = as__DIA__Gy__CCR_instance(PdpContext_template(OMIT_VALUE), DIAMETER__Types::DCC__NONE__CC__Request__Type::INITIAL__REQUEST); if (tmp_255_alt_flag_1 == ALT_REPEAT) goto tmp_255; if (tmp_255_alt_flag_1 == ALT_BREAK) break; if (tmp_255_alt_flag_1 == ALT_YES) { current_location.update_lineno(1927); /* GGSN_Tests.ttcn, line 1927 */ goto tmp_255; } } if (tmp_255_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(1928); /* GGSN_Tests.ttcn, line 1928 */ tmp_255_alt_flag_2 = pingpong_instance(); if (tmp_255_alt_flag_2 == ALT_REPEAT) goto tmp_255; if (tmp_255_alt_flag_2 == ALT_BREAK) break; if (tmp_255_alt_flag_2 == ALT_YES) break; } if (tmp_255_alt_flag_3 == ALT_MAYBE) { current_location.update_lineno(1929); /* GGSN_Tests.ttcn, line 1929 */ tmp_255_alt_flag_3 = T__next.timeout(NULL); if (tmp_255_alt_flag_3 == ALT_YES) { current_location.update_lineno(1930); /* GGSN_Tests.ttcn, line 1930 */ f__send__gtpc(GTPv1C__Templates::ts__GTPC__CreatePDP(GT__CT_component_g__peer__c, GT__CT_component_g__c__seq__nr, const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].imsi(), GT__CT_component_g__restart__ctr, const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].teid(), const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].teic(), const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].nsapi(), const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].eua(), const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].apn(), GT__CT_component_g__sgsn__ip__c, GT__CT_component_g__sgsn__ip__u, const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].msisdn(), GTPC__Types::ProtConfigOptions_template(const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].pco__req()), OCTETSTRING_template(const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].ratType()), GTPC__Types::UserLocationInformation_template(const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].uli()), OCTETSTRING_template(const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].charging__char()), OCTETSTRING_template(const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].imeisv()), GTPC__Types::MS__TimeZone_template(const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].ms__tz()))); current_location.update_lineno(1936); /* GGSN_Tests.ttcn, line 1936 */ { INTEGER tmp_256; ++next__req__ctx; } current_location.update_lineno(1937); /* GGSN_Tests.ttcn, line 1937 */ if ((next__req__ctx < 1000)) { current_location.update_lineno(1938); /* GGSN_Tests.ttcn, line 1938 */ T__next.start(); } current_location.update_lineno(1940); /* GGSN_Tests.ttcn, line 1940 */ goto tmp_255; } } if (tmp_255_alt_flag_4 == ALT_MAYBE) { current_location.update_lineno(1942); /* GGSN_Tests.ttcn, line 1942 */ tmp_255_alt_flag_4 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::createPDPContextResponse), OCTETSTRING_template(ANY_VALUE), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(udc), any_compref, NULL, NULL, NULL); if (tmp_255_alt_flag_4 == ALT_YES) { current_location.update_lineno(1943); /* GGSN_Tests.ttcn, line 1943 */ teic = oct2int(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(udc).gtpc().teid()); current_location.update_lineno(1944); /* GGSN_Tests.ttcn, line 1944 */ { boolean tmp_259; { INTEGER_template tmp_258; tmp_258.set_type(VALUE_RANGE); tmp_258.set_min(1); tmp_258.set_max(1000); tmp_259 = (!(tmp_258.match(teic))); } if (tmp_259) { current_location.update_lineno(1945); /* GGSN_Tests.ttcn, line 1945 */ Misc__Helpers::f__shutdown(cs_21, 1945, FAIL, cs_45); } } current_location.update_lineno(1948); /* GGSN_Tests.ttcn, line 1948 */ idx = (teic - 1); current_location.update_lineno(1949); /* GGSN_Tests.ttcn, line 1949 */ f__handle__create__req(ctx[idx], udc, f__handle__create__req_exp__cause_defval); current_location.update_lineno(1950); /* GGSN_Tests.ttcn, line 1950 */ { INTEGER tmp_261; ++rx__resp__ctx; } current_location.update_lineno(1952); /* GGSN_Tests.ttcn, line 1952 */ dns1__addr = GTPv1C__Templates::f__PCO__extract__proto(const_cast< const VALUE_ARRAY&>(ctx)[idx].pco__neg(), os_22, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval); current_location.update_lineno(1953); /* GGSN_Tests.ttcn, line 1953 */ saddr = const_cast< const VALUE_ARRAY&>(ctx)[idx].eua().endUserAddress().endUserAddressIPv4().ipv4__address(); current_location.update_lineno(1954); /* GGSN_Tests.ttcn, line 1954 */ f__send__gtpu(ctx[idx], ICMP__Templates::f__gen__icmpv4__echo(saddr, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(1955); /* GGSN_Tests.ttcn, line 1955 */ goto tmp_255; } } if (tmp_255_alt_flag_5 == ALT_MAYBE) { current_location.update_lineno(1957); /* GGSN_Tests.ttcn, line 1957 */ tmp_255_alt_flag_5 = GT__CT_component_GTPU.receive(GTPv1U__Templates::tr__GTPU__GPDU(GTPv1U__CodecPort::Gtp1uPeer_template(GT__CT_component_g__peer__u), OCTETSTRING_template(ANY_VALUE), GTPv1U__Templates::tr__GTPU__GPDU_data_defval), &(udu), any_compref, NULL, NULL, NULL); if (tmp_255_alt_flag_5 == ALT_YES) { current_location.update_lineno(1958); /* GGSN_Tests.ttcn, line 1958 */ OCTETSTRING gpdu(const_cast< const GTPv1U__CodecPort::Gtp1uUnitdata&>(udu).gtpu().gtpu__IEs().g__PDU__IEs().data()); current_location.update_lineno(1959); /* GGSN_Tests.ttcn, line 1959 */ IP__Types::IPv4__packet ip4(IP__Types::f__IPv4__dec(gpdu)); current_location.update_lineno(1960); /* GGSN_Tests.ttcn, line 1960 */ if ((const_cast< const IP__Types::IPv4__packet&>(ip4).header().ver() != 4)) { current_location.update_lineno(1961); /* GGSN_Tests.ttcn, line 1961 */ goto tmp_255; } current_location.update_lineno(1963); /* GGSN_Tests.ttcn, line 1963 */ ICMP__Types::PDU__ICMP icmp4(ICMP__Types::f__dec__PDU__ICMP(const_cast< const IP__Types::IPv4__packet&>(ip4).payload())); current_location.update_lineno(1964); /* GGSN_Tests.ttcn, line 1964 */ { boolean tmp_265; { ICMP__Types::PDU__ICMP_template tmp_264; tmp_264.set_type(VALUE_LIST, 2); tmp_264.list_item(0) = ICMP__Templates::tr__ICMPv4__ERP(ICMP__Templates::tr__ICMPv4__ERP_data_defval); tmp_264.list_item(1) = ICMP__Templates::tr__ICMPv4__DU; tmp_265 = (!(tmp_264.match(icmp4))); } if (tmp_265) { current_location.update_lineno(1965); /* GGSN_Tests.ttcn, line 1965 */ goto tmp_255; } } current_location.update_lineno(1967); /* GGSN_Tests.ttcn, line 1967 */ { INTEGER tmp_266; ++rx__pong; } current_location.update_lineno(1968); /* GGSN_Tests.ttcn, line 1968 */ if ((rx__pong < 1000)) { current_location.update_lineno(1969); /* GGSN_Tests.ttcn, line 1969 */ goto tmp_255; } current_location.update_lineno(1971); /* GGSN_Tests.ttcn, line 1971 */ TTCN_Runtime::setverdict(PASS); break; } } if (tmp_255_alt_flag_6 == ALT_MAYBE) { current_location.update_lineno(1973); /* GGSN_Tests.ttcn, line 1973 */ tmp_255_alt_flag_6 = GT__CT_component_GTPC.receive(any_compref, NULL, NULL, NULL); if (tmp_255_alt_flag_6 == ALT_YES) { current_location.update_lineno(1973); /* GGSN_Tests.ttcn, line 1973 */ Misc__Helpers::f__shutdown(cs_21, 1973, FAIL, cs_46); break; } } if (tmp_255_alt_flag_7 == ALT_MAYBE) { current_location.update_lineno(1974); /* GGSN_Tests.ttcn, line 1974 */ tmp_255_alt_flag_7 = GT__CT_component_GTPU.receive(any_compref, NULL, NULL, NULL); if (tmp_255_alt_flag_7 == ALT_YES) { current_location.update_lineno(1974); /* GGSN_Tests.ttcn, line 1974 */ Misc__Helpers::f__shutdown(cs_21, 1974, FAIL, cs_47); break; } } if (tmp_255_default_flag == ALT_MAYBE) { tmp_255_default_flag = TTCN_Default::try_altsteps(); if (tmp_255_default_flag == ALT_YES || tmp_255_default_flag == ALT_BREAK) break; else if (tmp_255_default_flag == ALT_REPEAT) goto tmp_255; } current_location.update_lineno(1925); /* GGSN_Tests.ttcn, line 1925 */ if (tmp_255_alt_flag_0 == ALT_NO && tmp_255_alt_flag_1 == ALT_NO && tmp_255_alt_flag_2 == ALT_NO && tmp_255_alt_flag_3 == ALT_NO && tmp_255_alt_flag_4 == ALT_NO && tmp_255_alt_flag_5 == ALT_NO && tmp_255_alt_flag_6 == ALT_NO && tmp_255_alt_flag_7 == ALT_NO && tmp_255_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 1925 and 1975."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(1978); /* GGSN_Tests.ttcn, line 1978 */ next__req__ctx = 0; current_location.update_lineno(1979); /* GGSN_Tests.ttcn, line 1979 */ rx__resp__ctx = 0; current_location.update_lineno(1980); /* GGSN_Tests.ttcn, line 1980 */ T__next.start(); current_location.update_lineno(1981); /* GGSN_Tests.ttcn, line 1981 */ { tmp_269: alt_status tmp_269_alt_flag_0 = ALT_UNCHECKED; alt_status tmp_269_alt_flag_1 = ALT_UNCHECKED; alt_status tmp_269_alt_flag_2 = ALT_MAYBE; alt_status tmp_269_alt_flag_3 = ALT_MAYBE; alt_status tmp_269_alt_flag_4 = ALT_MAYBE; alt_status tmp_269_alt_flag_5 = ALT_MAYBE; alt_status tmp_269_alt_flag_6 = ALT_MAYBE; alt_status tmp_269_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_269_alt_flag_0 == ALT_UNCHECKED) { current_location.update_lineno(1982); /* GGSN_Tests.ttcn, line 1982 */ if (GT__CT_component_Gx__PROC.check_port_state(cs_36)) tmp_269_alt_flag_0 = ALT_MAYBE; else tmp_269_alt_flag_0 = ALT_NO; } if (tmp_269_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1982); /* GGSN_Tests.ttcn, line 1982 */ tmp_269_alt_flag_0 = as__DIA__Gx__CCR_instance(DIAMETER__Types::DCC__NONE__CC__Request__Type::TERMINATION__REQUEST); if (tmp_269_alt_flag_0 == ALT_REPEAT) goto tmp_269; if (tmp_269_alt_flag_0 == ALT_BREAK) break; if (tmp_269_alt_flag_0 == ALT_YES) { current_location.update_lineno(1982); /* GGSN_Tests.ttcn, line 1982 */ goto tmp_269; } } if (tmp_269_alt_flag_1 == ALT_UNCHECKED) { current_location.update_lineno(1983); /* GGSN_Tests.ttcn, line 1983 */ if (GT__CT_component_Gy__PROC.check_port_state(cs_36)) tmp_269_alt_flag_1 = ALT_MAYBE; else tmp_269_alt_flag_1 = ALT_NO; } if (tmp_269_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(1983); /* GGSN_Tests.ttcn, line 1983 */ tmp_269_alt_flag_1 = as__DIA__Gy__CCR_instance(PdpContext_template(OMIT_VALUE), DIAMETER__Types::DCC__NONE__CC__Request__Type::TERMINATION__REQUEST); if (tmp_269_alt_flag_1 == ALT_REPEAT) goto tmp_269; if (tmp_269_alt_flag_1 == ALT_BREAK) break; if (tmp_269_alt_flag_1 == ALT_YES) { current_location.update_lineno(1983); /* GGSN_Tests.ttcn, line 1983 */ goto tmp_269; } } if (tmp_269_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(1984); /* GGSN_Tests.ttcn, line 1984 */ tmp_269_alt_flag_2 = pingpong_instance(); if (tmp_269_alt_flag_2 == ALT_REPEAT) goto tmp_269; if (tmp_269_alt_flag_2 == ALT_BREAK) break; if (tmp_269_alt_flag_2 == ALT_YES) break; } if (tmp_269_alt_flag_3 == ALT_MAYBE) { current_location.update_lineno(1985); /* GGSN_Tests.ttcn, line 1985 */ tmp_269_alt_flag_3 = T__next.timeout(NULL); if (tmp_269_alt_flag_3 == ALT_YES) { current_location.update_lineno(1986); /* GGSN_Tests.ttcn, line 1986 */ f__send__gtpc(GTPv1C__Templates::ts__GTPC__DeletePDP(GT__CT_component_g__peer__c, GT__CT_component_g__c__seq__nr, const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].teic__remote(), const_cast< const VALUE_ARRAY&>(ctx)[next__req__ctx].nsapi(), BITSTRING_template(bs_0))); current_location.update_lineno(1987); /* GGSN_Tests.ttcn, line 1987 */ { INTEGER tmp_270; ++next__req__ctx; } current_location.update_lineno(1988); /* GGSN_Tests.ttcn, line 1988 */ if ((next__req__ctx < 1000)) { current_location.update_lineno(1989); /* GGSN_Tests.ttcn, line 1989 */ T__next.start(); } current_location.update_lineno(1991); /* GGSN_Tests.ttcn, line 1991 */ goto tmp_269; } } if (tmp_269_alt_flag_4 == ALT_MAYBE) { current_location.update_lineno(1993); /* GGSN_Tests.ttcn, line 1993 */ tmp_269_alt_flag_4 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::deletePDPContextResponse), OCTETSTRING_template(ANY_VALUE), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(udc), any_compref, NULL, NULL, NULL); if (tmp_269_alt_flag_4 == ALT_YES) { current_location.update_lineno(1994); /* GGSN_Tests.ttcn, line 1994 */ teic = oct2int(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(udc).gtpc().teid()); current_location.update_lineno(1995); /* GGSN_Tests.ttcn, line 1995 */ { boolean tmp_273; { INTEGER_template tmp_272; tmp_272.set_type(VALUE_RANGE); tmp_272.set_min(1); tmp_272.set_max(1000); tmp_273 = (!(tmp_272.match(teic))); } if (tmp_273) { current_location.update_lineno(1996); /* GGSN_Tests.ttcn, line 1996 */ Misc__Helpers::f__shutdown(cs_21, 1996, FAIL, cs_45); } } current_location.update_lineno(1999); /* GGSN_Tests.ttcn, line 1999 */ { INTEGER tmp_274; ++rx__resp__ctx; } current_location.update_lineno(2000); /* GGSN_Tests.ttcn, line 2000 */ if ((rx__resp__ctx < 1000)) { current_location.update_lineno(2001); /* GGSN_Tests.ttcn, line 2001 */ goto tmp_269; } current_location.update_lineno(2003); /* GGSN_Tests.ttcn, line 2003 */ TTCN_Runtime::setverdict(PASS); break; } } if (tmp_269_alt_flag_5 == ALT_MAYBE) { current_location.update_lineno(2005); /* GGSN_Tests.ttcn, line 2005 */ tmp_269_alt_flag_5 = GT__CT_component_GTPC.receive(any_compref, NULL, NULL, NULL); if (tmp_269_alt_flag_5 == ALT_YES) { current_location.update_lineno(2005); /* GGSN_Tests.ttcn, line 2005 */ Misc__Helpers::f__shutdown(cs_21, 2005, FAIL, cs_46); break; } } if (tmp_269_alt_flag_6 == ALT_MAYBE) { current_location.update_lineno(2006); /* GGSN_Tests.ttcn, line 2006 */ tmp_269_alt_flag_6 = GT__CT_component_GTPU.receive(any_compref, NULL, NULL, NULL); if (tmp_269_alt_flag_6 == ALT_YES) { current_location.update_lineno(2006); /* GGSN_Tests.ttcn, line 2006 */ Misc__Helpers::f__shutdown(cs_21, 2006, FAIL, cs_47); break; } } if (tmp_269_default_flag == ALT_MAYBE) { tmp_269_default_flag = TTCN_Default::try_altsteps(); if (tmp_269_default_flag == ALT_YES || tmp_269_default_flag == ALT_BREAK) break; else if (tmp_269_default_flag == ALT_REPEAT) goto tmp_269; } current_location.update_lineno(1981); /* GGSN_Tests.ttcn, line 1981 */ if (tmp_269_alt_flag_0 == ALT_NO && tmp_269_alt_flag_1 == ALT_NO && tmp_269_alt_flag_2 == ALT_NO && tmp_269_alt_flag_3 == ALT_NO && tmp_269_alt_flag_4 == ALT_NO && tmp_269_alt_flag_5 == ALT_NO && tmp_269_alt_flag_6 == ALT_NO && tmp_269_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 1981 and 2007."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(2008); /* GGSN_Tests.ttcn, line 2008 */ T__next.stop(); current_location.update_lineno(2010); /* GGSN_Tests.ttcn, line 2010 */ GT__CT_component_T__default.stop(); current_location.update_lineno(2011); /* GGSN_Tests.ttcn, line 2011 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_lots_of_concurrent_pdp_ctx was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__addr__pool__exhaustion(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 2016, TTCN_Location::LOCATION_TESTCASE, "TC_addr_pool_exhaustion"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_addr_pool_exhaustion", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(2017); /* GGSN_Tests.ttcn, line 2017 */ GTPv1C__CodecPort::Gtp1cUnitdata udc; current_location.update_lineno(2018); /* GGSN_Tests.ttcn, line 2018 */ GTPv1U__CodecPort::Gtp1uUnitdata udu; current_location.update_lineno(2019); /* GGSN_Tests.ttcn, line 2019 */ PdpContext ctx; current_location.update_lineno(2020); /* GGSN_Tests.ttcn, line 2020 */ TIMER T__next("T_next", 5.0e-3); current_location.update_lineno(2021); /* GGSN_Tests.ttcn, line 2021 */ INTEGER next__req__ctx(0); current_location.update_lineno(2022); /* GGSN_Tests.ttcn, line 2022 */ INTEGER rx__resp__ctx(0); current_location.update_lineno(2023); /* GGSN_Tests.ttcn, line 2023 */ INTEGER num__ctx; current_location.update_lineno(2024); /* GGSN_Tests.ttcn, line 2024 */ BOOLEAN cont__req(TRUE); current_location.update_lineno(2025); /* GGSN_Tests.ttcn, line 2025 */ GTPC__Types::CreatePDPContextResponse cpr; current_location.update_lineno(2026); /* GGSN_Tests.ttcn, line 2026 */ TEIClist teic__list(NULL_VALUE); current_location.update_lineno(2027); /* GGSN_Tests.ttcn, line 2027 */ INTEGER teic; current_location.update_lineno(2029); /* GGSN_Tests.ttcn, line 2029 */ f__init(); current_location.update_lineno(2031); /* GGSN_Tests.ttcn, line 2031 */ GT__CT_component_T__default.start(1.2e2); current_location.update_lineno(2033); /* GGSN_Tests.ttcn, line 2033 */ T__next.start(); current_location.update_lineno(2034); /* GGSN_Tests.ttcn, line 2034 */ { tmp_275: alt_status tmp_275_alt_flag_0 = ALT_UNCHECKED; alt_status tmp_275_alt_flag_1 = ALT_UNCHECKED; alt_status tmp_275_alt_flag_2 = ALT_MAYBE; alt_status tmp_275_alt_flag_3 = ALT_MAYBE; alt_status tmp_275_alt_flag_4 = ALT_MAYBE; alt_status tmp_275_alt_flag_5 = ALT_MAYBE; alt_status tmp_275_alt_flag_6 = ALT_MAYBE; alt_status tmp_275_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_275_alt_flag_0 == ALT_UNCHECKED) { current_location.update_lineno(2035); /* GGSN_Tests.ttcn, line 2035 */ if (GT__CT_component_Gx__PROC.check_port_state(cs_36)) tmp_275_alt_flag_0 = ALT_MAYBE; else tmp_275_alt_flag_0 = ALT_NO; } if (tmp_275_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(2035); /* GGSN_Tests.ttcn, line 2035 */ tmp_275_alt_flag_0 = as__DIA__Gx__CCR_instance(DIAMETER__Types::DCC__NONE__CC__Request__Type::INITIAL__REQUEST); if (tmp_275_alt_flag_0 == ALT_REPEAT) goto tmp_275; if (tmp_275_alt_flag_0 == ALT_BREAK) break; if (tmp_275_alt_flag_0 == ALT_YES) { current_location.update_lineno(2035); /* GGSN_Tests.ttcn, line 2035 */ goto tmp_275; } } if (tmp_275_alt_flag_1 == ALT_UNCHECKED) { current_location.update_lineno(2036); /* GGSN_Tests.ttcn, line 2036 */ if (GT__CT_component_Gy__PROC.check_port_state(cs_36)) tmp_275_alt_flag_1 = ALT_MAYBE; else tmp_275_alt_flag_1 = ALT_NO; } if (tmp_275_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(2036); /* GGSN_Tests.ttcn, line 2036 */ tmp_275_alt_flag_1 = as__DIA__Gy__CCR_instance(PdpContext_template(OMIT_VALUE), DIAMETER__Types::DCC__NONE__CC__Request__Type::INITIAL__REQUEST); if (tmp_275_alt_flag_1 == ALT_REPEAT) goto tmp_275; if (tmp_275_alt_flag_1 == ALT_BREAK) break; if (tmp_275_alt_flag_1 == ALT_YES) { current_location.update_lineno(2036); /* GGSN_Tests.ttcn, line 2036 */ goto tmp_275; } } if (tmp_275_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(2037); /* GGSN_Tests.ttcn, line 2037 */ tmp_275_alt_flag_2 = pingpong_instance(); if (tmp_275_alt_flag_2 == ALT_REPEAT) goto tmp_275; if (tmp_275_alt_flag_2 == ALT_BREAK) break; if (tmp_275_alt_flag_2 == ALT_YES) break; } if (tmp_275_alt_flag_3 == ALT_MAYBE) { current_location.update_lineno(2038); /* GGSN_Tests.ttcn, line 2038 */ tmp_275_alt_flag_3 = T__next.timeout(NULL); if (tmp_275_alt_flag_3 == ALT_YES) { current_location.update_lineno(2039); /* GGSN_Tests.ttcn, line 2039 */ if (cont__req) { current_location.update_lineno(2040); /* GGSN_Tests.ttcn, line 2040 */ if (((next__req__ctx - rx__resp__ctx) < 100)) { current_location.update_lineno(2041); /* GGSN_Tests.ttcn, line 2041 */ { INTEGER tmp_277; { INTEGER INTEGER_tmp("4294967296"); tmp_277 = INTEGER_tmp; } ctx = t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), (cs_41 + int2str(Osmocom__Types::f__rnd__int(tmp_277))), os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof(); } current_location.update_lineno(2042); /* GGSN_Tests.ttcn, line 2042 */ ctx.nsapi() = bs_4; current_location.update_lineno(2043); /* GGSN_Tests.ttcn, line 2043 */ ctx.teic() = int2oct((next__req__ctx + 1), 4); current_location.update_lineno(2044); /* GGSN_Tests.ttcn, line 2044 */ ctx.teid() = int2oct((next__req__ctx + 1), 4); current_location.update_lineno(2045); /* GGSN_Tests.ttcn, line 2045 */ f__send__gtpc(GTPv1C__Templates::ts__GTPC__CreatePDP(GT__CT_component_g__peer__c, GT__CT_component_g__c__seq__nr, const_cast< const PdpContext&>(ctx).imsi(), GT__CT_component_g__restart__ctr, const_cast< const PdpContext&>(ctx).teid(), const_cast< const PdpContext&>(ctx).teic(), const_cast< const PdpContext&>(ctx).nsapi(), const_cast< const PdpContext&>(ctx).eua(), const_cast< const PdpContext&>(ctx).apn(), GT__CT_component_g__sgsn__ip__c, GT__CT_component_g__sgsn__ip__u, const_cast< const PdpContext&>(ctx).msisdn(), GTPC__Types::ProtConfigOptions_template(const_cast< const PdpContext&>(ctx).pco__req()), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).ratType()), GTPC__Types::UserLocationInformation_template(const_cast< const PdpContext&>(ctx).uli()), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).charging__char()), OCTETSTRING_template(const_cast< const PdpContext&>(ctx).imeisv()), GTPC__Types::MS__TimeZone_template(const_cast< const PdpContext&>(ctx).ms__tz()))); current_location.update_lineno(2051); /* GGSN_Tests.ttcn, line 2051 */ { INTEGER tmp_281; ++next__req__ctx; } } current_location.update_lineno(2053); /* GGSN_Tests.ttcn, line 2053 */ T__next.start(); } current_location.update_lineno(2055); /* GGSN_Tests.ttcn, line 2055 */ goto tmp_275; } } if (tmp_275_alt_flag_4 == ALT_MAYBE) { current_location.update_lineno(2057); /* GGSN_Tests.ttcn, line 2057 */ tmp_275_alt_flag_4 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::createPDPContextResponse), OCTETSTRING_template(ANY_VALUE), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(udc), any_compref, NULL, NULL, NULL); if (tmp_275_alt_flag_4 == ALT_YES) { current_location.update_lineno(2058); /* GGSN_Tests.ttcn, line 2058 */ cpr = const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(udc).gtpc().gtpc__pdu().createPDPContextResponse(); current_location.update_lineno(2060); /* GGSN_Tests.ttcn, line 2060 */ if ((const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).cause().causevalue() == os_12)) { current_location.update_lineno(2061); /* GGSN_Tests.ttcn, line 2061 */ { TEIClist tmp_283; { TEIClist tmp_284; tmp_284.set_size(1); tmp_284[0] = const_cast< const GTPC__Types::CreatePDPContextResponse&>(cpr).teidControlPlane()().teidControlPlane(); tmp_283 = (teic__list + tmp_284); } teic__list = tmp_283; } } else { current_location.update_lineno(2063); /* GGSN_Tests.ttcn, line 2063 */ if ((cont__req == TRUE)) { current_location.update_lineno(2064); /* GGSN_Tests.ttcn, line 2064 */ num__ctx = rx__resp__ctx; current_location.update_lineno(2065); /* GGSN_Tests.ttcn, line 2065 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("Successfully created "); num__ctx.log(); TTCN_Logger::log_event_str(" PDP contexts before exhausting the pool"); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(2066); /* GGSN_Tests.ttcn, line 2066 */ TTCN_Runtime::setverdict(PASS); } current_location.update_lineno(2068); /* GGSN_Tests.ttcn, line 2068 */ cont__req = FALSE; } current_location.update_lineno(2070); /* GGSN_Tests.ttcn, line 2070 */ { INTEGER tmp_287; ++rx__resp__ctx; } current_location.update_lineno(2071); /* GGSN_Tests.ttcn, line 2071 */ { boolean tmp_288; tmp_288 = (!(cont__req)); if (tmp_288) tmp_288 = (next__req__ctx == rx__resp__ctx); if (tmp_288) { current_location.update_lineno(2072); /* GGSN_Tests.ttcn, line 2072 */ break; } else { current_location.update_lineno(2074); /* GGSN_Tests.ttcn, line 2074 */ goto tmp_275; } } } } if (tmp_275_alt_flag_5 == ALT_MAYBE) { current_location.update_lineno(2077); /* GGSN_Tests.ttcn, line 2077 */ tmp_275_alt_flag_5 = GT__CT_component_GTPC.receive(any_compref, NULL, NULL, NULL); if (tmp_275_alt_flag_5 == ALT_YES) { current_location.update_lineno(2077); /* GGSN_Tests.ttcn, line 2077 */ Misc__Helpers::f__shutdown(cs_21, 2077, FAIL, cs_46); break; } } if (tmp_275_alt_flag_6 == ALT_MAYBE) { current_location.update_lineno(2078); /* GGSN_Tests.ttcn, line 2078 */ tmp_275_alt_flag_6 = GT__CT_component_GTPU.receive(any_compref, NULL, NULL, NULL); if (tmp_275_alt_flag_6 == ALT_YES) { current_location.update_lineno(2078); /* GGSN_Tests.ttcn, line 2078 */ Misc__Helpers::f__shutdown(cs_21, 2078, FAIL, cs_47); break; } } if (tmp_275_default_flag == ALT_MAYBE) { tmp_275_default_flag = TTCN_Default::try_altsteps(); if (tmp_275_default_flag == ALT_YES || tmp_275_default_flag == ALT_BREAK) break; else if (tmp_275_default_flag == ALT_REPEAT) goto tmp_275; } current_location.update_lineno(2034); /* GGSN_Tests.ttcn, line 2034 */ if (tmp_275_alt_flag_0 == ALT_NO && tmp_275_alt_flag_1 == ALT_NO && tmp_275_alt_flag_2 == ALT_NO && tmp_275_alt_flag_3 == ALT_NO && tmp_275_alt_flag_4 == ALT_NO && tmp_275_alt_flag_5 == ALT_NO && tmp_275_alt_flag_6 == ALT_NO && tmp_275_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 2034 and 2079."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(2082); /* GGSN_Tests.ttcn, line 2082 */ next__req__ctx = 0; current_location.update_lineno(2083); /* GGSN_Tests.ttcn, line 2083 */ rx__resp__ctx = 0; current_location.update_lineno(2084); /* GGSN_Tests.ttcn, line 2084 */ T__next.start(); current_location.update_lineno(2085); /* GGSN_Tests.ttcn, line 2085 */ { tmp_291: alt_status tmp_291_alt_flag_0 = ALT_UNCHECKED; alt_status tmp_291_alt_flag_1 = ALT_UNCHECKED; alt_status tmp_291_alt_flag_2 = ALT_MAYBE; alt_status tmp_291_alt_flag_3 = ALT_UNCHECKED; alt_status tmp_291_alt_flag_4 = ALT_MAYBE; alt_status tmp_291_alt_flag_5 = ALT_MAYBE; alt_status tmp_291_alt_flag_6 = ALT_MAYBE; alt_status tmp_291_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_291_alt_flag_0 == ALT_UNCHECKED) { current_location.update_lineno(2086); /* GGSN_Tests.ttcn, line 2086 */ if (GT__CT_component_Gx__PROC.check_port_state(cs_36)) tmp_291_alt_flag_0 = ALT_MAYBE; else tmp_291_alt_flag_0 = ALT_NO; } if (tmp_291_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(2086); /* GGSN_Tests.ttcn, line 2086 */ tmp_291_alt_flag_0 = as__DIA__Gx__CCR_instance(DIAMETER__Types::DCC__NONE__CC__Request__Type::TERMINATION__REQUEST); if (tmp_291_alt_flag_0 == ALT_REPEAT) goto tmp_291; if (tmp_291_alt_flag_0 == ALT_BREAK) break; if (tmp_291_alt_flag_0 == ALT_YES) { current_location.update_lineno(2086); /* GGSN_Tests.ttcn, line 2086 */ goto tmp_291; } } if (tmp_291_alt_flag_1 == ALT_UNCHECKED) { current_location.update_lineno(2087); /* GGSN_Tests.ttcn, line 2087 */ if (GT__CT_component_Gy__PROC.check_port_state(cs_36)) tmp_291_alt_flag_1 = ALT_MAYBE; else tmp_291_alt_flag_1 = ALT_NO; } if (tmp_291_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(2087); /* GGSN_Tests.ttcn, line 2087 */ tmp_291_alt_flag_1 = as__DIA__Gy__CCR_instance(PdpContext_template(OMIT_VALUE), DIAMETER__Types::DCC__NONE__CC__Request__Type::TERMINATION__REQUEST); if (tmp_291_alt_flag_1 == ALT_REPEAT) goto tmp_291; if (tmp_291_alt_flag_1 == ALT_BREAK) break; if (tmp_291_alt_flag_1 == ALT_YES) { current_location.update_lineno(2087); /* GGSN_Tests.ttcn, line 2087 */ goto tmp_291; } } if (tmp_291_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(2088); /* GGSN_Tests.ttcn, line 2088 */ tmp_291_alt_flag_2 = pingpong_instance(); if (tmp_291_alt_flag_2 == ALT_REPEAT) goto tmp_291; if (tmp_291_alt_flag_2 == ALT_BREAK) break; if (tmp_291_alt_flag_2 == ALT_YES) break; } if (tmp_291_alt_flag_3 == ALT_UNCHECKED) { current_location.update_lineno(2089); /* GGSN_Tests.ttcn, line 2089 */ if ((teic__list.lengthof() > 0)) tmp_291_alt_flag_3 = ALT_MAYBE; else tmp_291_alt_flag_3 = ALT_NO; } if (tmp_291_alt_flag_3 == ALT_MAYBE) { current_location.update_lineno(2089); /* GGSN_Tests.ttcn, line 2089 */ tmp_291_alt_flag_3 = T__next.timeout(NULL); if (tmp_291_alt_flag_3 == ALT_YES) { current_location.update_lineno(2090); /* GGSN_Tests.ttcn, line 2090 */ f__send__gtpc(GTPv1C__Templates::ts__GTPC__DeletePDP(GT__CT_component_g__peer__c, GT__CT_component_g__c__seq__nr, const_cast< const TEIClist&>(teic__list)[next__req__ctx], bs_4, BITSTRING_template(bs_0))); current_location.update_lineno(2091); /* GGSN_Tests.ttcn, line 2091 */ { INTEGER tmp_292; ++next__req__ctx; } current_location.update_lineno(2092); /* GGSN_Tests.ttcn, line 2092 */ if ((next__req__ctx < num__ctx)) { current_location.update_lineno(2093); /* GGSN_Tests.ttcn, line 2093 */ T__next.start(); } current_location.update_lineno(2095); /* GGSN_Tests.ttcn, line 2095 */ goto tmp_291; } } if (tmp_291_alt_flag_4 == ALT_MAYBE) { current_location.update_lineno(2097); /* GGSN_Tests.ttcn, line 2097 */ tmp_291_alt_flag_4 = GT__CT_component_GTPC.receive(GTPv1C__Templates::tr__GTPC__MsgType(GTPv1C__CodecPort::Gtp1cPeer_template(GT__CT_component_g__peer__c), OCTETSTRING_template(GTPC__Types::deletePDPContextResponse), OCTETSTRING_template(ANY_VALUE), GTPv1C__Templates::tr__GTPC__MsgType_pdus_defval), &(udc), any_compref, NULL, NULL, NULL); if (tmp_291_alt_flag_4 == ALT_YES) { current_location.update_lineno(2098); /* GGSN_Tests.ttcn, line 2098 */ teic = oct2int(const_cast< const GTPv1C__CodecPort::Gtp1cUnitdata&>(udc).gtpc().teid()); current_location.update_lineno(2099); /* GGSN_Tests.ttcn, line 2099 */ { boolean tmp_295; { INTEGER_template tmp_294; tmp_294.set_type(VALUE_RANGE); tmp_294.set_min(1); tmp_294.set_max(num__ctx); tmp_295 = (!(tmp_294.match(teic))); } if (tmp_295) { current_location.update_lineno(2100); /* GGSN_Tests.ttcn, line 2100 */ Misc__Helpers::f__shutdown(cs_21, 2100, FAIL, cs_45); } } current_location.update_lineno(2103); /* GGSN_Tests.ttcn, line 2103 */ { INTEGER tmp_296; ++rx__resp__ctx; } current_location.update_lineno(2104); /* GGSN_Tests.ttcn, line 2104 */ if ((rx__resp__ctx < num__ctx)) { current_location.update_lineno(2105); /* GGSN_Tests.ttcn, line 2105 */ goto tmp_291; } current_location.update_lineno(2107); /* GGSN_Tests.ttcn, line 2107 */ TTCN_Runtime::setverdict(PASS); break; } } if (tmp_291_alt_flag_5 == ALT_MAYBE) { current_location.update_lineno(2109); /* GGSN_Tests.ttcn, line 2109 */ tmp_291_alt_flag_5 = GT__CT_component_GTPC.receive(any_compref, NULL, NULL, NULL); if (tmp_291_alt_flag_5 == ALT_YES) { current_location.update_lineno(2109); /* GGSN_Tests.ttcn, line 2109 */ Misc__Helpers::f__shutdown(cs_21, 2109, FAIL, cs_46); break; } } if (tmp_291_alt_flag_6 == ALT_MAYBE) { current_location.update_lineno(2110); /* GGSN_Tests.ttcn, line 2110 */ tmp_291_alt_flag_6 = GT__CT_component_GTPU.receive(any_compref, NULL, NULL, NULL); if (tmp_291_alt_flag_6 == ALT_YES) { current_location.update_lineno(2110); /* GGSN_Tests.ttcn, line 2110 */ Misc__Helpers::f__shutdown(cs_21, 2110, FAIL, cs_47); break; } } if (tmp_291_default_flag == ALT_MAYBE) { tmp_291_default_flag = TTCN_Default::try_altsteps(); if (tmp_291_default_flag == ALT_YES || tmp_291_default_flag == ALT_BREAK) break; else if (tmp_291_default_flag == ALT_REPEAT) goto tmp_291; } current_location.update_lineno(2085); /* GGSN_Tests.ttcn, line 2085 */ if (tmp_291_alt_flag_0 == ALT_NO && tmp_291_alt_flag_1 == ALT_NO && tmp_291_alt_flag_2 == ALT_NO && tmp_291_alt_flag_3 == ALT_NO && tmp_291_alt_flag_4 == ALT_NO && tmp_291_alt_flag_5 == ALT_NO && tmp_291_alt_flag_6 == ALT_NO && tmp_291_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 2085 and 2111."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(2112); /* GGSN_Tests.ttcn, line 2112 */ T__next.stop(); current_location.update_lineno(2114); /* GGSN_Tests.ttcn, line 2114 */ GT__CT_component_T__default.stop(); current_location.update_lineno(2115); /* GGSN_Tests.ttcn, line 2115 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_addr_pool_exhaustion was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__gy__charging__cc__time(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 2119, TTCN_Location::LOCATION_TESTCASE, "TC_gy_charging_cc_time"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_gy_charging_cc_time", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(2120); /* GGSN_Tests.ttcn, line 2120 */ DEFAULT d; current_location.update_lineno(2122); /* GGSN_Tests.ttcn, line 2122 */ GT__CT_component_g__gy__validity__time = 3; current_location.update_lineno(2123); /* GGSN_Tests.ttcn, line 2123 */ f__init(); current_location.update_lineno(2124); /* GGSN_Tests.ttcn, line 2124 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(2125); /* GGSN_Tests.ttcn, line 2125 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(2126); /* GGSN_Tests.ttcn, line 2126 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(2128); /* GGSN_Tests.ttcn, line 2128 */ OCTETSTRING dns1__addr(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval)); current_location.update_lineno(2131); /* GGSN_Tests.ttcn, line 2131 */ OCTETSTRING saddr(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4().ipv4__address()); current_location.update_lineno(2132); /* GGSN_Tests.ttcn, line 2132 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(2133); /* GGSN_Tests.ttcn, line 2133 */ f__wait__icmp4__echo__reply(ctx); current_location.update_lineno(2135); /* GGSN_Tests.ttcn, line 2135 */ GT__CT_component_T__default.start(1.0e1); current_location.update_lineno(2136); /* GGSN_Tests.ttcn, line 2136 */ d = activate_pingpong(); current_location.update_lineno(2138); /* GGSN_Tests.ttcn, line 2138 */ GT__CT_component_g__gy__validity__time = 2; current_location.update_lineno(2140); /* GGSN_Tests.ttcn, line 2140 */ as__DIA__Gy__CCR(PdpContext_template(ctx), DIAMETER__Types::DCC__NONE__CC__Request__Type::UPDATE__REQUEST); current_location.update_lineno(2141); /* GGSN_Tests.ttcn, line 2141 */ { INTEGER_template tmp_301; tmp_301.set_type(VALUE_RANGE); tmp_301.set_min(3); tmp_301.set_max(4); DIAMETER__ts32__299__Templates::f__validate__gy__cc__report(GT__CT_component_g__rx__gy, DIAMETER__Types::DCA__3GPP__Reporting__Reason_template(DIAMETER__Types::DCA__3GPP__Reporting__Reason::VALIDITY__TIME), tmp_301, INTEGER_template(28), INTEGER_template(28)); } current_location.update_lineno(2144); /* GGSN_Tests.ttcn, line 2144 */ as__DIA__Gy__CCR(PdpContext_template(ctx), DIAMETER__Types::DCC__NONE__CC__Request__Type::UPDATE__REQUEST); current_location.update_lineno(2145); /* GGSN_Tests.ttcn, line 2145 */ { INTEGER_template tmp_302; tmp_302.set_type(VALUE_RANGE); tmp_302.set_min(2); tmp_302.set_max(3); DIAMETER__ts32__299__Templates::f__validate__gy__cc__report(GT__CT_component_g__rx__gy, DIAMETER__Types::DCA__3GPP__Reporting__Reason_template(DIAMETER__Types::DCA__3GPP__Reporting__Reason::VALIDITY__TIME), tmp_302, INTEGER_template(0), INTEGER_template(0)); } current_location.update_lineno(2148); /* GGSN_Tests.ttcn, line 2148 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(2149); /* GGSN_Tests.ttcn, line 2149 */ f__wait__icmp4__echo__reply(ctx); current_location.update_lineno(2150); /* GGSN_Tests.ttcn, line 2150 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(2151); /* GGSN_Tests.ttcn, line 2151 */ f__wait__icmp4__echo__reply(ctx); current_location.update_lineno(2152); /* GGSN_Tests.ttcn, line 2152 */ as__DIA__Gy__CCR(PdpContext_template(ctx), DIAMETER__Types::DCC__NONE__CC__Request__Type::UPDATE__REQUEST); current_location.update_lineno(2153); /* GGSN_Tests.ttcn, line 2153 */ { INTEGER_template tmp_303; tmp_303.set_type(VALUE_RANGE); tmp_303.set_min(2); tmp_303.set_max(3); DIAMETER__ts32__299__Templates::f__validate__gy__cc__report(GT__CT_component_g__rx__gy, DIAMETER__Types::DCA__3GPP__Reporting__Reason_template(DIAMETER__Types::DCA__3GPP__Reporting__Reason::VALIDITY__TIME), tmp_303, INTEGER_template(56), INTEGER_template(56)); } current_location.update_lineno(2156); /* GGSN_Tests.ttcn, line 2156 */ Osmocom__Types::f__sleep(5.0e-1); current_location.update_lineno(2157); /* GGSN_Tests.ttcn, line 2157 */ TTCN_Default::deactivate(d); ; current_location.update_lineno(2158); /* GGSN_Tests.ttcn, line 2158 */ GT__CT_component_T__default.stop(); current_location.update_lineno(2162); /* GGSN_Tests.ttcn, line 2162 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr, dns1__addr, ICMP__Templates::f__gen__icmpv4__echo_pl_defval)); current_location.update_lineno(2163); /* GGSN_Tests.ttcn, line 2163 */ f__wait__icmp4__echo__reply(ctx); current_location.update_lineno(2165); /* GGSN_Tests.ttcn, line 2165 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(2166); /* GGSN_Tests.ttcn, line 2166 */ { INTEGER_template tmp_304; tmp_304.set_type(VALUE_RANGE); tmp_304.set_min(0); tmp_304.set_max(2); DIAMETER__ts32__299__Templates::f__validate__gy__cc__report(GT__CT_component_g__rx__gy, DIAMETER__Types::DCA__3GPP__Reporting__Reason_template(DIAMETER__Types::DCA__3GPP__Reporting__Reason::FINAL), tmp_304, INTEGER_template(28), INTEGER_template(28)); } current_location.update_lineno(2169); /* GGSN_Tests.ttcn, line 2169 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_gy_charging_cc_time was stopped."); } return TTCN_Runtime::end_testcase(); } verdicttype testcase_TC__gy__charging__volume__quota__threshold(boolean has_timer, double timer_value) { TTCN_Runtime::check_begin_testcase(has_timer, timer_value); TTCN_Location current_location("GGSN_Tests.ttcn", 2173, TTCN_Location::LOCATION_TESTCASE, "TC_gy_charging_volume_quota_threshold"); try { TTCN_Runtime::begin_testcase("GGSN_Tests", "TC_gy_charging_volume_quota_threshold", "GGSN_Tests", "GT_CT", "GGSN_Tests", "GT_CT", has_timer, timer_value); current_location.update_lineno(2174); /* GGSN_Tests.ttcn, line 2174 */ DEFAULT d; current_location.update_lineno(2175); /* GGSN_Tests.ttcn, line 2175 */ TIMER Tout("Tout"); current_location.update_lineno(2176); /* GGSN_Tests.ttcn, line 2176 */ GT__CT_component_g__gy__volume__quota = 10000; current_location.update_lineno(2177); /* GGSN_Tests.ttcn, line 2177 */ GT__CT_component_g__gy__volume__threshold = 9000; current_location.update_lineno(2178); /* GGSN_Tests.ttcn, line 2178 */ GT__CT_component_g__gy__validity__time = 8; current_location.update_lineno(2179); /* GGSN_Tests.ttcn, line 2179 */ f__init(); current_location.update_lineno(2180); /* GGSN_Tests.ttcn, line 2180 */ FLOAT tout__sec((int2float(GT__CT_component_g__gy__validity__time) / 2.0)); current_location.update_lineno(2181); /* GGSN_Tests.ttcn, line 2181 */ PdpContext ctx(t__DefinePDP(Osmocom__Types::f__rnd__imsi(hs_2), cs_41, os_1, GTPv1C__Templates::t__EuaIPv4Dyn.valueof(), t__DefinePDP_ratType_defval).valueof()); current_location.update_lineno(2182); /* GGSN_Tests.ttcn, line 2182 */ ctx.pco__req() = GTPv1C__Templates::ts__PCO__IPv4__DNS__CONT.valueof(); current_location.update_lineno(2183); /* GGSN_Tests.ttcn, line 2183 */ f__pdp__ctx__act(ctx, f__pdp__ctx__act_exp__cause_defval); current_location.update_lineno(2185); /* GGSN_Tests.ttcn, line 2185 */ OCTETSTRING dns1__addr(GTPv1C__Templates::f__PCO__extract__proto(const_cast< const PdpContext&>(ctx).pco__neg(), os_22, GTPv1C__Templates::f__PCO__extract__proto_nth__match_defval)); current_location.update_lineno(2187); /* GGSN_Tests.ttcn, line 2187 */ GT__CT_component_T__default.start(4.0e1); current_location.update_lineno(2188); /* GGSN_Tests.ttcn, line 2188 */ d = activate_pingpong(); current_location.update_lineno(2191); /* GGSN_Tests.ttcn, line 2191 */ OCTETSTRING payload(Osmocom__Types::f__rnd__octstring(1200)); current_location.update_lineno(2192); /* GGSN_Tests.ttcn, line 2192 */ OCTETSTRING saddr(const_cast< const PdpContext&>(ctx).eua().endUserAddress().endUserAddressIPv4().ipv4__address()); current_location.update_lineno(2193); /* GGSN_Tests.ttcn, line 2193 */ f__send__gtpu(ctx, ICMP__Templates::f__gen__icmpv4__echo(saddr, dns1__addr, payload)); current_location.update_lineno(2194); /* GGSN_Tests.ttcn, line 2194 */ f__wait__icmp4__echo__reply(ctx); current_location.update_lineno(2197); /* GGSN_Tests.ttcn, line 2197 */ Tout.start(tout__sec); current_location.update_lineno(2198); /* GGSN_Tests.ttcn, line 2198 */ { tmp_310: alt_status tmp_310_alt_flag_0 = ALT_MAYBE; alt_status tmp_310_alt_flag_1 = ALT_MAYBE; alt_status tmp_310_default_flag = ALT_MAYBE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_310_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(2199); /* GGSN_Tests.ttcn, line 2199 */ tmp_310_alt_flag_0 = as__DIA__Gy__CCR_instance(PdpContext_template(ctx), DIAMETER__Types::DCC__NONE__CC__Request__Type::UPDATE__REQUEST); if (tmp_310_alt_flag_0 == ALT_REPEAT) goto tmp_310; if (tmp_310_alt_flag_0 == ALT_BREAK) break; if (tmp_310_alt_flag_0 == ALT_YES) break; } if (tmp_310_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(2200); /* GGSN_Tests.ttcn, line 2200 */ tmp_310_alt_flag_1 = Tout.timeout(NULL); if (tmp_310_alt_flag_1 == ALT_YES) { current_location.update_lineno(2201); /* GGSN_Tests.ttcn, line 2201 */ Misc__Helpers::f__shutdown(cs_21, 2201, FAIL, cs_48); break; } } if (tmp_310_default_flag == ALT_MAYBE) { tmp_310_default_flag = TTCN_Default::try_altsteps(); if (tmp_310_default_flag == ALT_YES || tmp_310_default_flag == ALT_BREAK) break; else if (tmp_310_default_flag == ALT_REPEAT) goto tmp_310; } current_location.update_lineno(2198); /* GGSN_Tests.ttcn, line 2198 */ if (tmp_310_alt_flag_0 == ALT_NO && tmp_310_alt_flag_1 == ALT_NO && tmp_310_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GGSN_Tests.ttcn between lines 2198 and 2204."); TTCN_Snapshot::take_new(TRUE); } } current_location.update_lineno(2205); /* GGSN_Tests.ttcn, line 2205 */ { INTEGER_template tmp_311; tmp_311.set_type(VALUE_RANGE); tmp_311.set_min(0); tmp_311.set_max(6); INTEGER_template tmp_312; tmp_312.set_type(VALUE_RANGE); tmp_312.set_min(1200); tmp_312.set_max(1400); DIAMETER__ts32__299__Templates::f__validate__gy__cc__report(GT__CT_component_g__rx__gy, DIAMETER__Types::DCA__3GPP__Reporting__Reason_template(DIAMETER__Types::DCA__3GPP__Reporting__Reason::THRESHOLD), tmp_311, tmp_312, INTEGER_template(0)); } current_location.update_lineno(2208); /* GGSN_Tests.ttcn, line 2208 */ as__DIA__Gy__CCR(PdpContext_template(ctx), DIAMETER__Types::DCC__NONE__CC__Request__Type::UPDATE__REQUEST); current_location.update_lineno(2209); /* GGSN_Tests.ttcn, line 2209 */ { INTEGER_template tmp_313; tmp_313.set_type(VALUE_RANGE); tmp_313.set_min(0); tmp_313.set_max(1); INTEGER_template tmp_314; tmp_314.set_type(VALUE_RANGE); tmp_314.set_min(1200); tmp_314.set_max(1400); DIAMETER__ts32__299__Templates::f__validate__gy__cc__report(GT__CT_component_g__rx__gy, DIAMETER__Types::DCA__3GPP__Reporting__Reason_template(DIAMETER__Types::DCA__3GPP__Reporting__Reason::THRESHOLD), tmp_313, INTEGER_template(0), tmp_314); } current_location.update_lineno(2212); /* GGSN_Tests.ttcn, line 2212 */ as__DIA__Gy__CCR(PdpContext_template(ctx), DIAMETER__Types::DCC__NONE__CC__Request__Type::UPDATE__REQUEST); current_location.update_lineno(2213); /* GGSN_Tests.ttcn, line 2213 */ { INTEGER_template tmp_315; tmp_315.set_type(VALUE_RANGE); tmp_315.set_min(8); tmp_315.set_max(9); DIAMETER__ts32__299__Templates::f__validate__gy__cc__report(GT__CT_component_g__rx__gy, DIAMETER__Types::DCA__3GPP__Reporting__Reason_template(DIAMETER__Types::DCA__3GPP__Reporting__Reason::VALIDITY__TIME), tmp_315, INTEGER_template(0), INTEGER_template(0)); } current_location.update_lineno(2216); /* GGSN_Tests.ttcn, line 2216 */ Osmocom__Types::f__sleep(5.0e-1); current_location.update_lineno(2217); /* GGSN_Tests.ttcn, line 2217 */ TTCN_Default::deactivate(d); ; current_location.update_lineno(2218); /* GGSN_Tests.ttcn, line 2218 */ GT__CT_component_T__default.stop(); current_location.update_lineno(2220); /* GGSN_Tests.ttcn, line 2220 */ f__pdp__ctx__del(ctx, BITSTRING_template(bs_0), f__pdp__ctx__del_expect__causevalue_defval, f__pdp__ctx__del_expect__diameter_defval); current_location.update_lineno(2221); /* GGSN_Tests.ttcn, line 2221 */ { INTEGER_template tmp_316; tmp_316.set_type(VALUE_RANGE); tmp_316.set_min(0); tmp_316.set_max(2); DIAMETER__ts32__299__Templates::f__validate__gy__cc__report(GT__CT_component_g__rx__gy, DIAMETER__Types::DCA__3GPP__Reporting__Reason_template(DIAMETER__Types::DCA__3GPP__Reporting__Reason::FINAL), tmp_316, INTEGER_template(0), INTEGER_template(0)); } current_location.update_lineno(2224); /* GGSN_Tests.ttcn, line 2224 */ f__shutdown__helper(); } catch (const TC_Error& tc_error) { } catch (const TC_End& tc_end) { TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_gy_charging_volume_quota_threshold was stopped."); } return TTCN_Runtime::end_testcase(); } /* Bodies of static functions */ void pre_init_module() { TTCN_Location current_location("GGSN_Tests.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "GGSN_Tests"); TCCEncoding__Functions::module_object.pre_init_module(); GTPv1C__CodecPort__CtrlFunct::module_object.pre_init_module(); GTPv1U__CodecPort__CtrlFunct::module_object.pre_init_module(); GTPv1C__Templates::module_object.pre_init_module(); GTPv1U__Templates::module_object.pre_init_module(); PAP__Types::module_object.pre_init_module(); ICMP__Templates::module_object.pre_init_module(); ICMPv6__Templates::module_object.pre_init_module(); Osmocom__VTY__Functions::module_object.pre_init_module(); DIAMETER__ts29__212__Templates::module_object.pre_init_module(); DIAMETER__ts29__272__Templates::module_object.pre_init_module(); DIAMETER__ts32__299__Templates::module_object.pre_init_module(); DIAMETER__Emulation::module_object.pre_init_module(); current_location.update_lineno(47); /* GGSN_Tests.ttcn, line 47 */ const_GTP0__PORT = 3386; current_location.update_lineno(48); /* GGSN_Tests.ttcn, line 48 */ const_GTP1C__PORT = 2123; current_location.update_lineno(49); /* GGSN_Tests.ttcn, line 49 */ const_GTP1U__PORT = 2152; current_location.update_lineno(50); /* GGSN_Tests.ttcn, line 50 */ const_PCRF__PORT = 3868; current_location.update_lineno(51); /* GGSN_Tests.ttcn, line 51 */ const_OCS__PORT = 3869; current_location.update_lineno(69); /* GGSN_Tests.ttcn, line 69 */ modulepar_m__bind__ip__gtpc = cs_0; module_object.add_modulepar("m_bind_ip_gtpc"); current_location.update_lineno(70); /* GGSN_Tests.ttcn, line 70 */ modulepar_m__bind__ip__gtpu = cs_0; module_object.add_modulepar("m_bind_ip_gtpu"); current_location.update_lineno(73); /* GGSN_Tests.ttcn, line 73 */ modulepar_m__ggsn__ip__gtpc = cs_1; module_object.add_modulepar("m_ggsn_ip_gtpc"); current_location.update_lineno(74); /* GGSN_Tests.ttcn, line 74 */ modulepar_m__ggsn__ip__gtpu = cs_1; module_object.add_modulepar("m_ggsn_ip_gtpu"); current_location.update_lineno(84); /* GGSN_Tests.ttcn, line 84 */ modulepar_m__ggsn__ip4__dns1 = cs_2; module_object.add_modulepar("m_ggsn_ip4_dns1"); current_location.update_lineno(85); /* GGSN_Tests.ttcn, line 85 */ modulepar_m__ggsn__ip4__dns2 = cs_3; module_object.add_modulepar("m_ggsn_ip4_dns2"); current_location.update_lineno(86); /* GGSN_Tests.ttcn, line 86 */ modulepar_m__ggsn__ip6__dns1 = cs_4; module_object.add_modulepar("m_ggsn_ip6_dns1"); current_location.update_lineno(87); /* GGSN_Tests.ttcn, line 87 */ modulepar_m__ggsn__ip6__dns2 = cs_5; module_object.add_modulepar("m_ggsn_ip6_dns2"); current_location.update_lineno(95); /* GGSN_Tests.ttcn, line 95 */ modulepar_mp__t3__response = 5; module_object.add_modulepar("mp_t3_response"); current_location.update_lineno(96); /* GGSN_Tests.ttcn, line 96 */ modulepar_mp__n3__requests = 3; module_object.add_modulepar("mp_n3_requests"); current_location.update_lineno(98); /* GGSN_Tests.ttcn, line 98 */ modulepar_m__ggsn__impl = GGSN__Impl::GGSN__IMPL__OSMOCOM; module_object.add_modulepar("m_ggsn_impl"); current_location.update_lineno(99); /* GGSN_Tests.ttcn, line 99 */ modulepar_m__ggsn__conf = GGSN__Conf::GGSN__CONF__ALL; module_object.add_modulepar("m_ggsn_conf"); module_object.add_function("f_init_vty", (genericfunc_t)&f__init__vty, (genericfunc_t)&start_f__init__vty); module_object.add_function("f_vty_set_gpdu_txseq", (genericfunc_t)&f__vty__set__gpdu__txseq, (genericfunc_t)&start_f__vty__set__gpdu__txseq); module_object.add_function("f_verify_gtpu_txseq", (genericfunc_t)&f__verify__gtpu__txseq, NULL); module_object.add_function("f_vty_enable_echo_interval", (genericfunc_t)&f__vty__enable__echo__interval, (genericfunc_t)&start_f__vty__enable__echo__interval); module_object.add_function("DiameterForwardUnitdataCallback", (genericfunc_t)&DiameterForwardUnitdataCallback, (genericfunc_t)&start_DiameterForwardUnitdataCallback); module_object.add_function("f_init_diameter", (genericfunc_t)&f__init__diameter, (genericfunc_t)&start_f__init__diameter); module_object.add_function("f_init", (genericfunc_t)&f__init, (genericfunc_t)&start_f__init); module_object.add_function("f_shutdown_helper", (genericfunc_t)&f__shutdown__helper, (genericfunc_t)&start_f__shutdown__helper); module_object.add_altstep("pingpong", (genericfunc_t)&pingpong_instance, (genericfunc_t )&activate_pingpong, (genericfunc_t )&pingpong); current_location.update_lineno(350); /* GGSN_Tests.ttcn, line 350 */ const_c__ApnInternet = os_1; current_location.update_lineno(351); /* GGSN_Tests.ttcn, line 351 */ const_c__ApnInet6 = os_2; current_location.update_lineno(352); /* GGSN_Tests.ttcn, line 352 */ const_c__ApnInet46 = os_3; module_object.add_function("f_rnd_nsapi", (genericfunc_t)&f__rnd__nsapi, NULL); module_object.add_function("f_rnd_tei", (genericfunc_t)&f__rnd__tei, NULL); module_object.add_function("f_rnd_imeisv", (genericfunc_t)&f__rnd__imeisv, NULL); module_object.add_function("f_send_gtpc", (genericfunc_t)&f__send__gtpc, (genericfunc_t)&start_f__send__gtpc); module_object.add_function("f_send_gtpu", (genericfunc_t)&f__send__gtpu, (genericfunc_t)&start_f__send__gtpu); module_object.add_function("f_handle_create_req", (genericfunc_t)&f__handle__create__req, (genericfunc_t)&start_f__handle__create__req); module_object.add_function("f_handle_update_req", (genericfunc_t)&f__handle__update__req, (genericfunc_t)&start_f__handle__update__req); module_object.add_altstep("as_DIA_Gx_CCR", (genericfunc_t)&as__DIA__Gx__CCR_instance, (genericfunc_t )&activate_as__DIA__Gx__CCR, (genericfunc_t )&as__DIA__Gx__CCR); module_object.add_function("f_tr_DIA_Gy_CCR", (genericfunc_t)&f__tr__DIA__Gy__CCR, (genericfunc_t)&start_f__tr__DIA__Gy__CCR); module_object.add_altstep("as_DIA_Gy_CCR", (genericfunc_t)&as__DIA__Gy__CCR_instance, (genericfunc_t )&activate_as__DIA__Gy__CCR, (genericfunc_t )&as__DIA__Gy__CCR); module_object.add_function("f_pdp_ctx_act", (genericfunc_t)&f__pdp__ctx__act, (genericfunc_t)&start_f__pdp__ctx__act); module_object.add_function("f_pdp_ctx_exp_del_req", (genericfunc_t)&f__pdp__ctx__exp__del__req, (genericfunc_t)&start_f__pdp__ctx__exp__del__req); module_object.add_function("f_pdp_ctx_del", (genericfunc_t)&f__pdp__ctx__del, (genericfunc_t)&start_f__pdp__ctx__del); module_object.add_function("f_pdp_ctx_update", (genericfunc_t)&f__pdp__ctx__update, (genericfunc_t)&start_f__pdp__ctx__update); module_object.add_function("f_ctx_get_ipv6_interface_id", (genericfunc_t)&f__ctx__get__ipv6__interface__id, NULL); module_object.add_function("f_icmpv6_rs_for_pdp", (genericfunc_t)&f__icmpv6__rs__for__pdp, NULL); module_object.add_function("f_gen_icmpv6_neigh_solicit_for_pdp", (genericfunc_t)&f__gen__icmpv6__neigh__solicit__for__pdp, NULL); module_object.add_function("f_wait_icmp4", (genericfunc_t)&f__wait__icmp4, (genericfunc_t)&start_f__wait__icmp4); module_object.add_function("f_wait_icmp4_echo_request", (genericfunc_t)&f__wait__icmp4__echo__request, (genericfunc_t)&start_f__wait__icmp4__echo__request); module_object.add_function("f_wait_icmp4_echo_reply", (genericfunc_t)&f__wait__icmp4__echo__reply, (genericfunc_t)&start_f__wait__icmp4__echo__reply); module_object.add_function("f_wait_icmp6", (genericfunc_t)&f__wait__icmp6, (genericfunc_t)&start_f__wait__icmp6); module_object.add_function("f_wait_rtr_adv", (genericfunc_t)&f__wait__rtr__adv, (genericfunc_t)&start_f__wait__rtr__adv); module_object.add_function("f_wait_icmp6_echo_request", (genericfunc_t)&f__wait__icmp6__echo__request, (genericfunc_t)&start_f__wait__icmp6__echo__request); module_object.add_function("f_wait_icmp6_echo_reply", (genericfunc_t)&f__wait__icmp6__echo__reply, (genericfunc_t)&start_f__wait__icmp6__echo__reply); module_object.add_function("f_icmpv6_rs_for_pdp46", (genericfunc_t)&f__icmpv6__rs__for__pdp46, NULL); module_object.add_function("f_gen_icmpv6_neigh_solicit_for_pdp46", (genericfunc_t)&f__gen__icmpv6__neigh__solicit__for__pdp46, NULL); module_object.add_function("f_wait_gtpu_fail", (genericfunc_t)&f__wait__gtpu__fail, (genericfunc_t)&start_f__wait__gtpu__fail); current_location.update_lineno(984); /* GGSN_Tests.ttcn, line 984 */ const_protocol__ids__nodupes.set_size(4); const_protocol__ids__nodupes[0] = os_17; const_protocol__ids__nodupes[1] = os_18; const_protocol__ids__nodupes[2] = os_19; const_protocol__ids__nodupes[3] = os_20; module_object.add_function("f_PCO_permits_duplicates", (genericfunc_t)&f__PCO__permits__duplicates, NULL); module_object.add_function("f_PCO_ensure_no_duplicates", (genericfunc_t)&f__PCO__ensure__no__duplicates, NULL); module_object.add_testcase_nonpard("TC_pdp6_act_deact", testcase_TC__pdp6__act__deact); module_object.add_testcase_nonpard("TC_pdp6_act_deact_pcodns", testcase_TC__pdp6__act__deact__pcodns); module_object.add_testcase_nonpard("TC_pdp6_act_deact_icmp6", testcase_TC__pdp6__act__deact__icmp6); module_object.add_testcase_nonpard("TC_pdp6_act_deact_gtpu_access", testcase_TC__pdp6__act__deact__gtpu__access); module_object.add_testcase_nonpard("TC_pdp6_act_deact_gtpu_access_wrong_ll_saddr", testcase_TC__pdp6__act__deact__gtpu__access__wrong__ll__saddr); module_object.add_testcase_nonpard("TC_pdp6_act_deact_gtpu_access_wrong_global_saddr", testcase_TC__pdp6__act__deact__gtpu__access__wrong__global__saddr); module_object.add_testcase_nonpard("TC_pdp6_act_deact_gtpu_access_ipv4_apn6", testcase_TC__pdp6__act__deact__gtpu__access__ipv4__apn6); module_object.add_testcase_nonpard("TC_pdp6_clients_interact", testcase_TC__pdp6__clients__interact); module_object.add_testcase_nonpard("TC_pdp4_act_deact", testcase_TC__pdp4__act__deact); module_object.add_testcase_nonpard("TC_pdp4_act_deact_ipcp", testcase_TC__pdp4__act__deact__ipcp); module_object.add_testcase_nonpard("TC_pdp4_act_deact_ipcp_pap_broken", testcase_TC__pdp4__act__deact__ipcp__pap__broken); module_object.add_testcase_nonpard("TC_pdp4_act_deact_pcodns", testcase_TC__pdp4__act__deact__pcodns); module_object.add_testcase_nonpard("TC_pdp4_act_deact_gtpu_access", testcase_TC__pdp4__act__deact__gtpu__access); module_object.add_testcase_nonpard("TC_pdp4_act_deact_gtpu_access_wrong_saddr", testcase_TC__pdp4__act__deact__gtpu__access__wrong__saddr); module_object.add_testcase_nonpard("TC_pdp4_act_deact_gtpu_access_ipv6_apn4", testcase_TC__pdp4__act__deact__gtpu__access__ipv6__apn4); module_object.add_function("f_pdp4_clients_interact", (genericfunc_t)&f__pdp4__clients__interact, (genericfunc_t)&start_f__pdp4__clients__interact); module_object.add_testcase_nonpard("TC_pdp4_clients_interact_with_txseq", testcase_TC__pdp4__clients__interact__with__txseq); module_object.add_testcase_nonpard("TC_pdp4_clients_interact_without_txseq", testcase_TC__pdp4__clients__interact__without__txseq); module_object.add_testcase_nonpard("TC_echo_req_resp", testcase_TC__echo__req__resp); module_object.add_testcase_nonpard("TC_echo_req_resp_gtpu", testcase_TC__echo__req__resp__gtpu); module_object.add_testcase_nonpard("TC_pdp4_act_deact_with_single_dns", testcase_TC__pdp4__act__deact__with__single__dns); module_object.add_testcase_nonpard("TC_pdp4_act_deact_with_separate_dns", testcase_TC__pdp4__act__deact__with__separate__dns); module_object.add_testcase_nonpard("TC_pdp4_act_update_teic", testcase_TC__pdp4__act__update__teic); module_object.add_testcase_nonpard("TC_pdp4_act_update_teid", testcase_TC__pdp4__act__update__teid); module_object.add_testcase_nonpard("TC_pdp46_act_deact", testcase_TC__pdp46__act__deact); module_object.add_testcase_nonpard("TC_pdp46_act_deact_ipcp", testcase_TC__pdp46__act__deact__ipcp); module_object.add_testcase_nonpard("TC_pdp46_act_deact_icmp6", testcase_TC__pdp46__act__deact__icmp6); module_object.add_testcase_nonpard("TC_pdp46_act_deact_pcodns4", testcase_TC__pdp46__act__deact__pcodns4); module_object.add_testcase_nonpard("TC_pdp46_act_deact_pcodns6", testcase_TC__pdp46__act__deact__pcodns6); module_object.add_testcase_nonpard("TC_pdp46_act_deact_gtpu_access", testcase_TC__pdp46__act__deact__gtpu__access); module_object.add_testcase_nonpard("TC_pdp46_act_deact_gtpu_access_wrong_saddr_ipv4", testcase_TC__pdp46__act__deact__gtpu__access__wrong__saddr__ipv4); module_object.add_testcase_nonpard("TC_pdp46_act_deact_gtpu_access_wrong_ll_saddr_ipv6", testcase_TC__pdp46__act__deact__gtpu__access__wrong__ll__saddr__ipv6); module_object.add_testcase_nonpard("TC_pdp46_act_deact_gtpu_access_wrong_global_saddr_ipv6", testcase_TC__pdp46__act__deact__gtpu__access__wrong__global__saddr__ipv6); module_object.add_testcase_nonpard("TC_pdp46_clients_interact", testcase_TC__pdp46__clients__interact); module_object.add_testcase_nonpard("TC_pdp46_act_deact_apn4", testcase_TC__pdp46__act__deact__apn4); module_object.add_testcase_nonpard("TC_pdp_act2_recovery", testcase_TC__pdp__act2__recovery); module_object.add_testcase_nonpard("TC_act_deact_retrans_duplicate", testcase_TC__act__deact__retrans__duplicate); module_object.add_testcase_nonpard("TC_pdp_act_restart_ctr_echo", testcase_TC__pdp__act__restart__ctr__echo); module_object.add_testcase_nonpard("TC_lots_of_concurrent_pdp_ctx", testcase_TC__lots__of__concurrent__pdp__ctx); module_object.add_testcase_nonpard("TC_addr_pool_exhaustion", testcase_TC__addr__pool__exhaustion); module_object.add_testcase_nonpard("TC_gy_charging_cc_time", testcase_TC__gy__charging__cc__time); module_object.add_testcase_nonpard("TC_gy_charging_volume_quota_threshold", testcase_TC__gy__charging__volume__quota__threshold); } void post_init_module() { TTCN_Location current_location("GGSN_Tests.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "GGSN_Tests"); TCCEncoding__Functions::module_object.post_init_module(); GTPv1C__CodecPort__CtrlFunct::module_object.post_init_module(); GTPv1U__CodecPort__CtrlFunct::module_object.post_init_module(); GTPv1C__Templates::module_object.post_init_module(); GTPv1U__Templates::module_object.post_init_module(); PAP__Types::module_object.post_init_module(); ICMP__Templates::module_object.post_init_module(); ICMPv6__Templates::module_object.post_init_module(); Osmocom__VTY__Functions::module_object.post_init_module(); DIAMETER__ts29__212__Templates::module_object.post_init_module(); DIAMETER__ts29__272__Templates::module_object.post_init_module(); DIAMETER__ts32__299__Templates::module_object.post_init_module(); DIAMETER__Emulation::module_object.post_init_module(); current_location.update_lineno(371); /* GGSN_Tests.ttcn, line 371 */ const_t__DefinePDP_ratType_defval = os_11; current_location.update_lineno(410); /* GGSN_Tests.ttcn, line 410 */ template_f__handle__create__req_exp__cause_defval = os_12; current_location.update_lineno(475); /* GGSN_Tests.ttcn, line 475 */ const_f__handle__update__req_exp__cause_defval = os_12; current_location.update_lineno(714); /* GGSN_Tests.ttcn, line 714 */ template_f__pdp__ctx__act_exp__cause_defval = os_12; current_location.update_lineno(743); /* GGSN_Tests.ttcn, line 743 */ template_f__pdp__ctx__exp__del__req_expect__cause_defval = OMIT_VALUE; current_location.update_lineno(743); /* GGSN_Tests.ttcn, line 743 */ const_f__pdp__ctx__exp__del__req_expect__teardown_defval = FALSE; current_location.update_lineno(775); /* GGSN_Tests.ttcn, line 775 */ const_f__pdp__ctx__del_expect__causevalue_defval = os_12; current_location.update_lineno(775); /* GGSN_Tests.ttcn, line 775 */ const_f__pdp__ctx__del_expect__diameter_defval = TRUE; current_location.update_lineno(812); /* GGSN_Tests.ttcn, line 812 */ const_f__pdp__ctx__update_exp__cause_defval = os_12; current_location.update_lineno(812); /* GGSN_Tests.ttcn, line 812 */ template_f__pdp__ctx__update_new__teid_defval = OMIT_VALUE; current_location.update_lineno(812); /* GGSN_Tests.ttcn, line 812 */ template_f__pdp__ctx__update_new__teic_defval = OMIT_VALUE; } boolean set_module_param(Module_Param& param) { const char* const par_name = param.get_id()->get_current_name(); if (!strcmp(par_name, "m_bind_ip_gtpc")) { modulepar_m__bind__ip__gtpc.set_param(param); return TRUE; } else if (!strcmp(par_name, "m_bind_ip_gtpu")) { modulepar_m__bind__ip__gtpu.set_param(param); return TRUE; } else if (!strcmp(par_name, "m_ggsn_ip_gtpc")) { modulepar_m__ggsn__ip__gtpc.set_param(param); return TRUE; } else if (!strcmp(par_name, "m_ggsn_ip_gtpu")) { modulepar_m__ggsn__ip__gtpu.set_param(param); return TRUE; } else if (!strcmp(par_name, "m_ggsn_ip4_dns1")) { modulepar_m__ggsn__ip4__dns1.set_param(param); return TRUE; } else if (!strcmp(par_name, "m_ggsn_ip4_dns2")) { modulepar_m__ggsn__ip4__dns2.set_param(param); return TRUE; } else if (!strcmp(par_name, "m_ggsn_ip6_dns1")) { modulepar_m__ggsn__ip6__dns1.set_param(param); return TRUE; } else if (!strcmp(par_name, "m_ggsn_ip6_dns2")) { modulepar_m__ggsn__ip6__dns2.set_param(param); return TRUE; } else if (!strcmp(par_name, "mp_t3_response")) { modulepar_mp__t3__response.set_param(param); return TRUE; } else if (!strcmp(par_name, "mp_n3_requests")) { modulepar_mp__n3__requests.set_param(param); return TRUE; } else if (!strcmp(par_name, "m_ggsn_impl")) { modulepar_m__ggsn__impl.set_param(param); return TRUE; } else if (!strcmp(par_name, "m_ggsn_conf")) { modulepar_m__ggsn__conf.set_param(param); return TRUE; } else return FALSE; } void log_module_param() { TTCN_Logger::log_event_str("m_bind_ip_gtpc := "); m__bind__ip__gtpc.log(); TTCN_Logger::log_event_str(", m_bind_ip_gtpu := "); m__bind__ip__gtpu.log(); TTCN_Logger::log_event_str(", m_ggsn_ip_gtpc := "); m__ggsn__ip__gtpc.log(); TTCN_Logger::log_event_str(", m_ggsn_ip_gtpu := "); m__ggsn__ip__gtpu.log(); TTCN_Logger::log_event_str(", m_ggsn_ip4_dns1 := "); m__ggsn__ip4__dns1.log(); TTCN_Logger::log_event_str(", m_ggsn_ip4_dns2 := "); m__ggsn__ip4__dns2.log(); TTCN_Logger::log_event_str(", m_ggsn_ip6_dns1 := "); m__ggsn__ip6__dns1.log(); TTCN_Logger::log_event_str(", m_ggsn_ip6_dns2 := "); m__ggsn__ip6__dns2.log(); TTCN_Logger::log_event_str(", mp_t3_response := "); mp__t3__response.log(); TTCN_Logger::log_event_str(", mp_n3_requests := "); mp__n3__requests.log(); TTCN_Logger::log_event_str(", m_ggsn_impl := "); m__ggsn__impl.log(); TTCN_Logger::log_event_str(", m_ggsn_conf := "); m__ggsn__conf.log(); } boolean init_comp_type(const char *component_type, boolean init_base_comps) { (void)init_base_comps; if (!strcmp(component_type, "GT_CT")) { GT__CT_component_GTPC.activate_port(); GT__CT_component_GTPU.activate_port(); GT__CT_component_g__initialized = FALSE; GT__CT_component_g__restart__ctr = os_0; GT__CT_component_g__sgsn__ip__c.clean_up(); GT__CT_component_g__sgsn__ip__u.clean_up(); GT__CT_component_g__peer__c.connId() = 0; GT__CT_component_g__peer__c.remName() = m__ggsn__ip__gtpc; GT__CT_component_g__peer__c.remPort() = 2123; GT__CT_component_g__peer__u.connId() = 0; GT__CT_component_g__peer__u.remName() = m__ggsn__ip__gtpu; GT__CT_component_g__peer__u.remPort() = 2152; GT__CT_component_g__c__seq__nr.clean_up(); GT__CT_component_g__d__seq__nr.clean_up(); GT__CT_component_GGSNVTY.activate_port(); GT__CT_component_use__gtpu__txseq = FALSE; GT__CT_component_g__use__echo__intval = 0; GT__CT_component_g__gx__pars.clean_up(); GT__CT_component_vc__Gx.clean_up(); GT__CT_component_Gx__UNIT.activate_port(); GT__CT_component_Gx__PROC.activate_port(); GT__CT_component_g__gy__pars.clean_up(); GT__CT_component_vc__Gy.clean_up(); GT__CT_component_Gy__UNIT.activate_port(); GT__CT_component_Gy__PROC.activate_port(); GT__CT_component_g__gy__validity__time = 0; GT__CT_component_g__gy__volume__quota = 0; GT__CT_component_g__gy__volume__threshold = 0; GT__CT_component_g__rx__gy.clean_up(); return TRUE; } else return FALSE; } boolean init_system_port(const char* component_type, const char* port_name) { if (!strcmp(component_type, "GT_CT")) { if (!strcmp(port_name, "GGSNVTY")) { GT__CT_component_GGSNVTY.safe_start(); return TRUE; } if (!strcmp(port_name, "GTPC")) { GT__CT_component_GTPC.safe_start(); return TRUE; } if (!strcmp(port_name, "GTPU")) { GT__CT_component_GTPU.safe_start(); return TRUE; } if (!strcmp(port_name, "Gx_PROC")) { GT__CT_component_Gx__PROC.safe_start(); return TRUE; } if (!strcmp(port_name, "Gx_UNIT")) { GT__CT_component_Gx__UNIT.safe_start(); return TRUE; } if (!strcmp(port_name, "Gy_PROC")) { GT__CT_component_Gy__PROC.safe_start(); return TRUE; } if (!strcmp(port_name, "Gy_UNIT")) { GT__CT_component_Gy__UNIT.safe_start(); return TRUE; } } return FALSE; } boolean start_ptc_function(const char *function_name, Text_Buf& function_arguments) { if (!strcmp(function_name, "f_init_vty")) { TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_init_vty()."); TTCN_Runtime::function_started(function_arguments); f__init__vty(); TTCN_Runtime::function_finished("f_init_vty"); return TRUE; } else if (!strcmp(function_name, "f_vty_set_gpdu_txseq")) { BOOLEAN enable; enable.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_vty_set_gpdu_txseq("); enable.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__vty__set__gpdu__txseq(enable); TTCN_Runtime::function_finished("f_vty_set_gpdu_txseq"); return TRUE; } else if (!strcmp(function_name, "f_vty_enable_echo_interval")) { INTEGER intval__sec; intval__sec.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_vty_enable_echo_interval("); intval__sec.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__vty__enable__echo__interval(intval__sec); TTCN_Runtime::function_finished("f_vty_enable_echo_interval"); return TRUE; } else if (!strcmp(function_name, "DiameterForwardUnitdataCallback")) { DIAMETER__Types::PDU__DIAMETER msg; msg.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function DiameterForwardUnitdataCallback("); msg.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); DiameterForwardUnitdataCallback(msg); TTCN_Runtime::function_finished("DiameterForwardUnitdataCallback"); return TRUE; } else if (!strcmp(function_name, "f_init_diameter")) { CHARSTRING id; id.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_init_diameter("); id.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__init__diameter(id); TTCN_Runtime::function_finished("f_init_diameter"); return TRUE; } else if (!strcmp(function_name, "f_init")) { TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_init()."); TTCN_Runtime::function_started(function_arguments); f__init(); TTCN_Runtime::function_finished("f_init"); return TRUE; } else if (!strcmp(function_name, "f_shutdown_helper")) { TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_shutdown_helper()."); TTCN_Runtime::function_started(function_arguments); f__shutdown__helper(); TTCN_Runtime::function_finished("f_shutdown_helper"); return TRUE; } else if (!strcmp(function_name, "f_send_gtpc")) { GTPv1C__CodecPort::Gtp1cUnitdata_template data; data.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_send_gtpc("); data.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__send__gtpc(data); TTCN_Runtime::function_finished("f_send_gtpc"); return TRUE; } else if (!strcmp(function_name, "f_send_gtpu")) { PdpContext ctx; OCTETSTRING data; ctx.decode_text(function_arguments); data.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_send_gtpu("); ctx.log(); TTCN_Logger::log_event_str(", "); data.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__send__gtpu(ctx, data); TTCN_Runtime::function_finished("f_send_gtpu"); return TRUE; } else if (!strcmp(function_name, "f_handle_create_req")) { PdpContext ctx; GTPv1C__CodecPort::Gtp1cUnitdata ud; OCTETSTRING_template exp__cause; ctx.decode_text(function_arguments); ud.decode_text(function_arguments); exp__cause.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_handle_create_req("); ctx.log(); TTCN_Logger::log_event_str(", "); ud.log(); TTCN_Logger::log_event_str(", "); exp__cause.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__handle__create__req(ctx, ud, exp__cause); TTCN_Runtime::function_finished("f_handle_create_req"); return TRUE; } else if (!strcmp(function_name, "f_handle_update_req")) { PdpContext ctx; GTPv1C__CodecPort::Gtp1cUnitdata ud; OCTETSTRING exp__cause; ctx.decode_text(function_arguments); ud.decode_text(function_arguments); exp__cause.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_handle_update_req("); ctx.log(); TTCN_Logger::log_event_str(", "); ud.log(); TTCN_Logger::log_event_str(", "); exp__cause.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__handle__update__req(ctx, ud, exp__cause); TTCN_Runtime::function_finished("f_handle_update_req"); return TRUE; } else if (!strcmp(function_name, "f_tr_DIA_Gy_CCR")) { PdpContext_template ctx; DIAMETER__Types::DCC__NONE__CC__Request__Type req__type; ctx.decode_text(function_arguments); req__type.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_tr_DIA_Gy_CCR("); ctx.log(); TTCN_Logger::log_event_str(", "); req__type.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__tr__DIA__Gy__CCR(ctx, req__type); TTCN_Runtime::function_finished("f_tr_DIA_Gy_CCR"); return TRUE; } else if (!strcmp(function_name, "f_pdp_ctx_act")) { PdpContext ctx; OCTETSTRING_template exp__cause; ctx.decode_text(function_arguments); exp__cause.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_pdp_ctx_act("); ctx.log(); TTCN_Logger::log_event_str(", "); exp__cause.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__pdp__ctx__act(ctx, exp__cause); TTCN_Runtime::function_finished("f_pdp_ctx_act"); return TRUE; } else if (!strcmp(function_name, "f_pdp_ctx_exp_del_req")) { PdpContext ctx; OCTETSTRING_template expect__cause; BOOLEAN expect__teardown; ctx.decode_text(function_arguments); expect__cause.decode_text(function_arguments); expect__teardown.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_pdp_ctx_exp_del_req("); ctx.log(); TTCN_Logger::log_event_str(", "); expect__cause.log(); TTCN_Logger::log_event_str(", "); expect__teardown.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__pdp__ctx__exp__del__req(ctx, expect__cause, expect__teardown); TTCN_Runtime::function_finished("f_pdp_ctx_exp_del_req"); return TRUE; } else if (!strcmp(function_name, "f_pdp_ctx_del")) { PdpContext ctx; BITSTRING_template teardown__ind; OCTETSTRING expect__causevalue; BOOLEAN expect__diameter; ctx.decode_text(function_arguments); teardown__ind.decode_text(function_arguments); expect__causevalue.decode_text(function_arguments); expect__diameter.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_pdp_ctx_del("); ctx.log(); TTCN_Logger::log_event_str(", "); teardown__ind.log(); TTCN_Logger::log_event_str(", "); expect__causevalue.log(); TTCN_Logger::log_event_str(", "); expect__diameter.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__pdp__ctx__del(ctx, teardown__ind, expect__causevalue, expect__diameter); TTCN_Runtime::function_finished("f_pdp_ctx_del"); return TRUE; } else if (!strcmp(function_name, "f_pdp_ctx_update")) { PdpContext ctx; OCTETSTRING exp__cause; OCTETSTRING_template new__teid; OCTETSTRING_template new__teic; ctx.decode_text(function_arguments); exp__cause.decode_text(function_arguments); new__teid.decode_text(function_arguments); new__teic.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_pdp_ctx_update("); ctx.log(); TTCN_Logger::log_event_str(", "); exp__cause.log(); TTCN_Logger::log_event_str(", "); new__teid.log(); TTCN_Logger::log_event_str(", "); new__teic.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__pdp__ctx__update(ctx, exp__cause, new__teid, new__teic); TTCN_Runtime::function_finished("f_pdp_ctx_update"); return TRUE; } else if (!strcmp(function_name, "f_wait_icmp4")) { PdpContext ctx; ICMP__Types::PDU__ICMP_template expected; ctx.decode_text(function_arguments); expected.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp4("); ctx.log(); TTCN_Logger::log_event_str(", "); expected.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__wait__icmp4(ctx, expected); TTCN_Runtime::function_finished("f_wait_icmp4"); return TRUE; } else if (!strcmp(function_name, "f_wait_icmp4_echo_request")) { PdpContext ctx; ctx.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp4_echo_request("); ctx.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__wait__icmp4__echo__request(ctx); TTCN_Runtime::function_finished("f_wait_icmp4_echo_request"); return TRUE; } else if (!strcmp(function_name, "f_wait_icmp4_echo_reply")) { PdpContext ctx; ctx.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp4_echo_reply("); ctx.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__wait__icmp4__echo__reply(ctx); TTCN_Runtime::function_finished("f_wait_icmp4_echo_reply"); return TRUE; } else if (!strcmp(function_name, "f_wait_icmp6")) { PdpContext ctx; ICMPv6__Types::PDU__ICMPv6_template expected; ctx.decode_text(function_arguments); expected.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp6("); ctx.log(); TTCN_Logger::log_event_str(", "); expected.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__wait__icmp6(ctx, expected); TTCN_Runtime::function_finished("f_wait_icmp6"); return TRUE; } else if (!strcmp(function_name, "f_wait_rtr_adv")) { PdpContext ctx; ctx.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_rtr_adv("); ctx.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__wait__rtr__adv(ctx); TTCN_Runtime::function_finished("f_wait_rtr_adv"); return TRUE; } else if (!strcmp(function_name, "f_wait_icmp6_echo_request")) { PdpContext ctx; ctx.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp6_echo_request("); ctx.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__wait__icmp6__echo__request(ctx); TTCN_Runtime::function_finished("f_wait_icmp6_echo_request"); return TRUE; } else if (!strcmp(function_name, "f_wait_icmp6_echo_reply")) { PdpContext ctx; ctx.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_icmp6_echo_reply("); ctx.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__wait__icmp6__echo__reply(ctx); TTCN_Runtime::function_finished("f_wait_icmp6_echo_reply"); return TRUE; } else if (!strcmp(function_name, "f_wait_gtpu_fail")) { PdpContext ctx; ctx.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_wait_gtpu_fail("); ctx.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__wait__gtpu__fail(ctx); TTCN_Runtime::function_finished("f_wait_gtpu_fail"); return TRUE; } else if (!strcmp(function_name, "f_pdp4_clients_interact")) { TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_pdp4_clients_interact()."); TTCN_Runtime::function_started(function_arguments); f__pdp4__clients__interact(); TTCN_Runtime::function_finished("f_pdp4_clients_interact"); return TRUE; } else return FALSE; } void module_control_part() { TTCN_Location current_location("GGSN_Tests.ttcn", 2227, TTCN_Location::LOCATION_CONTROLPART, "GGSN_Tests"); TTCN_Runtime::begin_controlpart("GGSN_Tests"); current_location.update_lineno(2228); /* GGSN_Tests.ttcn, line 2228 */ if ((m__ggsn__conf != GGSN__Conf::GGSN__CONF__V6__ONLY)) { current_location.update_lineno(2229); /* GGSN_Tests.ttcn, line 2229 */ testcase_TC__pdp4__act__deact(FALSE, 0.0); current_location.update_lineno(2230); /* GGSN_Tests.ttcn, line 2230 */ testcase_TC__pdp4__act__deact__ipcp(FALSE, 0.0); current_location.update_lineno(2231); /* GGSN_Tests.ttcn, line 2231 */ testcase_TC__pdp4__act__deact__ipcp__pap__broken(FALSE, 0.0); current_location.update_lineno(2232); /* GGSN_Tests.ttcn, line 2232 */ testcase_TC__pdp4__act__deact__pcodns(FALSE, 0.0); current_location.update_lineno(2233); /* GGSN_Tests.ttcn, line 2233 */ testcase_TC__pdp4__act__deact__gtpu__access(FALSE, 0.0); current_location.update_lineno(2234); /* GGSN_Tests.ttcn, line 2234 */ testcase_TC__pdp4__act__deact__gtpu__access__wrong__saddr(FALSE, 0.0); current_location.update_lineno(2235); /* GGSN_Tests.ttcn, line 2235 */ testcase_TC__pdp4__act__deact__gtpu__access__ipv6__apn4(FALSE, 0.0); current_location.update_lineno(2236); /* GGSN_Tests.ttcn, line 2236 */ testcase_TC__pdp4__clients__interact__with__txseq(FALSE, 0.0); current_location.update_lineno(2237); /* GGSN_Tests.ttcn, line 2237 */ testcase_TC__pdp4__clients__interact__without__txseq(FALSE, 0.0); current_location.update_lineno(2238); /* GGSN_Tests.ttcn, line 2238 */ testcase_TC__pdp4__act__deact__with__single__dns(FALSE, 0.0); current_location.update_lineno(2239); /* GGSN_Tests.ttcn, line 2239 */ testcase_TC__pdp4__act__deact__with__separate__dns(FALSE, 0.0); current_location.update_lineno(2240); /* GGSN_Tests.ttcn, line 2240 */ testcase_TC__pdp4__act__update__teic(FALSE, 0.0); current_location.update_lineno(2241); /* GGSN_Tests.ttcn, line 2241 */ testcase_TC__pdp4__act__update__teid(FALSE, 0.0); } current_location.update_lineno(2244); /* GGSN_Tests.ttcn, line 2244 */ if ((m__ggsn__conf != GGSN__Conf::GGSN__CONF__V4__ONLY)) { current_location.update_lineno(2245); /* GGSN_Tests.ttcn, line 2245 */ testcase_TC__pdp6__act__deact(FALSE, 0.0); current_location.update_lineno(2246); /* GGSN_Tests.ttcn, line 2246 */ testcase_TC__pdp6__act__deact__pcodns(FALSE, 0.0); current_location.update_lineno(2247); /* GGSN_Tests.ttcn, line 2247 */ testcase_TC__pdp6__act__deact__icmp6(FALSE, 0.0); current_location.update_lineno(2248); /* GGSN_Tests.ttcn, line 2248 */ testcase_TC__pdp6__act__deact__gtpu__access(FALSE, 0.0); current_location.update_lineno(2249); /* GGSN_Tests.ttcn, line 2249 */ testcase_TC__pdp6__act__deact__gtpu__access__wrong__ll__saddr(FALSE, 0.0); current_location.update_lineno(2250); /* GGSN_Tests.ttcn, line 2250 */ testcase_TC__pdp6__act__deact__gtpu__access__wrong__global__saddr(FALSE, 0.0); current_location.update_lineno(2251); /* GGSN_Tests.ttcn, line 2251 */ testcase_TC__pdp6__act__deact__gtpu__access__ipv4__apn6(FALSE, 0.0); current_location.update_lineno(2252); /* GGSN_Tests.ttcn, line 2252 */ testcase_TC__pdp6__clients__interact(FALSE, 0.0); } current_location.update_lineno(2255); /* GGSN_Tests.ttcn, line 2255 */ { boolean tmp_317; tmp_317 = (m__ggsn__conf != GGSN__Conf::GGSN__CONF__V4__ONLY); if (tmp_317) tmp_317 = (m__ggsn__conf != GGSN__Conf::GGSN__CONF__V6__ONLY); if (tmp_317) { current_location.update_lineno(2256); /* GGSN_Tests.ttcn, line 2256 */ testcase_TC__pdp46__act__deact(FALSE, 0.0); current_location.update_lineno(2257); /* GGSN_Tests.ttcn, line 2257 */ testcase_TC__pdp46__act__deact__ipcp(FALSE, 0.0); current_location.update_lineno(2258); /* GGSN_Tests.ttcn, line 2258 */ testcase_TC__pdp46__act__deact__icmp6(FALSE, 0.0); current_location.update_lineno(2259); /* GGSN_Tests.ttcn, line 2259 */ testcase_TC__pdp46__act__deact__pcodns4(FALSE, 0.0); current_location.update_lineno(2260); /* GGSN_Tests.ttcn, line 2260 */ testcase_TC__pdp46__act__deact__pcodns6(FALSE, 0.0); current_location.update_lineno(2261); /* GGSN_Tests.ttcn, line 2261 */ testcase_TC__pdp46__act__deact__gtpu__access(FALSE, 0.0); current_location.update_lineno(2262); /* GGSN_Tests.ttcn, line 2262 */ testcase_TC__pdp46__act__deact__gtpu__access__wrong__saddr__ipv4(FALSE, 0.0); current_location.update_lineno(2263); /* GGSN_Tests.ttcn, line 2263 */ testcase_TC__pdp46__act__deact__gtpu__access__wrong__ll__saddr__ipv6(FALSE, 0.0); current_location.update_lineno(2264); /* GGSN_Tests.ttcn, line 2264 */ testcase_TC__pdp46__act__deact__gtpu__access__wrong__global__saddr__ipv6(FALSE, 0.0); current_location.update_lineno(2265); /* GGSN_Tests.ttcn, line 2265 */ testcase_TC__pdp46__clients__interact(FALSE, 0.0); } } current_location.update_lineno(2268); /* GGSN_Tests.ttcn, line 2268 */ if ((m__ggsn__conf == GGSN__Conf::GGSN__CONF__ALL)) { current_location.update_lineno(2269); /* GGSN_Tests.ttcn, line 2269 */ testcase_TC__pdp46__act__deact__apn4(FALSE, 0.0); } current_location.update_lineno(2272); /* GGSN_Tests.ttcn, line 2272 */ testcase_TC__echo__req__resp(FALSE, 0.0); current_location.update_lineno(2273); /* GGSN_Tests.ttcn, line 2273 */ testcase_TC__echo__req__resp__gtpu(FALSE, 0.0); current_location.update_lineno(2275); /* GGSN_Tests.ttcn, line 2275 */ { boolean tmp_318; tmp_318 = (m__ggsn__conf == GGSN__Conf::GGSN__CONF__V4__ONLY); if (!tmp_318) tmp_318 = (m__ggsn__conf == GGSN__Conf::GGSN__CONF__ALL); if (tmp_318) { current_location.update_lineno(2276); /* GGSN_Tests.ttcn, line 2276 */ testcase_TC__pdp__act2__recovery(FALSE, 0.0); current_location.update_lineno(2277); /* GGSN_Tests.ttcn, line 2277 */ testcase_TC__act__deact__retrans__duplicate(FALSE, 0.0); } } current_location.update_lineno(2280); /* GGSN_Tests.ttcn, line 2280 */ if ((m__ggsn__conf != GGSN__Conf::GGSN__CONF__V6__ONLY)) { current_location.update_lineno(2281); /* GGSN_Tests.ttcn, line 2281 */ testcase_TC__pdp__act__restart__ctr__echo(FALSE, 0.0); current_location.update_lineno(2283); /* GGSN_Tests.ttcn, line 2283 */ testcase_TC__lots__of__concurrent__pdp__ctx(FALSE, 0.0); current_location.update_lineno(2285); /* GGSN_Tests.ttcn, line 2285 */ testcase_TC__addr__pool__exhaustion(FALSE, 0.0); } current_location.update_lineno(2289); /* GGSN_Tests.ttcn, line 2289 */ if ((m__ggsn__impl == GGSN__Impl::GGSN__IMPL__OPEN5GS)) { current_location.update_lineno(2290); /* GGSN_Tests.ttcn, line 2290 */ testcase_TC__gy__charging__cc__time(FALSE, 0.0); current_location.update_lineno(2291); /* GGSN_Tests.ttcn, line 2291 */ testcase_TC__gy__charging__volume__quota__threshold(FALSE, 0.0); } TTCN_Runtime::end_controlpart(); } } /* end of namespace */