summaryrefslogtreecommitdiffstats
path: root/msc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-04-14 22:23:14 +0200
committerHarald Welte <laforge@gnumonks.org>2019-04-21 17:44:59 +0200
commit6811d10af7b47f7cca53d9461e4b4d0feea6dfc2 (patch)
tree218765c11ea03bd767e2ec79cb20f51c7891dbe1 /msc
parent408a7ef9fcaec731fd107688ad5657a9a63d53fd (diff)
Rename BSSMAP_Emulation -> RAN_Emulation
So far, BSSMAP_Emulation supported only a transport over BSSMAP. However, we soon intend to merge support for RANAP in order to simulate RANAP/Iu connections as well as BSSMAP. Let's start by renaming some of the existing types/functions/ports/modules without introducing any functional changes just yet. Related: OS#2857, OS#2856 Change-Id: Iecbcb0c6c136baad9460eca40606bb4010d8882d
Diffstat (limited to 'msc')
-rw-r--r--msc/BSC_ConnectionHandler.ttcn30
-rw-r--r--msc/MSC_Tests.ttcn60
-rwxr-xr-xmsc/gen_links.sh2
3 files changed, 46 insertions, 46 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 0b2344f..0eace36 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -7,7 +7,7 @@ import from GSM_Types all;
import from IPL4asp_Types all;
import from SCCPasp_Types all;
import from BSSAP_Types all;
-import from BSSMAP_Emulation all;
+import from RAN_Emulation all;
import from BSSMAP_Templates all;
import from GSUP_Types all;
@@ -42,7 +42,7 @@ import from Osmocom_VTY_Functions all;
import from SGsAP_Emulation all;
/* this component represents a single subscriber connection */
-type component BSC_ConnHdlr extends BSSAP_ConnHdlr, MNCC_ConnHdlr, GSUP_ConnHdlr, MGCP_ConnHdlr, SMPP_ConnHdlr, CTRL_Adapter_CT, SGsAP_ConnHdlr {
+type component BSC_ConnHdlr extends RAN_ConnHdlr, MNCC_ConnHdlr, GSUP_ConnHdlr, MGCP_ConnHdlr, SMPP_ConnHdlr, CTRL_Adapter_CT, SGsAP_ConnHdlr {
var BSC_ConnHdlrPars g_pars;
timer g_Tguard := 60.0;
port TELNETasp_PT MSCVTY;
@@ -155,10 +155,10 @@ function f_init_handler(BSC_ConnHdlrPars pars, float t_guard := 60.0) runs on BS
}
-/* Callback function from general BSSMAP_Emulation whenever a connectionless
+/* Callback function from general RAN_Emulation whenever a connectionless
* BSSMAP message arrives. Canreturn a PDU_BSSAPthat should be sent in return */
private function BscUnitdataCallback(PDU_BSSAP bssap)
-runs on BSSMAP_Emulation_CT return template PDU_BSSAP {
+runs on RAN_Emulation_CT return template PDU_BSSAP {
var template PDU_BSSAP resp := omit;
log("BSSMAP_BscUnitdataCallback");
@@ -172,9 +172,9 @@ runs on BSSMAP_Emulation_CT return template PDU_BSSAP {
return resp;
}
-const BssmapOps BSC_BssmapOps := {
+const RanOps BSC_RanOps := {
/* Create call-back for inbound connections from MSC (hand-over) */
- create_cb := refers(BSSMAP_Emulation.ExpectedCreateCallback),
+ create_cb := refers(RAN_Emulation.ExpectedCreateCallback),
unitdata_cb := refers(BscUnitdataCallback),
decode_dtap := true,
role_ms := true,
@@ -196,7 +196,7 @@ const MnccOps BCC_MnccOps := {
-/* Encode 'l3' and ask BSSMAP_Emulation to create new connection with COMPL L3 INFO */
+/* Encode 'l3' and ask RAN_Emulation to create new connection with COMPL L3 INFO */
function f_bssap_compl_l3(PDU_ML3_MS_NW l3)
runs on BSC_ConnHdlr {
log("Sending COMPL L3: ", l3);
@@ -204,8 +204,8 @@ runs on BSC_ConnHdlr {
BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_peer, g_pars.sccp_addr_own,
valueof(ts_BSSMAP_ComplL3(g_pars.cell_id, l3_enc))));
alt {
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) {}
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_CONF_IND) {}
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
setverdict(fail, "DISC.ind from SCCP");
mtc.stop;
}
@@ -386,12 +386,12 @@ runs on BSC_ConnHdlr {
/* FIXME: there could be pending SMS or other common procedures by the MSC, let's ignore them */
BSSAP.receive(tr_BSSMAP_ClearCommand);
BSSAP.send(ts_BSSMAP_ClearComplete);
- BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
+ BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
setverdict(pass);
}
function f_foo() runs on BSC_ConnHdlr{
- /* SCCP CC handled by BSSMAP_Emulation_CT.main() */
+ /* SCCP CC handled by RAN_Emulation_CT.main() */
/* Expect auth, if enabled */
/* TODO: ISD */
@@ -484,7 +484,7 @@ runs on BSC_ConnHdlr {
var MNCC_PDU mncc;
var MgcpCommand mgcp_cmd;
- f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
f_establish_fully(EST_TYPE_PAG_RESP);
@@ -560,7 +560,7 @@ runs on BSC_ConnHdlr {
f_mt_call_initate(cpars);
/* BSC <- MSC: Expect paging. FIXME: By TMSI or not? */
- f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
/* Complete the call via BSSAP */
@@ -690,7 +690,7 @@ runs on BSC_ConnHdlr {
interleave {
[] BSSAP.receive(t_clear) {
BSSAP.send(ts_BSSMAP_ClearComplete);
- BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
+ BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
}
[] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd {
if (respond_to_dlcx) {
@@ -790,7 +790,7 @@ altstep as_clear_cmd_compl_disc(float t := 5.0) runs on BSC_ConnHdlr {
[] BSSAP.receive(tr_BSSMAP_ClearCommand) {
BSSAP.send(ts_BSSMAP_ClearComplete);
alt {
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
setverdict(pass);
}
[] BSSAP.receive {
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index df088bc..a9eb316 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -36,10 +36,10 @@ import from GSUP_Types all;
import from IPA_Emulation all;
import from BSSAP_Types all;
-import from BSSAP_Adapter all;
+import from RAN_Adapter all;
import from BSSAP_CodecPort all;
import from BSSMAP_Templates all;
-import from BSSMAP_Emulation all;
+import from RAN_Emulation all;
import from BSC_ConnectionHandler all;
import from SGsAP_Templates all;
@@ -66,7 +66,7 @@ import from DNS_Helpers all;
import from TCCConversion_Functions all;
const integer NUM_BSC := 2;
-type record of BSSAP_Configuration BSSAP_Configurations;
+type record of RAN_Configuration RAN_Configurations;
/* Needed for SGsAP SMS */
import from MobileL3_SMS_Types all;
@@ -74,7 +74,7 @@ import from MobileL3_SMS_Types all;
type component MTC_CT extends CTRL_Adapter_CT {
var boolean g_initialized := false;
- var BSSAP_Adapter g_bssap[NUM_BSC];
+ var RAN_Adapter g_bssap[NUM_BSC];
/* no 'adapter_CT' for MNCC or GSUP */
var MNCC_Emulation_CT vc_MNCC;
@@ -121,7 +121,7 @@ modulepar {
charstring mp_mme_name := "mmec01.mmegi0001.mme.epc.mnc070.mcc901.3gppnetwork.org";
charstring mp_vlr_name := "vlr.example.net";
- BSSAP_Configurations mp_bssap_cfg := {
+ RAN_Configurations mp_bssap_cfg := {
{
sccp_service_type := "mtp3_itu",
sctp_addr := { 23905, "127.0.0.1", 2905, "127.0.0.1" },
@@ -277,7 +277,7 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr
for (var integer i := 0; i < num_bsc; i := i + 1) {
if (isbound(mp_bssap_cfg[i])) {
- f_bssap_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), BSC_BssmapOps);
+ f_bssap_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), BSC_RanOps);
f_bssap_start(g_bssap[i]);
} else {
testcase.stop("missing BSSAP configuration");
@@ -522,8 +522,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_BSSMAP:CLIENT);
- connect(vc_conn:BSSAP_PROC, g_bssap[0].vc_BSSMAP:PROC);
+ connect(vc_conn:BSSAP, g_bssap[0].vc_RAN:CLIENT);
+ connect(vc_conn:BSSAP_PROC, g_bssap[0].vc_RAN:PROC);
/* MNCC part */
connect(vc_conn:MNCC, vc_MNCC:MNCC_CLIENT);
connect(vc_conn:MNCC_PROC, vc_MNCC:MNCC_PROC);
@@ -804,7 +804,7 @@ private function f_tc_lu_clear_request(charstring id, BSC_ConnHdlrPars pars) run
mtc.stop;
repeat;
}
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {}
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {}
}
setverdict(pass);
}
@@ -834,7 +834,7 @@ private function f_tc_lu_disconnect(charstring id, BSC_ConnHdlrPars pars) runs o
f_sleep(1.0);
/* send clear request in the middle of the LU */
- BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
+ BSSAP.send(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
setverdict(pass);
f_sleep(1.0);
}
@@ -1197,10 +1197,10 @@ private function f_tc_cl3_no_payload(charstring id, BSC_ConnHdlrPars pars) runs
timer T := 5.0;
T.start;
alt {
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {}
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {}
/* Expect LU REJECT with Cause == Illegal MS */
[] BSSAP.receive(tr_PDU_DTAP_MT(?)) { repeat; }
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) { repeat; }
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_CONF_IND) { repeat; }
[] as_clear_cmd_compl_disc();
[] T.timeout {
setverdict(fail, "Timeout waiting for ClearCommand or SCCP Release");
@@ -1236,9 +1236,9 @@ private function f_tc_cl3_rnd_payload(charstring id, BSC_ConnHdlrPars pars) runs
T.start;
alt {
/* Immediate disconnect */
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {}
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {}
[] BSSAP.receive(tr_PDU_DTAP_MT(?)) { repeat; }
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) { repeat; }
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_CONF_IND) { repeat; }
[] as_clear_cmd_compl_disc();
[] T.timeout {
setverdict(fail, "Timeout waiting for ClearCommand or SCCP Release");
@@ -1435,7 +1435,7 @@ private function f_mt_call_start(inout CallParameters cpars) runs on BSC_ConnHdl
} else {
tmsi := 'FFFFFFFF'O;
}
- f_bssmap_register_imsi(g_pars.imsi, tmsi);
+ f_ran_register_imsi(g_pars.imsi, tmsi);
/* Allocate call reference and send SETUP via MNCC to MSC */
cpars.mncc_callref := f_rnd_int(2147483648);
@@ -2017,7 +2017,7 @@ private function f_tc_lu_and_mt_sms(charstring id, BSC_ConnHdlrPars pars) runs o
} else {
tmsi := 'FFFFFFFF'O;
}
- f_bssmap_register_imsi(g_pars.imsi, tmsi);
+ f_ran_register_imsi(g_pars.imsi, tmsi);
f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
@@ -2055,7 +2055,7 @@ private function f_tc_lu_and_mt_sms_paging_and_nothing(charstring id, BSC_ConnHd
} else {
tmsi := 'FFFFFFFF'O;
}
- f_bssmap_register_imsi(g_pars.imsi, tmsi);
+ f_ran_register_imsi(g_pars.imsi, tmsi);
f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
@@ -2311,9 +2311,9 @@ runs on BSC_ConnHdlr {
/* Register an 'expect' for given IMSI (+TMSI) */
if (isvalue(g_pars.tmsi)) {
- f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
} else {
- f_bssmap_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
+ f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
}
var template GSUP_PDU mt_forwardSM_res := tr_GSUP_MT_FORWARD_SM_RES(
@@ -2375,9 +2375,9 @@ runs on BSC_ConnHdlr {
/* Register an 'expect' for given IMSI (+TMSI) */
if (isvalue(g_pars.tmsi)) {
- f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
} else {
- f_bssmap_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
+ f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
}
var template GSUP_PDU mt_forwardSM_err := tr_GSUP_MT_FORWARD_SM_ERR(
@@ -2441,9 +2441,9 @@ runs on BSC_ConnHdlr {
/* Register an 'expect' for given IMSI (+TMSI) */
if (isvalue(g_pars.tmsi)) {
- f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
} else {
- f_bssmap_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
+ f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
}
/* Submit the 1st MT SMS on GSUP */
@@ -2553,9 +2553,9 @@ runs on BSC_ConnHdlr {
/* Register an 'expect' for given IMSI (+TMSI) */
if (isvalue(g_pars.tmsi)) {
- f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
} else {
- f_bssmap_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
+ f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
}
/* Send CM Service Request for MO SMMA */
@@ -2656,9 +2656,9 @@ runs on BSC_ConnHdlr {
/* Register an 'expect' for given IMSI (+TMSI) */
if (isvalue(g_pars.tmsi)) {
- f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
} else {
- f_bssmap_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
+ f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
}
var template GSUP_PDU mt_forwardSM_res := tr_GSUP_MT_FORWARD_SM_RES(
@@ -2813,7 +2813,7 @@ private function f_tc_smpp_mt_sms(charstring id, BSC_ConnHdlrPars pars) runs on
} else {
tmsi := 'FFFFFFFF'O;
}
- f_bssmap_register_imsi(g_pars.imsi, tmsi);
+ f_ran_register_imsi(g_pars.imsi, tmsi);
var SmsParameters spars := valueof(t_SmsPars);
/* TODO: test with more intelligent user data; test different coding schemes */
@@ -2964,7 +2964,7 @@ runs on BSC_ConnHdlr {
/* Perform location update */
f_perform_lu();
- f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
/* We need to inspect GSUP activity */
f_create_gsup_expect(hex2str(g_pars.imsi));
@@ -3577,7 +3577,7 @@ private function f_sgsap_bssmap_screening() runs on BSC_ConnHdlr {
/* Trigger a paging request and expect the paging on BSSMAP, this is
* to make sure that pagings are sent throught the A-Interface again
* and not throught the SGs interface.*/
- f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
f_vty_transceive(MSCVTY, "subscriber imsi " & hex2str(g_pars.imsi) & " paging");
alt {
diff --git a/msc/gen_links.sh b/msc/gen_links.sh
index 117564e..a29118a 100755
--- a/msc/gen_links.sh
+++ b/msc/gen_links.sh
@@ -89,7 +89,7 @@ DIR=../library
FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn MNCC_Types.ttcn MNCC_EncDec.cc MNCC_CodecPort.ttcn mncc.h MNCC_Emulation.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc "
FILES+="IPA_Types.ttcn IPA_Emulation.ttcnpp IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc GSUP_Types.ttcn GSUP_Emulation.ttcn "
FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn L3_Templates.ttcn L3_Common.ttcn "
-FILES+="BSSMAP_Emulation.ttcn BSSAP_CodecPort.ttcn BSSMAP_Templates.ttcn BSSAP_Adapter.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_Emulation.ttcn "
+FILES+="RAN_Emulation.ttcn BSSAP_CodecPort.ttcn BSSMAP_Templates.ttcn RAN_Adapter.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_Emulation.ttcn "
FILES+="RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunctDef.cc "
FILES+="MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunctDef.cc "
FILES+="SMPP_CodecPort.ttcn SMPP_CodecPort_CtrlFunct.ttcn SMPP_CodecPort_CtrlFunctDef.cc SMPP_Emulation.ttcn SMPP_Templates.ttcn "