laforge submitted this change.
stp: Introduce STP_Tests_TCAP
The network topology and test infrastructure already allows testing TCAP forwarding
at STP over IPA<->IPA, M3UA<->IPA and M3UA<->M3UA.
Co-authored-by: Alexander Couzens <lynxis@fe80.eu>
Related: SYS#5423
Change-Id: I4340bdf126118c66af861f5a447e90883783920e
---
M stp/STP_Tests_Common.ttcn
A stp/STP_Tests_TCAP.cfg
A stp/STP_Tests_TCAP.ttcn
M stp/expected-results.xml
M stp/gen_links.sh
A stp/osmo-stp-tcap.confmerge
M stp/regen_makefile.sh
A stp/testenv_tcap.cfg
8 files changed, 1,087 insertions(+), 2 deletions(-)
diff --git a/stp/STP_Tests_Common.ttcn b/stp/STP_Tests_Common.ttcn
index 557fa29..0a0a436 100644
--- a/stp/STP_Tests_Common.ttcn
+++ b/stp/STP_Tests_Common.ttcn
@@ -13,6 +13,7 @@
friend module STP_Tests_M3UA;
friend module STP_Tests_IPA;
friend module STP_Tests_IPA_M3UA;
+friend module STP_Tests_TCAP;
import from General_Types all;
import from Osmocom_Types all;
diff --git a/stp/STP_Tests_TCAP.cfg b/stp/STP_Tests_TCAP.cfg
new file mode 100644
index 0000000..0ba90d7
--- /dev/null
+++ b/stp/STP_Tests_TCAP.cfg
@@ -0,0 +1,266 @@
+[ORDERED_INCLUDE]
+# Common configuration, shared between test suites
+"../Common.cfg"
+# testsuite specific configuration, not expected to change
+"./STP_Tests.default"
+
+# Local configuration below
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+
+[MODULE_PARAMETERS]
+STP_Tests_TCAP.mp_tcap_configs := {
+ # AS "as-m3ua-loadshare-0"
+ {
+ asp_name := "asp-m3ua-loadshare-0-0",
+ as_name := "as-m3ua-loadshare-0",
+ cfg := {
+ transport := SCCP_TRANSPORT_SIGTRAN,
+ tpars := {
+ sigtran := {
+ sctp_addr := { 9900, "127.0.0.1", 2905, "127.0.0.1" }
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 23,
+ own_ssn := 8, /* MSC (MAP) */
+ peer_pc := 5,
+ peer_ssn := 6, /* HLR (MAP) */
+ sio := '83'O,
+ rctx := 1000
+ }
+ },
+ {
+ asp_name := "asp-m3ua-loadshare-0-1",
+ as_name := "as-m3ua-loadshare-0",
+ cfg := {
+ transport := SCCP_TRANSPORT_SIGTRAN,
+ tpars := {
+ sigtran := {
+ sctp_addr := { 9901, "127.0.0.1", 2905, "127.0.0.1" }
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 23,
+ own_ssn := 8, /* MSC (MAP) */
+ peer_pc := 5,
+ peer_ssn := 6, /* HLR (MAP) */
+ sio := '83'O,
+ rctx := 1000
+ }
+ },
+ # AS "as-m3ua-loadshare-1"
+ {
+ asp_name := "asp-m3ua-loadshare-1-0",
+ as_name := "as-m3ua-loadshare-1",
+ cfg := {
+ transport := SCCP_TRANSPORT_SIGTRAN,
+ tpars := {
+ sigtran := {
+ sctp_addr := { 9910, "127.0.0.1", 2905, "127.0.0.1" }
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 24,
+ own_ssn := 8, /* MSC (MAP) */
+ peer_pc := 25,
+ peer_ssn := 6, /* HLR (MAP) */
+ sio := '83'O,
+ rctx := 1001
+ }
+ },
+ {
+ asp_name := "asp-m3ua-loadshare-1-1",
+ as_name := "as-m3ua-loadshare-1",
+ cfg := {
+ transport := SCCP_TRANSPORT_SIGTRAN,
+ tpars := {
+ sigtran := {
+ sctp_addr := { 9911, "127.0.0.1", 2905, "127.0.0.1" }
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 24,
+ own_ssn := 8, /* MSC (MAP) */
+ peer_pc := 25,
+ peer_ssn := 6, /* HLR (MAP) */
+ sio := '83'O,
+ rctx := 1001
+ }
+ },
+ # AS "as-m3ua-loadshare-2"
+ {
+ asp_name := "asp-m3ua-loadshare-2-0",
+ as_name := "as-m3ua-loadshare-2",
+ cfg := {
+ transport := SCCP_TRANSPORT_SIGTRAN,
+ tpars := {
+ sigtran := {
+ sctp_addr := { 9920, "127.0.0.1", 2905, "127.0.0.1" }
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 25,
+ own_ssn := 8, /* MSC (MAP) */
+ peer_pc := 24,
+ peer_ssn := 6, /* HLR (MAP) */
+ sio := '83'O,
+ rctx := 1002
+ }
+ },
+ {
+ asp_name := "asp-m3ua-loadshare-2-1",
+ as_name := "as-m3ua-loadshare-2",
+ cfg := {
+ transport := SCCP_TRANSPORT_SIGTRAN,
+ tpars := {
+ sigtran := {
+ sctp_addr := { 9921, "127.0.0.1", 2905, "127.0.0.1" }
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 25,
+ own_ssn := 8, /* MSC (MAP) */
+ peer_pc := 24,
+ peer_ssn := 6, /* HLR (MAP) */
+ sio := '83'O,
+ rctx := 1002
+ }
+ },
+ # AS "as-ipa-loadshare-0"
+ {
+ asp_name := "asp-ipa-loadshare-0-0",
+ as_name := "as-ipa-loadshare-0",
+ cfg := {
+ transport := SCCP_TRANSPORT_SCCPlite,
+ tpars := {
+ sccplite := {
+ tcp_addr := { 8800, "127.0.0.1", 5000, "127.0.0.1" },
+ tcp_is_server := false,
+ ipa_ccm_pars := omit
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 5,
+ own_ssn := 6, /* HLR (MAP) */
+ peer_pc := 23,
+ peer_ssn := 8, /* MSC (MAP) */
+ sio := '83'O,
+ rctx := 0
+ }
+ },
+ {
+ asp_name := "asp-ipa-loadshare-0-1",
+ as_name := "as-ipa-loadshare-0",
+ cfg := {
+ transport := SCCP_TRANSPORT_SCCPlite,
+ tpars := {
+ sccplite := {
+ tcp_addr := { 8801, "127.0.0.1", 5000, "127.0.0.1" },
+ tcp_is_server := false,
+ ipa_ccm_pars := omit
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 5,
+ own_ssn := 6, /* HLR (MAP) */
+ peer_pc := 23,
+ peer_ssn := 8, /* MSC (MAP) */
+ sio := '83'O,
+ rctx := 0
+ }
+ },
+ # AS "as-ipa-loadshare-1"
+ {
+ asp_name := "asp-ipa-loadshare-1-0",
+ as_name := "as-ipa-loadshare-1",
+ cfg := {
+ transport := SCCP_TRANSPORT_SCCPlite,
+ tpars := {
+ sccplite := {
+ tcp_addr := { 8810, "127.0.0.1", 5000, "127.0.0.1" },
+ tcp_is_server := false,
+ ipa_ccm_pars := omit
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 6,
+ own_ssn := 6, /* HLR (MAP) */
+ peer_pc := 7,
+ peer_ssn := 8, /* MSC (MAP) */
+ sio := '83'O,
+ rctx := 0
+ }
+ },
+ {
+ asp_name := "asp-ipa-loadshare-1-1",
+ as_name := "as-ipa-loadshare-1",
+ cfg := {
+ transport := SCCP_TRANSPORT_SCCPlite,
+ tpars := {
+ sccplite := {
+ tcp_addr := { 8811, "127.0.0.1", 5000, "127.0.0.1" },
+ tcp_is_server := false,
+ ipa_ccm_pars := omit
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 6,
+ own_ssn := 6, /* HLR (MAP) */
+ peer_pc := 7,
+ peer_ssn := 8, /* MSC (MAP) */
+ sio := '83'O,
+ rctx := 0
+ }
+ },
+ # AS "as-ipa-loadshare-2"
+ {
+ asp_name := "asp-ipa-loadshare-2-0",
+ as_name := "as-ipa-loadshare-2",
+ cfg := {
+ transport := SCCP_TRANSPORT_SCCPlite,
+ tpars := {
+ sccplite := {
+ tcp_addr := { 8820, "127.0.0.1", 5000, "127.0.0.1" },
+ tcp_is_server := false,
+ ipa_ccm_pars := omit
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 7,
+ own_ssn := 8, /* MSC (MAP) */
+ peer_pc := 6,
+ peer_ssn := 6, /* HLR (MAP) */
+ sio := '83'O,
+ rctx := 0
+ }
+ },
+ {
+ asp_name := "asp-ipa-loadshare-2-1",
+ as_name := "as-ipa-loadshare-2",
+ cfg := {
+ transport := SCCP_TRANSPORT_SCCPlite,
+ tpars := {
+ sccplite := {
+ tcp_addr := { 8821, "127.0.0.1", 5000, "127.0.0.1" },
+ tcp_is_server := false,
+ ipa_ccm_pars := omit
+ }
+ },
+ sccp_service_type := "mtp3_itu",
+ own_pc := 7,
+ own_ssn := 8, /* MSC (MAP) */
+ peer_pc := 6,
+ peer_ssn := 6, /* HLR (MAP) */
+ sio := '83'O,
+ rctx := 0
+ }
+ }
+}
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+STP_Tests_TCAP.control
diff --git a/stp/STP_Tests_TCAP.ttcn b/stp/STP_Tests_TCAP.ttcn
new file mode 100644
index 0000000..2f26547
--- /dev/null
+++ b/stp/STP_Tests_TCAP.ttcn
@@ -0,0 +1,644 @@
+module STP_Tests_TCAP {
+
+/* Osmocom STP test suite in in TTCN-3, TCAP routing (TCAP: ITU Q.771-774)
+ * (C) 2025 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
+ * Author: Pau Espin Pedrol <pespin@sysmocom.de>
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+import from General_Types all;
+import from Osmocom_Types all;
+import from IPL4asp_Types all;
+import from Misc_Helpers all;
+
+import from Osmocom_VTY_Functions all;
+
+import from M3UA_Types all;
+import from M3UA_Templates all;
+import from M3UA_CodecPort all;
+import from M3UA_CodecPort_CtrlFunct all;
+
+import from M3UA_Emulation all;
+import from MTP3asp_Types all;
+import from MTP3asp_PortType all;
+
+import from SCCP_Types all;
+import from SCCP_Templates all;
+import from SCCPasp_Types all;
+import from SCCP_Emulation all;
+import from SCCP_Adapter all;
+
+import from IPA_Emulation all;
+import from IPA_EXT_TCAP_ROUTING all;
+
+import from STP_Tests_Common all;
+import from STP_Tests_IPA all;
+import from STP_Tests_M3UA all;
+
+import from TCAPMessages language "ASN.1:1997" all;
+import from TCAP_Types all;
+import from TCAP_Templates all;
+import from TCAP_CodecPort all;
+
+const integer MAX_NUM_ASP := 4;
+const OCT1 c_M3UA_SI_SCCP := '03'O;
+
+type record TCAP_CT_Configuration {
+ /* Name of the ASP in the STP, (eg. to access it over VTY) */
+ charstring asp_name,
+ /* Name of the AS in the STP, (eg. to access it over VTY) */
+ charstring as_name,
+ SCCP_Adapter_Config cfg
+}
+type record of TCAP_CT_Configuration TCAP_CT_Configurations;
+
+modulepar {
+ /* local ASPs. Set in .cfg file: */
+ TCAP_CT_Configurations mp_tcap_configs := {}
+}
+
+type component TCAP_CT extends Test_CT {
+ var SCCP_Adapter g_tcap[MAX_NUM_ASP];
+ port TCAP_CODEC_PT SCCP_TCAP[MAX_NUM_ASP];
+ /* Port for IPA Extension TCAP_ROUTING */
+ port IPA_TCAP_ROUTING_PT IPA_TCAP_ROUTING[MAX_NUM_ASP];
+};
+
+private function tcap_build_configs(template (omit) Misc_Helpers.ro_charstring asps := omit)
+runs on TCAP_CT return TCAP_CT_Configurations
+{
+ if (not isvalue(asps)) {
+ return mp_tcap_configs;
+ }
+
+ var TCAP_CT_Configurations tcap_configs := {};
+ for (var integer i := 0; i < lengthof(asps); i := i + 1) {
+ var boolean found := false;
+ for (var integer j := 0; j < lengthof(mp_tcap_configs); j := j + 1) {
+ if (mp_tcap_configs[j].asp_name == valueof(asps[i])) {
+ found := true;
+ tcap_configs := tcap_configs & {mp_tcap_configs[j]};
+ break;
+ }
+ }
+ if (not found) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Could not find ASP ", asps[i], ", check your configuration"));
+ }
+ }
+ return tcap_configs;
+}
+
+
+private function f_init_tcap(TCAP_CT_Configurations tcap_configs) runs on TCAP_CT {
+ f_init_common();
+
+ for (var integer i := 0; i < lengthof(tcap_configs); i := i + 1) {
+ if (tcap_configs[i].cfg.transport == SCCP_TRANSPORT_SCCPlite) {
+ tcap_configs[i].cfg.tpars.sccplite.ipa_ccm_pars := c_IPA_default_ccm_pars;
+ tcap_configs[i].cfg.tpars.sccplite.ipa_ccm_pars.name := tcap_configs[i].as_name;
+ }
+ f_sccp_adapter_init(g_tcap[i], tcap_configs[i].cfg, "STP_TCAP_" & int2str(i));
+ connect(self:SCCP_TCAP[i], g_tcap[i].vc_SCCP:SCCP_SP_PORT);
+ if (tcap_configs[i].cfg.transport == SCCP_TRANSPORT_SCCPlite) {
+ connect(self:IPA_TCAP_ROUTING[i], g_tcap[i].vc_IPA:IPA_TCAP_ROUTING_PORT);
+ }
+ }
+
+ for (var integer i := 0; i < lengthof(tcap_configs); i := i + 1) {
+ f_sccp_adapter_start(g_tcap[i]);
+ }
+
+ /* M3UA Emulation doesn't yet signal events up the stack, so it's
+ impossible to know exactly when the ASP becomes active. Hence, wait for
+ a while here to do ASPUP+ASPAC procedures: */
+ f_sleep(3.0);
+}
+
+private function f_asp_tx_ipa_ext_tcap_routing(template (value) IPA_EXT_TCAP_ROUTING_Message send_msg,
+ integer asp_idx := 0, boolean exp_ack := true)
+runs on TCAP_CT
+{
+ var IPA_EXT_TCAP_ROUTING_Message msg;
+ timer T := 2.0;
+
+ IPA_TCAP_ROUTING[asp_idx].send(send_msg);
+ T.start;
+ alt {
+ [exp_ack] IPA_TCAP_ROUTING[asp_idx].receive(tr_IPA_EXT_TCAP_ROUTING_ACK);
+ [not exp_ack] IPA_TCAP_ROUTING[asp_idx].receive(tr_IPA_EXT_TCAP_ROUTING_NACK);
+ [] IPA_TCAP_ROUTING[asp_idx].receive(IPA_EXT_TCAP_ROUTING_Message:?) -> value msg {
+ setverdict(fail, __SCOPE__, "(): Rx unexpected IPA: ", msg);
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+ }
+ [] T.timeout {
+ setverdict(fail, __SCOPE__, "(): Timeout waiting for IPA EXT TCAP ROUTING ACK/NACK");
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+ }
+ }
+}
+
+private function f_asp_tx_tcap(template (value) TCMessage tcap_msg,
+ integer asp_idx := 0)
+runs on TCAP_CT
+{
+ var template (value) TCAP_N_UNITDATA_req sccp_unitdata_req :=
+ ts_TCAP_UNITDATA_req(g_tcap[asp_idx].sccp_addr_peer,
+ g_tcap[asp_idx].sccp_addr_own,
+ tcap_msg,
+ RETURN_OPTION_ON_ERROR)
+ SCCP_TCAP[asp_idx].send(sccp_unitdata_req);
+}
+
+
+private altstep as_asp_rx_tcap_any(template (present) TCMessage tcap_msg := ?,
+ integer tx_asp_idx := 0)
+runs on TCAP_CT
+{
+ var template (present) TCAP_N_UNITDATA_ind exp_sccp_unitdata_ind :=
+ tr_TCAP_UNITDATA_ind(g_tcap[tx_asp_idx].sccp_addr_peer,
+ g_tcap[tx_asp_idx].sccp_addr_own,
+ tcap_msg);
+ [] any from SCCP_TCAP.receive(exp_sccp_unitdata_ind) {
+ setverdict(pass);
+ }
+}
+
+private altstep as_asp_rx_tcap(template (present) TCMessage tcap_msg := ?,
+ integer tx_asp_idx := 0,
+ integer rx_asp_idx := 0, boolean fail_rx_others := true)
+runs on TCAP_CT
+{
+ var template (present) TCAP_N_UNITDATA_ind exp_sccp_unitdata_ind :=
+ tr_TCAP_UNITDATA_ind(g_tcap[tx_asp_idx].sccp_addr_peer,
+ g_tcap[tx_asp_idx].sccp_addr_own,
+ tcap_msg);
+
+ [] SCCP_TCAP[rx_asp_idx].receive(exp_sccp_unitdata_ind) {
+ setverdict(pass);
+ }
+ [fail_rx_others] any from SCCP_TCAP.receive(exp_sccp_unitdata_ind) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Rx TCAP at unexpected ASP with idx != ", rx_asp_idx));
+ }
+}
+
+private function f_asp_tx_tcap_exp(template (value) TCMessage tcap_msg,
+ integer tx_asp_idx,
+ integer rx_asp_idx)
+runs on TCAP_CT
+{
+ f_asp_tx_tcap(tcap_msg, tx_asp_idx);
+ as_asp_rx_tcap(tcap_msg, tx_asp_idx, rx_asp_idx);
+}
+
+private function f_asp_tx_tcap_exp_any(template (value) TCMessage tcap_msg,
+ integer tx_asp_idx)
+runs on TCAP_CT
+{
+ f_asp_tx_tcap(tcap_msg, tx_asp_idx);
+ as_asp_rx_tcap_any(tcap_msg, tx_asp_idx);
+}
+
+private function f_asp_tx_tcap_m3ua_ipa_transaction(integer o_asp_idx,
+ integer t_asp_idx,
+ OCT4 o_tid,
+ OCT4 t_tid)
+runs on TCAP_CT
+{
+ var template (value) TCMessage tcap_msg;
+
+ /* TCAP Being: O -> T */
+ tcap_msg := ts_TCAP_Begin(o_tid);
+ f_asp_tx_tcap_exp(tcap_msg, o_asp_idx, t_asp_idx);
+
+ /* TCAP Continue: O <- T */
+ tcap_msg := ts_TCAP_Continue(t_tid, o_tid);
+ f_asp_tx_tcap_exp_any(tcap_msg, t_asp_idx);
+
+ /* TCAP Continue: O -> T */
+ tcap_msg := ts_TCAP_Continue(o_tid, t_tid);
+ f_asp_tx_tcap_exp(tcap_msg, o_asp_idx, t_asp_idx);
+
+ /* TCAP End O <- T */
+ tcap_msg := ts_TCAP_End(o_tid);
+ f_asp_tx_tcap_exp_any(tcap_msg, t_asp_idx);
+}
+
+private function f_tcap_loadshare_register(integer node_a, integer tid_a_start, integer tid_a_stop,
+ integer node_b, integer tid_b_start, integer tid_b_stop,
+ boolean exp_ack := true, integer seq_nr := 1)
+runs on TCAP_CT
+{
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+
+ /* Node a */
+ tcap_rt_msg := ts_IPA_EXT_TCAP_ROUTING_ADD_RANGE(seq_nr := seq_nr,
+ tid_start := tid_a_start,
+ tid_end := tid_a_stop,
+ pc := IPA_EXT_TCAP_ROUTING_PC_WILDCARD,
+ ssn := IPA_EXT_TCAP_ROUTING_SSN_WILDCARD);
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, node_a);
+
+ /* Node b */
+ tcap_rt_msg.u.add_range.tid_start := tid_b_start;
+ tcap_rt_msg.u.add_range.tid_end := tid_b_stop;
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, node_b, exp_ack := exp_ack);
+}
+
+/* test routing TCAP traffic from IPA AS to IPA AS */
+testcase TC_tcap_loadshare_ipa_to_ipa() runs on TCAP_CT {
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-ipa-loadshare-1-0",
+ "asp-ipa-loadshare-1-1",
+ "asp-ipa-loadshare-2-0",
+ "asp-ipa-loadshare-2-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+
+ f_init_tcap(tcap_configs);
+
+ /* Configure TCAP routing on ASP "asp-ipa-loadshare-1-0": */
+ tcap_rt_msg := ts_IPA_EXT_TCAP_ROUTING_ADD_RANGE(seq_nr := 1,
+ tid_start := 0,
+ tid_end := 99,
+ pc := IPA_EXT_TCAP_ROUTING_PC_WILDCARD,
+ ssn := IPA_EXT_TCAP_ROUTING_SSN_WILDCARD)
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 0);
+ /* Configure TCAP routing on ASP "asp-ipa-loadshare-2-0": */
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 2);
+
+ /* Configure TCAP routing on ASP "asp-ipa-loadshare-1-1": */
+ tcap_rt_msg.u.add_range.tid_start := 100;
+ tcap_rt_msg.u.add_range.tid_end := 199;
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 1);
+ /* Configure TCAP routing on ASP "asp-ipa-loadshare-2-1": */
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 3);
+
+ f_asp_tx_tcap_m3ua_ipa_transaction(0, 3, int2oct(177, 4), int2oct(78, 4));
+
+ setverdict(pass);
+}
+
+/* test routing TCAP traffic from IPA AS to M3UA AS */
+testcase TC_tcap_loadshare_m3ua_to_ipa() runs on TCAP_CT {
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-0-0",
+ "asp-m3ua-loadshare-0-1",
+ "asp-ipa-loadshare-0-0",
+ "asp-ipa-loadshare-0-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+
+ f_init_tcap(tcap_configs);
+
+ /* Configure TCAP routing on ASP "asp-ipa-loadshare-0-0": */
+ tcap_rt_msg := ts_IPA_EXT_TCAP_ROUTING_ADD_RANGE(seq_nr := 0,
+ tid_start := 0,
+ tid_end := 99,
+ pc := tcap_configs[2].cfg.own_pc,
+ ssn := tcap_configs[2].cfg.own_ssn);
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 2);
+
+ /* Configure TCAP routing on ASP "asp-ipa-loadshare-0-1": */
+ tcap_rt_msg.u.add_range.tid_start := 100;
+ tcap_rt_msg.u.add_range.tid_end := 199;
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 3);
+
+ f_asp_tx_tcap_m3ua_ipa_transaction(0, 2, int2oct(77, 4), int2oct(42, 4));
+
+ setverdict(pass);
+}
+
+
+
+/* Test m3ua routing towards IPA/TCAP and register for wildcards ssn/pc */
+testcase TC_tcap_loadshare_m3ua_to_ipa_wildcard() runs on TCAP_CT {
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-0-0",
+ "asp-m3ua-loadshare-0-1",
+ "asp-ipa-loadshare-0-0",
+ "asp-ipa-loadshare-0-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+
+ f_init_tcap(tcap_configs);
+
+ /* Configure TCAP routing on IPA ASPs "asp-ipa-loadshare-0-0/1" */
+ f_tcap_loadshare_register(2, 0, 99, 3, 100, 199);
+ f_sleep(1.0);
+
+ f_asp_tx_tcap_m3ua_ipa_transaction(0, 2, int2oct(77, 4), int2oct(75, 4));
+
+ setverdict(pass);
+}
+
+/* test routing TCAP traffic - do 100 sessions towards the same ipa/tcap node */
+testcase TC_tcap_loadshare_m3ua_to_ipa_50(integer loops := 50) runs on TCAP_CT {
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-0-0",
+ "asp-m3ua-loadshare-0-1",
+ "asp-ipa-loadshare-0-0",
+ "asp-ipa-loadshare-0-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+
+ f_init_tcap(tcap_configs);
+
+ /* Configure TCAP routing on IPA ASPs "asp-ipa-loadshare-0-0/1" */
+ f_tcap_loadshare_register(2, 0, 299, 3, 300, 599);
+
+ var integer rand_tid := f_rnd_int(298);
+ for (var integer i := 0; i < loops; i := i + 1) {
+ var integer otid := 1 + i;
+ var integer dtid := 1 + ((rand_tid + i) mod 298);
+ f_asp_tx_tcap_m3ua_ipa_transaction(0, 2, int2oct(otid, 4), int2oct(dtid, 4));
+ }
+
+ setverdict(pass);
+}
+
+/* test routing TCAP overlapping ranges */
+private function f_tcap_loadshare_ipa_tcap_range_fail_overlap(integer tid_a_start, integer tid_a_stop,
+ integer tid_b_start, integer tid_b_stop) runs on TCAP_CT
+{
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-0-0",
+ "asp-m3ua-loadshare-0-1",
+ "asp-ipa-loadshare-0-0",
+ "asp-ipa-loadshare-0-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+
+ f_init_tcap(tcap_configs);
+
+ /* Configure TCAP routing on IPA ASPs "asp-ipa-loadshare-0-0/1" */
+ f_tcap_loadshare_register(2, tid_a_start, tid_a_stop, 3, tid_b_start, tid_b_stop, exp_ack := false);
+ setverdict(pass);
+}
+
+testcase TC_tcap_loadshare_ipa_tcap_range_fail_overlap_same() runs on TCAP_CT
+{
+ f_tcap_loadshare_ipa_tcap_range_fail_overlap(0, 99, 0, 99);
+}
+
+testcase TC_tcap_loadshare_ipa_tcap_range_fail_overlap_last() runs on TCAP_CT
+{
+ f_tcap_loadshare_ipa_tcap_range_fail_overlap(0, 99, 99, 199);
+}
+
+testcase TC_tcap_loadshare_ipa_tcap_range_fail_overlap_within() runs on TCAP_CT
+{
+ f_tcap_loadshare_ipa_tcap_range_fail_overlap(0, 99, 60, 80);
+}
+
+testcase TC_tcap_loadshare_ipa_tcap_range_fail_overlap_switch() runs on TCAP_CT
+{
+ f_tcap_loadshare_ipa_tcap_range_fail_overlap(99, 199, 0, 99);
+}
+
+private function f_tcap_loadshare_ipa_tcap_range_success_pc(TCAP_CT_Configurations tcap_configs)
+runs on TCAP_CT
+{
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+ tcap_rt_msg := ts_IPA_EXT_TCAP_ROUTING_ADD_RANGE(seq_nr := 1,
+ tid_start := 0,
+ tid_end := 99,
+ pc := IPA_EXT_TCAP_ROUTING_PC_WILDCARD,
+ ssn := IPA_EXT_TCAP_ROUTING_SSN_WILDCARD);
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 2);
+
+ tcap_rt_msg.u.add_range.tid_start := 60;
+ tcap_rt_msg.u.add_range.tid_end := 80;
+ tcap_rt_msg.u.add_range.pc := tcap_configs[2].cfg.own_pc;
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 3);
+}
+
+/* Test overlapping tid ranges, but with a more specific PC, within the same AS
+ *
+ * node a: 0..99
+ * node b: 60..80/pc (own)
+ */
+testcase TC_tcap_loadshare_ipa_tcap_range_success_pc() runs on TCAP_CT {
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-0-0",
+ "asp-m3ua-loadshare-0-1",
+ "asp-ipa-loadshare-0-0",
+ "asp-ipa-loadshare-0-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+
+ f_init_tcap(tcap_configs);
+ f_tcap_loadshare_ipa_tcap_range_success_pc(tcap_configs);
+ f_asp_tx_tcap_m3ua_ipa_transaction(0, 2, int2oct(23, 4), int2oct(98, 4));
+ f_asp_tx_tcap_m3ua_ipa_transaction(0, 3, int2oct(60, 4), int2oct(79, 4));
+ /* TODO: check traffic routing with the correct PC, but different SSN, otid := 60 */
+
+ setverdict(pass);
+}
+
+/* Test overlapping tid ranges, but with a more specific PC and SSN, within the same AS
+ *
+ * node a: 0..99
+ * node b: 60..80/pc (own)
+ * node b: 60..80/pc; 60..80/pc/ssn (own)
+ */
+testcase TC_tcap_loadshare_ipa_tcap_range_success_pc_ssn() runs on TCAP_CT {
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-0-0",
+ "asp-m3ua-loadshare-0-1",
+ "asp-ipa-loadshare-0-0",
+ "asp-ipa-loadshare-0-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+ f_init_tcap(tcap_configs);
+
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+
+ f_tcap_loadshare_ipa_tcap_range_success_pc(tcap_configs);
+ tcap_rt_msg := ts_IPA_EXT_TCAP_ROUTING_ADD_RANGE(seq_nr := 2,
+ tid_start := 60,
+ tid_end := 80,
+ pc := tcap_configs[2].cfg.own_pc,
+ ssn := tcap_configs[2].cfg.own_ssn);
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 3);
+ f_asp_tx_tcap_m3ua_ipa_transaction(0, 3, int2oct(60, 4), int2oct(70, 4));
+
+ setverdict(pass);
+}
+
+/* Test overlapping tid ranges, but with a more specific PC and SSN, within the same AS
+ *
+ * node a: 0..99
+ * node b: 60..80/pc (own)
+ * node b: 60..80/pc; 60..80/ssn (own)
+ */
+testcase TC_tcap_loadshare_ipa_tcap_range_success_pc_ssn2() runs on TCAP_CT {
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-0-0",
+ "asp-m3ua-loadshare-0-1",
+ "asp-ipa-loadshare-0-0",
+ "asp-ipa-loadshare-0-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+
+ f_init_tcap(tcap_configs);
+ f_tcap_loadshare_ipa_tcap_range_success_pc(tcap_configs);
+ tcap_rt_msg := ts_IPA_EXT_TCAP_ROUTING_ADD_RANGE(seq_nr := 2,
+ tid_start := 60,
+ tid_end := 80,
+ pc := IPA_EXT_TCAP_ROUTING_PC_WILDCARD,
+ ssn := tcap_configs[2].cfg.own_ssn);
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 3);
+ f_asp_tx_tcap_m3ua_ipa_transaction(0, 3, int2oct(60, 4), int2oct(99, 4));
+
+ setverdict(pass);
+}
+
+/* Test overlapping tid ranges, but with a more specific PC and SSN, within the same AS
+ *
+ * node a: 0..99
+ * node b: 60..80/pc (own)
+ * node b: 60..80/ssn (own)
+ * node b: 65..70/ssn (own) (fails)
+ */
+testcase TC_tcap_loadshare_ipa_tcap_range_fail_pc_ssn_overlap() runs on TCAP_CT {
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-0-0",
+ "asp-m3ua-loadshare-0-1",
+ "asp-ipa-loadshare-0-0",
+ "asp-ipa-loadshare-0-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+
+ f_init_tcap(tcap_configs);
+ f_tcap_loadshare_ipa_tcap_range_success_pc(tcap_configs);
+ tcap_rt_msg := ts_IPA_EXT_TCAP_ROUTING_ADD_RANGE(seq_nr := 2,
+ tid_start := 60,
+ tid_end := 80,
+ pc := IPA_EXT_TCAP_ROUTING_PC_WILDCARD,
+ ssn := tcap_configs[2].cfg.own_ssn);
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 3);
+ tcap_rt_msg := ts_IPA_EXT_TCAP_ROUTING_ADD_RANGE(seq_nr := 3,
+ tid_start := 65,
+ tid_end := 70,
+ pc := IPA_EXT_TCAP_ROUTING_PC_WILDCARD,
+ ssn := tcap_configs[2].cfg.own_ssn);
+ f_asp_tx_ipa_ext_tcap_routing(tcap_rt_msg, 3, exp_ack := false);
+ setverdict(pass);
+}
+
+/* Simulate a Insert Subscriber Data from IPA towards M3UA */
+// FIXME: rename it to allow IPA -> M3UA traffic
+private function f_asp_tx_tcap_ipa_m3ua_gt_isd_transaction(
+ integer o_asp_idx,
+ integer t_asp_idx,
+ OCT4 o_tid,
+ OCT4 t_tid)
+runs on TCAP_CT
+{
+ var template (value) TCMessage tcap_msg;
+
+ /* TCAP Being: O -> T */
+ tcap_msg := ts_TCAP_Begin(o_tid);
+ f_asp_tx_tcap_exp_any(tcap_msg, o_asp_idx);
+
+ /* TCAP Continue: O <- T */
+ tcap_msg := ts_TCAP_Continue(t_tid, o_tid);
+ f_asp_tx_tcap_exp(tcap_msg, o_asp_idx, t_asp_idx);
+
+ /* TCAP Continue: O -> T */
+ tcap_msg := ts_TCAP_Continue(o_tid, t_tid);
+ f_asp_tx_tcap_exp_any(tcap_msg, o_asp_idx);
+
+ /* TCAP End O <- T */
+ tcap_msg := ts_TCAP_End(o_tid);
+ f_asp_tx_tcap_exp(tcap_msg, o_asp_idx, t_asp_idx);
+}
+
+/* Test m3ua -> ipa/tcap doing a ISD with SCCP GT */
+testcase TC_tcap_loadshare_m3ua_to_ip_gt_isd() runs on TCAP_CT {
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+ /* FIXME: create m3ua and ipa endpoints which contain GTs, using the same endpoints
+ * as for 0-0.
+ */
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-1-0",
+ "asp-m3ua-loadshare-1-1",
+ "asp-ipa-loadshare-0-0",
+ "asp-ipa-loadshare-0-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+
+ f_init_tcap(tcap_configs);
+
+ /* Configure TCAP routing on IPA ASPs "asp-ipa-loadshare-0-0/1" */
+ f_tcap_loadshare_register(2, 0, 99, 3, 100, 199);
+ f_sleep(1.0);
+
+ f_asp_tx_tcap_ipa_m3ua_gt_isd_transaction(0, 2, int2oct(77, 4), int2oct(75, 4));
+ setverdict(pass);
+}
+
+/* Test if UTDS is sent back when sending a TCAP messages with a OTID not valid
+ *
+ * node a: 0..99
+ * node b: 100..199
+ */
+testcase TC_tcap_loadshare_ipa_tcap_utds() runs on TCAP_CT {
+ var template (value) IPA_EXT_TCAP_ROUTING_Message tcap_rt_msg;
+ var Misc_Helpers.ro_charstring tcap_asps := { "asp-m3ua-loadshare-0-0",
+ "asp-m3ua-loadshare-0-1",
+ "asp-ipa-loadshare-0-0",
+ "asp-ipa-loadshare-0-1" };
+ var TCAP_CT_Configurations tcap_configs := tcap_build_configs(tcap_asps);
+ var template (value) TCMessage tcap_msg;
+ timer T := 5.0;
+
+ f_init_tcap(tcap_configs);
+ /* Configure TCAP routing on IPA ASPs "asp-ipa-loadshare-0-0/1" */
+ f_tcap_loadshare_register(2, 0, 99, 3, 100, 199);
+
+
+ /* send a TCAP message with oTID 250 (no range available) */
+
+ /* TCAP Being: O -> T */
+ tcap_msg := ts_TCAP_Begin(int2oct(250, 4));
+ f_asp_tx_tcap(tcap_msg, 0);
+
+ var template (present) TCAP_N_NOTICE_ind exp_sccp_notice_ind :=
+ tr_TCAP_N_NOTICE_ind(g_tcap[0].sccp_addr_own,
+ g_tcap[0].sccp_addr_peer,
+ *,
+ tcap_msg);
+ T.start;
+ alt {
+ [] any from SCCP_TCAP.receive(exp_sccp_notice_ind) {
+ setverdict(pass);
+ }
+ [] T.timeout {
+ setverdict(fail, __SCOPE__, "(): Timeout waiting for UTDS");
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+ }
+ }
+
+ setverdict(pass);
+}
+
+/* TODO: test TCAP Abort message is used.
+ * TODO: test TCAP Begin+End message is used.
+ * TODO: test TCAP GlobalTitles ISD
+ * TODO: test TCAP GlobalTitles ULA
+ */
+
+control {
+ execute( TC_tcap_loadshare_ipa_to_ipa() );
+ execute( TC_tcap_loadshare_m3ua_to_ipa() );
+ execute( TC_tcap_loadshare_m3ua_to_ipa_50() );
+ execute( TC_tcap_loadshare_m3ua_to_ipa_wildcard() );
+ execute( TC_tcap_loadshare_ipa_tcap_range_fail_overlap_same() );
+ execute( TC_tcap_loadshare_ipa_tcap_range_fail_overlap_last() );
+ execute( TC_tcap_loadshare_ipa_tcap_range_fail_overlap_within() );
+ execute( TC_tcap_loadshare_ipa_tcap_range_fail_overlap_switch() );
+ execute( TC_tcap_loadshare_ipa_tcap_range_success_pc() );
+ execute( TC_tcap_loadshare_ipa_tcap_range_success_pc_ssn() );
+ execute( TC_tcap_loadshare_ipa_tcap_range_success_pc_ssn2() );
+ execute( TC_tcap_loadshare_ipa_tcap_range_fail_pc_ssn_overlap() );
+ execute( TC_tcap_loadshare_ipa_tcap_utds() );
+}
+
+
+
+}
diff --git a/stp/expected-results.xml b/stp/expected-results.xml
index 91115d9..53cf703 100644
--- a/stp/expected-results.xml
+++ b/stp/expected-results.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<testsuite name='STP_Tests' tests='62' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'>
+<testsuite name='STP_Tests' tests='81' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'>
<testcase classname='STP_Tests_M3UA' name='TC_connect_asp_up' time='MASKED'/>
<testcase classname='STP_Tests_M3UA' name='TC_beat' time='MASKED'/>
<testcase classname='STP_Tests_M3UA' name='TC_beat_payload' time='MASKED'/>
@@ -68,4 +68,17 @@
<testcase classname='STP_Tests_IPA_M3UA' name='TC_ipa_to_m3ua' time='MASKED'/>
<testcase classname='STP_Tests_IPA_M3UA' name='TC_ipa_to_m3ua_ni' time='MASKED'/>
<testcase classname='STP_Tests_IPA_M3UA' name='TC_ipa_to_m3ua_patch_sccp' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_ipa_to_ipa' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_m3ua_to_ipa' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_m3ua_to_ipa_50' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_m3ua_to_ipa_wildcard' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_ipa_tcap_range_fail_overlap_same' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_ipa_tcap_range_fail_overlap_last' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_ipa_tcap_range_fail_overlap_within' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_ipa_tcap_range_fail_overlap_switch' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_ipa_tcap_range_success_pc' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_ipa_tcap_range_success_pc_ssn' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_ipa_tcap_range_success_pc_ssn2' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_ipa_tcap_range_fail_pc_ssn_overlap' time='MASKED'/>
+ <testcase classname='STP_Tests_TCAP' name='TC_tcap_loadshare_ipa_tcap_utds' time='MASKED'/>
</testsuite>
diff --git a/stp/gen_links.sh b/stp/gen_links.sh
index 625a3de..febef3d 100755
--- a/stp/gen_links.sh
+++ b/stp/gen_links.sh
@@ -46,11 +46,17 @@
FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn"
gen_links $DIR $FILES
+DIR=../library/tcap
+FILES="TCAPMessages.asn TCAP_DialoguePDUs.asn TCAP_UnidialoguePDUs.asn "
+FILES+="TCAP_EncDec.cc TCAP_CodecPort.ttcn TCAP_Types.ttcn TCAP_Templates.ttcn "
+gen_links $DIR $FILES
+
DIR=../library
FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc "
+FILES+="IPA_EXT_TCAP_ROUTING.ttcn "
FILES+="IPA_Types.ttcn IPA_Emulation.ttcnpp IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc "
FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn "
-FILES+="SCCP_Templates.ttcn "
+FILES+="SCCP_Templates.ttcn SCCP_Adapter.ttcnpp "
FILES+="M3UA_Templates.ttcn M3UA_CodecPort.ttcn M3UA_CodecPort_CtrlFunct.ttcn M3UA_CodecPort_CtrlFunctDef.cc "
FILES+="SCTP_Templates.ttcn "
gen_links $DIR $FILES
diff --git a/stp/osmo-stp-tcap.confmerge b/stp/osmo-stp-tcap.confmerge
new file mode 100644
index 0000000..3b417ac
--- /dev/null
+++ b/stp/osmo-stp-tcap.confmerge
@@ -0,0 +1,140 @@
+cs7 instance 0
+ !
+ !M3UA AS/ASP as(p)-m3ua-loadshare-0:
+ !
+ asp asp-m3ua-loadshare-0-0 9900 2905 m3ua
+ local-ip 127.0.0.1
+ local-ip ::1
+ remote-ip 127.0.0.1
+ remote-ip ::1
+ role sg
+ sctp-role server
+ asp asp-m3ua-loadshare-0-1 9901 2905 m3ua
+ local-ip 127.0.0.1
+ local-ip ::1
+ remote-ip 127.0.0.1
+ remote-ip ::1
+ role sg
+ sctp-role server
+ as as-m3ua-loadshare-0 m3ua
+ routing-key 1000 23
+ asp asp-m3ua-loadshare-0-0
+ asp asp-m3ua-loadshare-0-1
+ !
+ !M3UA AS/ASP as(p)-m3ua-loadshare-1:
+ !
+ asp asp-m3ua-loadshare-1-0 9910 2905 m3ua
+ local-ip 127.0.0.1
+ local-ip ::1
+ remote-ip 127.0.0.1
+ remote-ip ::1
+ role sg
+ sctp-role server
+ asp asp-m3ua-loadshare-1-1 9911 2905 m3ua
+ local-ip 127.0.0.1
+ local-ip ::1
+ remote-ip 127.0.0.1
+ remote-ip ::1
+ role sg
+ sctp-role server
+ as as-m3ua-loadshare-1 m3ua
+ routing-key 1001 24
+ asp asp-m3ua-loadshare-1-0
+ asp asp-m3ua-loadshare-1-1
+ !
+ !M3UA AS/ASP as(p)-m3ua-loadshare-2:
+ !
+ asp asp-m3ua-loadshare-2-0 9920 2905 m3ua
+ local-ip 127.0.0.1
+ local-ip ::1
+ remote-ip 127.0.0.1
+ remote-ip ::1
+ role sg
+ sctp-role server
+ asp asp-m3ua-loadshare-2-1 9921 2905 m3ua
+ local-ip 127.0.0.1
+ local-ip ::1
+ remote-ip 127.0.0.1
+ remote-ip ::1
+ role sg
+ sctp-role server
+ as as-m3ua-loadshare-2 m3ua
+ routing-key 1002 25
+ asp asp-m3ua-loadshare-2-0
+ asp asp-m3ua-loadshare-2-1
+ !
+ ! IPA AS as(p)-ipa-loadshare-0:
+ ! Hardcoded forward towards as-m3ua-loadshare-0 (PC=23)
+ !
+ asp asp-ipa-loadshare-0-0 8800 5000 ipa
+ local-ip 127.0.0.1
+ remote-ip 127.0.0.1
+ role sg
+ transport-role server
+ asp asp-ipa-loadshare-0-1 8801 5000 ipa
+ local-ip 127.0.0.1
+ remote-ip 127.0.0.1
+ role sg
+ transport-role server
+ as as-ipa-loadshare-0 ipa
+ routing-key 0 5
+ point-code override dpc 23
+ asp asp-ipa-loadshare-0-0
+ asp asp-ipa-loadshare-0-1
+ !
+ ! IPA AS as(p)-ipa-loadshare-1:
+ ! Hardcoded forward towards as-ipa-loadshare-2 (PC=7)
+ !
+ asp asp-ipa-loadshare-1-0 8810 5000 ipa
+ local-ip 127.0.0.1
+ remote-ip 127.0.0.1
+ role sg
+ transport-role server
+ asp asp-ipa-loadshare-1-1 8811 5000 ipa
+ local-ip 127.0.0.1
+ remote-ip 127.0.0.1
+ role sg
+ transport-role server
+ as as-ipa-loadshare-1 ipa
+ routing-key 0 6
+ point-code override dpc 7
+ asp asp-ipa-loadshare-1-0
+ asp asp-ipa-loadshare-1-1
+ !
+ ! IPA AS as(p)-ipa-loadshare-2:
+ ! Hardcoded forward towards as-ipa-loadshare-1 (PC=6)
+ !
+ asp asp-ipa-loadshare-2-0 8820 5000 ipa
+ local-ip 127.0.0.1
+ remote-ip 127.0.0.1
+ role sg
+ transport-role server
+ asp asp-ipa-loadshare-2-1 8821 5000 ipa
+ local-ip 127.0.0.1
+ remote-ip 127.0.0.1
+ role sg
+ transport-role server
+ as as-ipa-loadshare-2 ipa
+ routing-key 0 7
+ point-code override dpc 6
+ asp asp-ipa-loadshare-2-0
+ asp asp-ipa-loadshare-2-1
+ !
+ ! ROUTING TABLE:
+ !
+ route-table system
+ update route 23 16777215 linkset as-m3ua-loadshare-0
+ update route 24 16777215 linkset as-m3ua-loadshare-1
+ update route 25 16777215 linkset as-m3ua-loadshare-2
+ update route 5 16777215 linkset as-ipa-loadshare-0
+ update route 6 16777215 linkset as-ipa-loadshare-1
+ update route 7 16777215 linkset as-ipa-loadshare-2
+ !
+ !SERVERS:
+ !
+ listen m3ua 2905
+ local-ip 127.0.0.1
+ local-ip ::1
+ accept-asp-connections pre-configured
+ listen ipa 5000
+ accept-asp-connections pre-configured
diff --git a/stp/regen_makefile.sh b/stp/regen_makefile.sh
index 0d7fa48..2dab963 100755
--- a/stp/regen_makefile.sh
+++ b/stp/regen_makefile.sh
@@ -3,6 +3,7 @@
NAME=STP_Tests
FILES="
+ *.asn
*.ttcn
*.ttcnpp
SCCP_EncDec.cc
@@ -16,11 +17,13 @@
Native_FunctionDefs.cc
TCCEncoding.cc
M3UA_CodecPort_CtrlFunctDef.cc
+ TCAP_EncDec.cc
"
CPPFLAGS_TTCN3="
-DIPA_EMULATION_CTRL
-DIPA_EMULATION_SCCP
+ -DIPA_EMULATION_TCAP_ROUTING
-DUSE_MTP3_DISTRIBUTOR
"
diff --git a/stp/testenv_tcap.cfg b/stp/testenv_tcap.cfg
new file mode 100644
index 0000000..d9816e2
--- /dev/null
+++ b/stp/testenv_tcap.cfg
@@ -0,0 +1,12 @@
+[testsuite]
+titan_min=11.1.0
+program=STP_Tests
+config=STP_Tests_TCAP.cfg
+
+[stp]
+prepare=osmo-config-merge osmo-stp.cfg osmo-stp-tcap.confmerge > osmo-stp-tcap.cfg
+program=osmo-stp -c osmo-stp-tcap.cfg
+make=libosmo-sigtran
+package=osmo-stp libosmocore-utils
+copy=osmo-stp.cfg osmo-stp-tcap.confmerge
+vty_port=4239
To view, visit change 41136. To unsubscribe, or for help writing mail filters, visit settings.