summaryrefslogtreecommitdiffstats
path: root/msc/MSC_Tests.ttcn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-04-21 13:07:17 +0200
committerHarald Welte <laforge@gnumonks.org>2019-04-21 17:44:59 +0200
commitf9abf8d26c530085cb95f9f9ec1ed5c8744fe1bd (patch)
treed4768d8bdf162c09b93735d239c72983adb84bfb /msc/MSC_Tests.ttcn
parenta89fecf08c20dfd1b8d5e3514a55e0f4a793eb57 (diff)
MSC_Tests: Allow test cases to specify RAN index
This allows to start ConnHdlr on specific RAN connections, i.e. on different emulated BSCs (and soon RNCs). Change-Id: I3d7ec567a7b69d8c6f79d26971bf1c94e077d5f5
Diffstat (limited to 'msc/MSC_Tests.ttcn')
-rw-r--r--msc/MSC_Tests.ttcn18
1 files changed, 10 insertions, 8 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 6ad8860..8c221dc 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -485,7 +485,8 @@ modifies ts_BSSAP_BSSMAP := {
type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr;
/* FIXME: move into BSC_ConnectionHandler? */
-function f_init_pars(integer imsi_suffix, boolean sgsap := false, boolean gsup := true) runs on MTC_CT return BSC_ConnHdlrPars {
+function f_init_pars(integer imsi_suffix, boolean sgsap := false, boolean gsup := true, integer ran_idx := 0)
+runs on MTC_CT return BSC_ConnHdlrPars {
var BSC_ConnHdlrNetworkPars net_pars := {
kc_support := '0A'O, /* A5/1 and A5/3 enabled */
expect_tmsi := true,
@@ -493,8 +494,8 @@ function f_init_pars(integer imsi_suffix, boolean sgsap := false, boolean gsup :
expect_ciph := false
};
var BSC_ConnHdlrPars pars := {
- sccp_addr_own := g_bssap[0].sccp_addr_own,
- sccp_addr_peer := g_bssap[0].sccp_addr_peer,
+ sccp_addr_own := g_bssap[ran_idx].sccp_addr_own,
+ sccp_addr_peer := g_bssap[ran_idx].sccp_addr_peer,
cell_id := valueof(ts_CellId_CGI('262'H, '42'H, 23, 42)),
imei := f_gen_imei(imsi_suffix),
imsi := f_gen_imsi(imsi_suffix),
@@ -511,7 +512,8 @@ function f_init_pars(integer imsi_suffix, boolean sgsap := false, boolean gsup :
ipa_ctrl_enable := true,
mm_info := mp_mm_info,
sgsap_enable := sgsap,
- gsup_enable := gsup
+ gsup_enable := gsup,
+ ran_idx := ran_idx
};
return pars;
}
@@ -522,8 +524,8 @@ function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars) runs on MT
vc_conn := BSC_ConnHdlr.create(id);
/* BSSMAP part / A interface */
- connect(vc_conn:BSSAP, g_bssap[0].vc_RAN:CLIENT);
- connect(vc_conn:BSSAP_PROC, g_bssap[0].vc_RAN:PROC);
+ connect(vc_conn:BSSAP, g_bssap[pars.ran_idx].vc_RAN:CLIENT);
+ connect(vc_conn:BSSAP_PROC, g_bssap[pars.ran_idx].vc_RAN:PROC);
/* MNCC part */
connect(vc_conn:MNCC, vc_MNCC:MNCC_CLIENT);
connect(vc_conn:MNCC_PROC, vc_MNCC:MNCC_PROC);
@@ -550,8 +552,8 @@ function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars) runs on MT
return vc_conn;
}
-function f_start_handler(void_fn fn, integer imsi_suffix) runs on MTC_CT return BSC_ConnHdlr {
- return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix));
+function f_start_handler(void_fn fn, integer imsi_suffix, integer ran_idx := 0) runs on MTC_CT return BSC_ConnHdlr {
+ return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix, ran_idx := ran_idx));
}
private function f_tc_lu_imsi_noauth_tmsi(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {