summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-05-13 02:27:10 +0200
committerneels <nhofmeyr@sysmocom.de>2020-06-14 11:01:34 +0000
commitf246a925e8a8a27963d10756cc2c398324429fca (patch)
tree829fe5b17c8ffb6b01e13a10acd3c71a08cb3526
parent7985aebeb333614ab761bafda884dc826591711a (diff)
bsc: allow multiple MSCs
Similar to the MSC tests, have several g_bssap and mp_bssap_cfg. Prepare for MSC pool tests. Replace g_bssap with a g_bssap[NUM_MSC] array. Replace mp_bssap_cfg with an mp_bssap_cfg[NUM_MSC] array. Requires patch I1986e4ef43beee161c82193694421b56136c1afe in docker-playground to match the new required BSC_Tests.cfg format. Related: OS#3682 Change-Id: Ibb36695b7c31f7b04eec6c5d59522fc0779b3c2f
-rw-r--r--bsc/BSC_Tests.ttcn176
-rw-r--r--bsc/BSC_Tests_LCLS.ttcn6
-rw-r--r--bsc/MSC_ConnectionHandler.ttcn12
3 files changed, 119 insertions, 75 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 48766f1..364254c 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -59,6 +59,7 @@ import from BSSMAP_Templates all;
import from SCCPasp_Types all;
const integer NUM_BTS := 3;
+const integer NUM_MSC := 3;
const float T3101_MAX := 12.0;
/* make sure to sync this with the osmo-bts.cfg you're using */
@@ -87,7 +88,7 @@ type component test_CT extends CTRL_Adapter_CT {
var MGCP_Emulation_CT vc_MGCP;
port TELNETasp_PT BSCVTY;
- var RAN_Adapter g_bssap;
+ var RAN_Adapter g_bssap[NUM_MSC];
/* for old legacy-tests only */
port BSSAP_CODEC_PT BSSAP;
@@ -119,16 +120,40 @@ modulepar {
/* IP address at which the test binds */
charstring mp_test_ip := "127.0.0.1";
- RAN_Configuration mp_bssap_cfg := {
- transport := BSSAP_TRANSPORT_AoIP,
- sccp_service_type := "mtp3_itu",
- sctp_addr := { 23905, "127.0.0.1", 2905, "127.0.0.1" },
- own_pc := 185,
- own_ssn := 254,
- peer_pc := 187,
- peer_ssn := 254,
- sio := '83'O,
- rctx := 0
+ RAN_Configurations mp_bssap_cfg := {
+ {
+ transport := BSSAP_TRANSPORT_AoIP,
+ sccp_service_type := "mtp3_itu",
+ sctp_addr := { 23905, "127.0.0.1", 2905, "127.0.0.1" },
+ own_pc := 185, /* 0.23.1 first MSC emulation */
+ own_ssn := 254,
+ peer_pc := 187, /* 0.23.3 osmo-bsc */
+ peer_ssn := 254,
+ sio := '83'O,
+ rctx := 0
+ },
+ {
+ transport := BSSAP_TRANSPORT_AoIP,
+ sccp_service_type := "mtp3_itu",
+ sctp_addr := { 23906, "127.0.0.1", 2905, "127.0.0.1" },
+ own_pc := 2, /* 0.0.2 second MSC emulation */
+ own_ssn := 254,
+ peer_pc := 187, /* 0.23.3 osmo-bsc */
+ peer_ssn := 254,
+ sio := '83'O,
+ rctx := 2
+ },
+ {
+ transport := BSSAP_TRANSPORT_AoIP,
+ sccp_service_type := "mtp3_itu",
+ sctp_addr := { 23907, "127.0.0.1", 2905, "127.0.0.1" },
+ own_pc := 3, /* 0.0.3 third MSC emulation */
+ own_ssn := 254,
+ peer_pc := 187, /* 0.23.3 osmo-bsc */
+ peer_ssn := 254,
+ sio := '83'O,
+ rctx := 3
+ }
};
/* Whether to enable osmux tests. Can be dropped completely and enable
@@ -139,15 +164,16 @@ modulepar {
uint8_t mp_exp_ms_power_level := 7;
}
-private function f_gen_test_hdlr_pars() return TestHdlrParams {
+private function f_gen_test_hdlr_pars(integer bssap_idx := 0) return TestHdlrParams {
var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
- if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) {
+ if (mp_bssap_cfg[bssap_idx].transport == BSSAP_TRANSPORT_AoIP) {
pars.aoip := true;
} else {
pars.aoip := false;
}
pars.exp_ms_power_level := mp_exp_ms_power_level;
+ pars.mscpool.bssap_idx := bssap_idx;
return pars;
}
@@ -158,13 +184,15 @@ private function f_shutdown_helper() runs on test_CT {
mtc.stop;
}
-private function f_legacy_bssap_reset() runs on test_CT {
+private function f_legacy_bssap_reset(integer bssap_idx := 0) runs on test_CT {
var BSSAP_N_UNITDATA_ind ud_ind;
timer T := 5.0;
- BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled)));
+ BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap[bssap_idx].sccp_addr_peer, g_bssap[bssap_idx].sccp_addr_own,
+ ts_BSSMAP_Reset(0, g_osmux_enabled)));
T.start;
alt {
- [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) {
+ [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap[bssap_idx].sccp_addr_own, g_bssap[bssap_idx].sccp_addr_peer,
+ tr_BSSMAP_ResetAck(g_osmux_enabled))) {
log("Received RESET-ACK in response to RESET, we're ready to go!");
}
[] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset(g_osmux_enabled))) -> value ud_ind {
@@ -306,7 +334,7 @@ function f_init_mgcp(charstring id) runs on test_CT {
mgw_udp_port := 2427,
/* Enable it for SCCPlite, since we have 2 MGCP sockets towards MGW (UDP one +
the on with MGCP over IPA forwarded from MSC one) */
- multi_conn_mode := (mp_bssap_cfg.transport == BSSAP_TRANSPORT_SCCPlite_SERVER)
+ multi_conn_mode := (mp_bssap_cfg[0].transport == BSSAP_TRANSPORT_SCCPlite_SERVER)
};
vc_MGCP := MGCP_Emulation_CT.create(id);
@@ -343,8 +371,12 @@ function f_init_vty(charstring id := "foo") runs on test_CT {
/* global initialization function
* \param nr_bts Number of BTSs we should start/bring up
- * \param handler_mode Start an RSL_Emulation_CT component (true) or not (false) */
-function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false, boolean allow_osmux := false) runs on test_CT {
+ * \param handler_mode Start an RSL_Emulation_CT component (true) or not (false).
+ * \param nr_msc Number of virtual MSCs to bring up to connect to osmo-bsc.
+ */
+function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false, boolean allow_osmux := false,
+ integer nr_msc := 1) runs on test_CT {
+ var integer bssap_idx;
var integer i;
if (g_initialized) {
@@ -360,19 +392,21 @@ function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false, boolea
f_vty_allow_osmux(allow_osmux);
}
- /* Call a function of our 'parent component' RAN_Adapter_CT to start the
- * MSC-side BSSAP emulation */
- if (handler_mode) {
- var RanOps ranops := MSC_RanOps;
- ranops.use_osmux := g_osmux_enabled;
- f_ran_adapter_init(g_bssap, mp_bssap_cfg, "VirtMSC", ranops);
- connect(self:SCCPLITE_IPA_CTRL, g_bssap.vc_RAN:CTRL_CLIENT);
- f_ran_adapter_start(g_bssap);
- } else {
- f_ran_adapter_init(g_bssap, mp_bssap_cfg, "VirtMSC", omit);
- connect(self:BSSAP, g_bssap.vc_SCCP:SCCP_SP_PORT);
- f_ran_adapter_start(g_bssap);
- f_legacy_bssap_reset();
+ for (bssap_idx := 0; bssap_idx < nr_msc; bssap_idx := bssap_idx+1) {
+ /* Call a function of our 'parent component' RAN_Adapter_CT to start the
+ * MSC-side BSSAP emulation */
+ if (handler_mode) {
+ var RanOps ranops := MSC_RanOps;
+ ranops.use_osmux := g_osmux_enabled;
+ f_ran_adapter_init(g_bssap[bssap_idx], mp_bssap_cfg[bssap_idx], "VirtMSC", ranops);
+ connect(self:SCCPLITE_IPA_CTRL, g_bssap[bssap_idx].vc_RAN:CTRL_CLIENT);
+ f_ran_adapter_start(g_bssap[bssap_idx]);
+ } else {
+ f_ran_adapter_init(g_bssap[bssap_idx], mp_bssap_cfg[bssap_idx], "VirtMSC", omit);
+ connect(self:BSSAP, g_bssap[bssap_idx].vc_SCCP:SCCP_SP_PORT);
+ f_ran_adapter_start(g_bssap[bssap_idx]);
+ f_legacy_bssap_reset();
+ }
}
f_ipa_ctrl_start(mp_bsc_ip, mp_bsc_ctrl_port);
@@ -612,16 +646,17 @@ testcase TC_chan_deact_silence() runs on test_CT {
/* Verify that the BSC refuses any BSSAP connection from the MSC (They are all BSC->MSC direction,
* except for the inter-BSC handover, MT side) */
-testcase TC_outbound_connect() runs on test_CT {
+testcase TC_outbound_connect(integer bssap_idx := 0) runs on test_CT {
f_init(1);
- BSSAP.send(ts_BSSAP_CONNECT_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, 2342, ts_BSSMAP_AssignmentReq));
+ BSSAP.send(ts_BSSAP_CONNECT_req(g_bssap[bssap_idx].sccp_addr_peer, g_bssap[bssap_idx].sccp_addr_own,
+ 2342, ts_BSSMAP_AssignmentReq));
BSSAP.receive(tr_BSSAP_DISC_ind(2342, ?, ?));
setverdict(pass);
}
/* Test behavior if MSC answers with CREF to CR */
-testcase TC_assignment_cic_only() runs on test_CT {
+testcase TC_assignment_cic_only(integer bssap_idx := 0) runs on test_CT {
var BSSAP_N_CONNECT_ind rx_c_ind;
var RSL_Message rx_rsl;
var DchanTuple dt;
@@ -629,7 +664,7 @@ testcase TC_assignment_cic_only() runs on test_CT {
f_init(1);
dt := f_est_dchan('23'O, 23, '00000000'O);
- if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) {
+ if (mp_bssap_cfg[bssap_idx].transport == BSSAP_TRANSPORT_AoIP) {
/* send assignment without AoIP IEs */
BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_AssignmentReq(ts_BSSMAP_IE_CIC(0, 1))));
} else {
@@ -651,10 +686,10 @@ testcase TC_assignment_cic_only() runs on test_CT {
}
/* generate an assignment request for either AoIP or SCCPlite */
-function f_gen_ass_req(boolean osmux_enabled := false) return PDU_BSSAP {
+function f_gen_ass_req(boolean osmux_enabled := false, integer bssap_idx := 0) return PDU_BSSAP {
var PDU_BSSAP ass_cmd;
var BSSMAP_IE_Osmo_OsmuxCID osmux_cid := valueof(ts_OsmuxCID(0));
- if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) {
+ if (mp_bssap_cfg[bssap_idx].transport == BSSAP_TRANSPORT_AoIP) {
var BSSMAP_IE_AoIP_TransportLayerAddress tla :=
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
if (osmux_enabled) {
@@ -669,9 +704,9 @@ function f_gen_ass_req(boolean osmux_enabled := false) return PDU_BSSAP {
return ass_cmd;
}
-function f_gen_handover_req() return PDU_BSSAP {
+function f_gen_handover_req(integer bssap_idx := 0) return PDU_BSSAP {
var PDU_BSSAP ho_req;
- if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) {
+ if (mp_bssap_cfg[bssap_idx].transport == BSSAP_TRANSPORT_AoIP) {
var BSSMAP_IE_AoIP_TransportLayerAddress tla :=
valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
ho_req := valueof(ts_BSSMAP_HandoverRequest(omit, tla));
@@ -683,10 +718,10 @@ function f_gen_handover_req() return PDU_BSSAP {
}
/* generate an assignment complete template for either AoIP or SCCPlite */
-function f_gen_exp_compl(boolean expect_osmux := false) return template PDU_BSSAP {
+function f_gen_exp_compl(boolean expect_osmux := false, integer bssap_idx := 0) return template PDU_BSSAP {
var template PDU_BSSAP exp_compl;
var BSSMAP_IE_Osmo_OsmuxCID osmux_cid := valueof(ts_OsmuxCID(0));
- if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) {
+ if (mp_bssap_cfg[bssap_idx].transport == BSSAP_TRANSPORT_AoIP) {
if (expect_osmux) {
exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?, osmux_cid);
} else {
@@ -1055,9 +1090,9 @@ testcase TC_chan_rel_a_reset() runs on test_CT {
IPA_RSL[0].clear;
/* perform BSSAP RESET, expect RESET ACK and DISC.ind on connection */
- BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled)));
+ BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap[0].sccp_addr_peer, g_bssap[0].sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled)));
interleave {
- [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) { }
+ [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap[0].sccp_addr_own, g_bssap[0].sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) { }
[] BSSAP.receive(tr_BSSAP_DISC_ind(dt.sccp_conn_id, ?, ?)) { }
}
@@ -1258,10 +1293,6 @@ testcase TC_ctrl_location() runs on test_CT {
setverdict(pass);
}
-function f_bssap_tx_ud(template PDU_BSSAP bssap) runs on test_CT {
- BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, bssap));
-}
-
/***********************************************************************
* Paging Testing
@@ -1314,7 +1345,8 @@ private function f_pageing_helper(hexstring imsi,
bssmap_chneed := omit;
}
- f_bssap_tx_ud(ts_BSSMAP_Paging(imsi, cid_list, tmsi, bssmap_chneed));
+ BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap[0].sccp_addr_peer, g_bssap[0].sccp_addr_own,
+ ts_BSSMAP_Paging(imsi, cid_list, tmsi, bssmap_chneed)));
if (not istemplatekind(tmsi, "omit")) {
mi := t_MI_TMSI(tmsi);
@@ -1583,9 +1615,9 @@ testcase TC_paging_imsi_a_reset() runs on test_CT {
f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all);
/* Perform a BSSMAP Reset and wait for ACK */
- BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled)));
+ BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap[0].sccp_addr_peer, g_bssap[0].sccp_addr_own, ts_BSSMAP_Reset(0, g_osmux_enabled)));
alt {
- [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap.sccp_addr_own, g_bssap.sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) { }
+ [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(g_bssap[0].sccp_addr_own, g_bssap[0].sccp_addr_peer, tr_BSSMAP_ResetAck(g_osmux_enabled))) { }
[] BSSAP.receive { repeat; }
}
@@ -1744,8 +1776,8 @@ import from MSC_ConnectionHandler all;
type function void_fn(charstring id) runs on MSC_ConnHdlr;
/* helper function to create and connect a MSC_ConnHdlr component */
-private function f_connect_handler(inout MSC_ConnHdlr vc_conn) runs on test_CT {
- connect(vc_conn:RAN, g_bssap.vc_RAN:PROC);
+private function f_connect_handler(inout MSC_ConnHdlr vc_conn, integer bssap_idx := 0) runs on test_CT {
+ connect(vc_conn:RAN, g_bssap[bssap_idx].vc_RAN:PROC);
connect(vc_conn:MGCP_PROC, vc_MGCP:MGCP_PROC);
connect(vc_conn:RSL, bts[0].rsl.vc_RSL:CLIENT_PT);
connect(vc_conn:RSL_PROC, bts[0].rsl.vc_RSL:RSL_PROC);
@@ -1757,7 +1789,7 @@ private function f_connect_handler(inout MSC_ConnHdlr vc_conn) runs on test_CT {
connect(vc_conn:RSL2, bts[2].rsl.vc_RSL:CLIENT_PT);
connect(vc_conn:RSL2_PROC, bts[2].rsl.vc_RSL:RSL_PROC);
}
- connect(vc_conn:BSSAP, g_bssap.vc_RAN:CLIENT);
+ connect(vc_conn:BSSAP, g_bssap[bssap_idx].vc_RAN:CLIENT);
connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT);
connect(vc_conn:MGCP_MULTI, vc_MGCP:MGCP_CLIENT_MULTI);
}
@@ -1766,8 +1798,12 @@ function f_start_handler(void_fn fn, template (omit) TestHdlrParams pars := omit
runs on test_CT return MSC_ConnHdlr {
var charstring id := testcasename();
var MSC_ConnHdlr vc_conn;
+ var integer bssap_idx := 0;
+ if (isvalue(pars)) {
+ bssap_idx := valueof(pars).mscpool.bssap_idx;
+ }
vc_conn := MSC_ConnHdlr.create(id);
- f_connect_handler(vc_conn);
+ f_connect_handler(vc_conn, bssap_idx);
vc_conn.start(f_handler_init(fn, id, pars));
return vc_conn;
}
@@ -2063,7 +2099,7 @@ private function f_TC_assignment_codec(charstring id) runs on MSC_ConnHdlr {
var template PDU_BSSAP exp_compl := f_gen_exp_compl(g_pars.use_osmux);
/* puzzle together the ASSIGNMENT REQ for given codec[s] */
- if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) {
+ if (mp_bssap_cfg[0].transport == BSSAP_TRANSPORT_AoIP) {
ass_cmd.pdu.bssmap.assignmentRequest.codecList := g_pars.ass_codec_list;
exp_compl.pdu.bssmap.assignmentComplete.speechCodec.codecElements[0] :=
g_pars.ass_codec_list.codecElements[0];
@@ -2118,7 +2154,7 @@ private function f_TC_assignment_codec_fail(charstring id) runs on MSC_ConnHdlr
var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail;
/* puzzle together the ASSIGNMENT REQ for given codec[s] */
- if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) {
+ if (mp_bssap_cfg[0].transport == BSSAP_TRANSPORT_AoIP) {
ass_cmd.pdu.bssmap.assignmentRequest.codecList := g_pars.ass_codec_list;
}
ass_cmd.pdu.bssmap.assignmentRequest.channelType :=
@@ -3323,8 +3359,8 @@ testcase TC_ho_into_this_bsc() runs on test_CT {
f_init(1, true);
f_sleep(1.0);
- pars.handover.sccp_addr_msc := g_bssap.sccp_addr_own;
- pars.handover.sccp_addr_bsc := g_bssap.sccp_addr_peer;
+ pars.handover.sccp_addr_msc := g_bssap[0].sccp_addr_own;
+ pars.handover.sccp_addr_bsc := g_bssap[0].sccp_addr_peer;
vc_conn := f_start_handler(refers(f_tc_ho_into_this_bsc), pars);
vc_conn.done;
@@ -3396,8 +3432,8 @@ testcase TC_ho_in_fail_msc_clears() runs on test_CT {
f_init(1, true);
f_sleep(1.0);
- pars.handover.sccp_addr_msc := g_bssap.sccp_addr_own;
- pars.handover.sccp_addr_bsc := g_bssap.sccp_addr_peer;
+ pars.handover.sccp_addr_msc := g_bssap[0].sccp_addr_own;
+ pars.handover.sccp_addr_bsc := g_bssap[0].sccp_addr_peer;
vc_conn := f_start_handler(refers(f_tc_ho_in_fail_msc_clears), pars);
vc_conn.done;
@@ -3476,8 +3512,8 @@ testcase TC_ho_in_fail_msc_clears_after_ho_detect() runs on test_CT {
f_init(1, true);
f_sleep(1.0);
- pars.handover.sccp_addr_msc := g_bssap.sccp_addr_own;
- pars.handover.sccp_addr_bsc := g_bssap.sccp_addr_peer;
+ pars.handover.sccp_addr_msc := g_bssap[0].sccp_addr_own;
+ pars.handover.sccp_addr_bsc := g_bssap[0].sccp_addr_peer;
vc_conn := f_start_handler(refers(f_tc_ho_in_fail_msc_clears_after_ho_detect), pars);
vc_conn.done;
@@ -3557,8 +3593,8 @@ testcase TC_ho_in_fail_no_detect() runs on test_CT {
f_init(1, true);
f_sleep(1.0);
- pars.handover.sccp_addr_msc := g_bssap.sccp_addr_own;
- pars.handover.sccp_addr_bsc := g_bssap.sccp_addr_peer;
+ pars.handover.sccp_addr_msc := g_bssap[0].sccp_addr_own;
+ pars.handover.sccp_addr_bsc := g_bssap[0].sccp_addr_peer;
vc_conn := f_start_handler(refers(f_tc_ho_in_fail_no_detect), pars);
vc_conn.done;
@@ -3628,8 +3664,8 @@ testcase TC_ho_in_fail_no_detect2() runs on test_CT {
f_init(1, true);
f_sleep(1.0);
- pars.handover.sccp_addr_msc := g_bssap.sccp_addr_own;
- pars.handover.sccp_addr_bsc := g_bssap.sccp_addr_peer;
+ pars.handover.sccp_addr_msc := g_bssap[0].sccp_addr_own;
+ pars.handover.sccp_addr_bsc := g_bssap[0].sccp_addr_peer;
vc_conn := f_start_handler(refers(f_tc_ho_in_fail_no_detect2), pars);
vc_conn.done;
@@ -4422,7 +4458,7 @@ control {
execute( TC_ctrl_msc_connection_status() );
execute( TC_ctrl_msc0_connection_status() );
execute( TC_ctrl() );
- if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_SCCPlite_SERVER) {
+ if (mp_bssap_cfg[0].transport == BSSAP_TRANSPORT_SCCPlite_SERVER) {
execute( TC_ctrl_location() );
}
@@ -4453,7 +4489,7 @@ control {
execute( TC_assignment_sign() );
execute( TC_assignment_fr_a5_0() );
execute( TC_assignment_fr_a5_1() );
- if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) {
+ if (mp_bssap_cfg[0].transport == BSSAP_TRANSPORT_AoIP) {
execute( TC_assignment_fr_a5_1_codec_missing() );
}
execute( TC_assignment_fr_a5_3() );
@@ -4468,7 +4504,7 @@ control {
execute( TC_assignment_codec_amr_f() );
execute( TC_assignment_codec_amr_h() );
- if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_AoIP) {
+ if (mp_bssap_cfg[0].transport == BSSAP_TRANSPORT_AoIP) {
execute( TC_assignment_codec_amr_f_S1() );
execute( TC_assignment_codec_amr_h_S1() );
execute( TC_assignment_codec_amr_f_S124() );
diff --git a/bsc/BSC_Tests_LCLS.ttcn b/bsc/BSC_Tests_LCLS.ttcn
index 6087133..72fb525 100644
--- a/bsc/BSC_Tests_LCLS.ttcn
+++ b/bsc/BSC_Tests_LCLS.ttcn
@@ -161,8 +161,8 @@ runs on LCLS_MSC_ConnHdlr {
/* helper function to create and connect a MSC_ConnHdlr component */
/* FIXME: Why can't we use BSC_Tests.f_connect_andler() ?!? */
-private function f_connect_handler(inout LCLS_MSC_ConnHdlr vc_conn) runs on lcls_test_CT {
- connect(vc_conn:RAN, g_bssap.vc_RAN:PROC);
+private function f_connect_handler(inout LCLS_MSC_ConnHdlr vc_conn, integer bssap_idx := 0) runs on lcls_test_CT {
+ connect(vc_conn:RAN, g_bssap[bssap_idx].vc_RAN:PROC);
connect(vc_conn:MGCP_PROC, vc_MGCP:MGCP_PROC);
connect(vc_conn:RSL, bts[0].rsl.vc_RSL:CLIENT_PT);
connect(vc_conn:RSL_PROC, bts[0].rsl.vc_RSL:RSL_PROC);
@@ -170,7 +170,7 @@ private function f_connect_handler(inout LCLS_MSC_ConnHdlr vc_conn) runs on lcls
connect(vc_conn:RSL1, bts[1].rsl.vc_RSL:CLIENT_PT);
connect(vc_conn:RSL1_PROC, bts[1].rsl.vc_RSL:RSL_PROC);
}
- connect(vc_conn:BSSAP, g_bssap.vc_RAN:CLIENT);
+ connect(vc_conn:BSSAP, g_bssap[bssap_idx].vc_RAN:CLIENT);
connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT);
}
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index f1d2e63..feedc6f 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -514,6 +514,10 @@ type record TestHdlrParamsHandover {
SCCP_PAR_Address sccp_addr_bsc
}
+type record TestHdlrParamsMSCPool {
+ integer bssap_idx
+}
+
type record TestHdlrParams {
OCT1 ra,
GsmFrameNumber fn,
@@ -529,7 +533,8 @@ type record TestHdlrParams {
uint5_t exp_ms_power_level,
boolean exp_ms_power_params,
boolean aoip,
- boolean use_osmux
+ boolean use_osmux,
+ TestHdlrParamsMSCPool mscpool
};
/* Note: Do not use valueof() to get a value of this template, use
@@ -556,7 +561,10 @@ template (value) TestHdlrParams t_def_TestHdlrPars := {
exp_ms_power_level := 7, /* calculated from osmo-bsc.cfg "ms max power" */
exp_ms_power_params := false,
aoip := true,
- use_osmux := false
+ use_osmux := false,
+ mscpool := {
+ bssap_idx := 0
+ }
}
function f_create_chan_and_exp() runs on MSC_ConnHdlr {