summaryrefslogtreecommitdiffstats
path: root/bsc-nat
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 /bsc-nat
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 'bsc-nat')
-rw-r--r--bsc-nat/BSC_MS_ConnectionHandler.ttcn24
-rw-r--r--bsc-nat/BSC_MS_Simulation.ttcn8
-rw-r--r--bsc-nat/MSC_ConnectionHandler.ttcn24
-rwxr-xr-xbsc-nat/MSC_Simulation.ttcn8
-rwxr-xr-xbsc-nat/gen_links.sh2
5 files changed, 33 insertions, 33 deletions
diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
index 27e1b581..63d0451c 100644
--- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn
+++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
@@ -5,7 +5,7 @@ import from Osmocom_Types all;
import from SCCPasp_Types all;
import from BSSAP_Types all;
import from BSSAP_CodecPort all;
-import from BSSMAP_Emulation all;
+import from RAN_Emulation all;
import from BSSMAP_Templates all;
import from MobileL3_Types all;
@@ -17,9 +17,9 @@ import from MGCP_Templates all;
import from SDP_Types all;
/* this component represents a single subscriber connection at the MSC.
- * There is a 1:1 mapping between SCCP connections and BSSAP_ConnHdlr components.
- * We inherit all component variables, ports, functions, ... from BSSAP_ConnHdlr */
-type component BSC_MS_ConnHdlr extends BSSAP_ConnHdlr {
+ * There is a 1:1 mapping between SCCP connections and RAN_ConnHdlr components.
+ * We inherit all component variables, ports, functions, ... from RAN_ConnHdlr */
+type component BSC_MS_ConnHdlr extends RAN_ConnHdlr {
/* SCCP Connecction Identifier for the underlying SCCP connection */
var integer g_sccp_conn_id;
var MgcpConnectionId g_mgcp_conn_id;
@@ -27,18 +27,18 @@ type component BSC_MS_ConnHdlr extends BSSAP_ConnHdlr {
var BSC_State g_state;
}
-/* Callback function from general BSSMAP_Emulation whenever a new incoming
+/* Callback function from general RAN_Emulation whenever a new incoming
* SCCP connection arrivces. Must create + start a new component */
private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id)
-runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr {
+runs on RAN_Emulation_CT return RAN_ConnHdlr {
log("Incoming SCCP Connection on BSC ?!?");
self.stop;
}
-/* Callback function from general BSSMAP_Emulation whenever a connectionless
+/* Callback function from general RAN_Emulation whenever a connectionless
* BSSMAP message arrives. Can retunr a PDU_BSSAP that should be sent in return */
private function UnitdataCallback(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;
if (match(bssap, tr_BSSMAP_Reset)) {
@@ -48,7 +48,7 @@ runs on BSSMAP_Emulation_CT return template PDU_BSSAP {
return resp;
}
-const BssmapOps BSC_MS_BssmapOps := {
+const RanOps BSC_MS_RanOps := {
create_cb := refers(CreateCallback),
unitdata_cb := refers(UnitdataCallback),
decode_dtap := false,
@@ -154,16 +154,16 @@ runs on BSC_MS_ConnHdlr {
log("Unhandled DTAP ", l3);
}
- [g_state == BSC_STATE_WAIT_DISC_IND] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
+ [g_state == BSC_STATE_WAIT_DISC_IND] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
setverdict(pass);
self.stop;
}
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) {
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_CONF_IND) {
}
/* disconnect in invalid state */
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
setverdict(fail);
self.stop;
}
diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn
index 2f1961bf..c45b5aca 100644
--- a/bsc-nat/BSC_MS_Simulation.ttcn
+++ b/bsc-nat/BSC_MS_Simulation.ttcn
@@ -9,7 +9,7 @@ import from SCCPasp_Types all;
import from SCCP_Emulation all;
import from BSSAP_CodecPort all;
-import from BSSMAP_Emulation all;
+import from RAN_Emulation all;
import from BSC_MS_ConnectionHandler all;
@@ -17,7 +17,7 @@ type component BSC_CT {
/* component references */
var IPA_Emulation_CT vc_IPA;
var SCCP_CT vc_SCCP;
- var BSSMAP_Emulation_CT vc_BSSMAP;
+ var RAN_Emulation_CT vc_BSSMAP;
/* test port to SCCP emulation */
port SCCPasp_PT SCCP;
@@ -48,7 +48,7 @@ function main(charstring remote_ip, PortNumber remote_port,
/* create components for IPA/SCCP/BSS[M]AP stack */
vc_IPA := IPA_Emulation_CT.create(id & "-IPA");
vc_SCCP := SCCP_CT.create(id & "-SCCP");
- vc_BSSMAP := BSSMAP_Emulation_CT.create(id & "-BSSMAP");
+ vc_BSSMAP := RAN_Emulation_CT.create(id & "-BSSMAP");
map(vc_IPA:IPA_PORT, system:IPA_CODEC_PT);
@@ -64,7 +64,7 @@ function main(charstring remote_ip, PortNumber remote_port,
/* start components */
vc_IPA.start(IPA_Emulation.main_client(remote_ip, remote_port, local_ip, local_port, ccm_pars));
vc_SCCP.start(SCCPStart(sccp_pars));
- vc_BSSMAP.start(BSSMAP_Emulation.main(BSC_MS_ConnectionHandler.BSC_MS_BssmapOps, id));
+ vc_BSSMAP.start(RAN_Emulation.main(BSC_MS_ConnectionHandler.BSC_MS_RanOps, id));
/* Initial delay to wait for IPA connection establishment */
T.start(2.0);
diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn
index 27fbba73..383b67b1 100644
--- a/bsc-nat/MSC_ConnectionHandler.ttcn
+++ b/bsc-nat/MSC_ConnectionHandler.ttcn
@@ -5,7 +5,7 @@ import from Osmocom_Types all;
import from SCCPasp_Types all;
import from BSSAP_Types all;
import from BSSAP_CodecPort all;
-import from BSSMAP_Emulation all;
+import from RAN_Emulation all;
import from BSSMAP_Templates all;
import from MGCP_Types all;
@@ -13,9 +13,9 @@ import from MGCP_Templates all;
import from SDP_Types all;
/* this component represents a single subscriber connection at the MSC.
- * There is a 1:1 mapping between SCCP connections and BSSAP_ConnHdlr components.
- * We inherit all component variables, ports, functions, ... from BSSAP_ConnHdlr */
-type component MSC_ConnHdlr extends BSSAP_ConnHdlr {
+ * There is a 1:1 mapping between SCCP connections and RAN_ConnHdlr components.
+ * We inherit all component variables, ports, functions, ... from RAN_ConnHdlr */
+type component MSC_ConnHdlr extends RAN_ConnHdlr {
/* SCCP Connecction Identifier for the underlying SCCP connection */
var integer g_sccp_conn_id;
@@ -28,10 +28,10 @@ type component MSC_ConnHdlr extends BSSAP_ConnHdlr {
/* Callback function from general BSSMAP_Emulation whenever a new incoming
* SCCP connection arrivces. Must create + start a new component */
private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id)
-runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr {
+runs on RAN_Emulation_CT return RAN_ConnHdlr {
var MSC_ConnHdlr vc_conn;
- /* Create a new BSSAP_ConnHdlr component */
- vc_conn := MSC_ConnHdlr.create(g_bssmap_id & "-Conn-" & int2str(conn_ind.connectionId));
+ /* Create a new RAN_ConnHdlr component */
+ vc_conn := MSC_ConnHdlr.create(g_ran_id & "-Conn-" & int2str(conn_ind.connectionId));
/* connect it to the port */
connect(vc_conn:BSSAP, self:CLIENT);
/* start it */
@@ -44,7 +44,7 @@ runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr {
/* Callback function from general BSSMAP_Emulation whenever a connectionless
* BSSMAP message arrives. Can retunr a PDU_BSSAP that should be sent in return */
private function UnitdataCallback(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;
if (match(bssap, tr_BSSMAP_Reset)) {
@@ -54,7 +54,7 @@ runs on BSSMAP_Emulation_CT return template PDU_BSSAP {
return resp;
}
-const BssmapOps MSC_BssmapOps := {
+const RanOps MSC_RanOps := {
create_cb := refers(CreateCallback),
unitdata_cb := refers(UnitdataCallback),
decode_dtap := false,
@@ -129,14 +129,14 @@ function main(integer connection_id, integer e1_timeslot) runs on MSC_ConnHdlr {
}
[g_state == MSC_STATE_WAIT_DLCX_ACK] BSSAP.receive(tr_DLCX_ACK) {
- BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
+ BSSAP.send(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
setverdict(pass);
self.stop;
}
/* TODO: CLEAR REQUEST from BSS */
- [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
setverdict(fail);
self.stop;
}
@@ -147,7 +147,7 @@ function main(integer connection_id, integer e1_timeslot) runs on MSC_ConnHdlr {
/* Guard timer has expired, close connection */
[] T.timeout {
- BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
+ BSSAP.send(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
setverdict(fail, "Timeout of guard timer");
self.stop;
}
diff --git a/bsc-nat/MSC_Simulation.ttcn b/bsc-nat/MSC_Simulation.ttcn
index 0a135091..bc47f89f 100755
--- a/bsc-nat/MSC_Simulation.ttcn
+++ b/bsc-nat/MSC_Simulation.ttcn
@@ -16,7 +16,7 @@ import from L3_Templates all;
import from BSSAP_Types all;
import from BSSMAP_Templates all;
*/
-import from BSSMAP_Emulation all;
+import from RAN_Emulation all;
import from MGCP_Adapter all;
@@ -26,7 +26,7 @@ type component MSC_CT {
/* component references */
var IPA_Emulation_CT vc_IPA;
var SCCP_CT vc_SCCP;
- var BSSMAP_Emulation_CT vc_BSSMAP;
+ var RAN_Emulation_CT vc_BSSMAP;
var MGCP_Adapter_CT vc_MGCP_UDP;
/* test port to SCCP emulation */
port SCCPasp_PT SCCP;
@@ -43,7 +43,7 @@ function main(charstring local_ip, PortNumber local_port,
/* create components */
vc_IPA := IPA_Emulation_CT.create(id & "-IPA");
vc_SCCP := SCCP_CT.create(id & "-SCCP");
- vc_BSSMAP := BSSMAP_Emulation_CT.create(id & "-BSSMAP");
+ vc_BSSMAP := RAN_Emulation_CT.create(id & "-BSSMAP");
map(vc_IPA:IPA_PORT, system:IPA_CODEC_PT);
@@ -64,7 +64,7 @@ function main(charstring local_ip, PortNumber local_port,
vc_IPA.start(IPA_Emulation.main_server(local_ip, local_port));
vc_SCCP.start(SCCPStart(sccp_pars));
- vc_BSSMAP.start(BSSMAP_Emulation.main(MSC_ConnectionHandler.MSC_BssmapOps, id & "-BSSMAP"));
+ vc_BSSMAP.start(RAN_Emulation.main(MSC_ConnectionHandler.MSC_RanOps, id & "-BSSMAP"));
/* wait until termination of respective components */
vc_IPA.done;
diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh
index 1ab54f15..e54eec48 100755
--- a/bsc-nat/gen_links.sh
+++ b/bsc-nat/gen_links.sh
@@ -47,7 +47,7 @@ FILES="RTP_EncDec.cc RTP_Types.ttcn"
gen_links $DIR $FILES
DIR=../library
-FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn"
+FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RAN_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn"
gen_links $DIR $FILES
ignore_pp_results