summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-11-24 02:50:29 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-12-03 03:19:08 +0700
commit2159acbc769640b044bee230f7d235a6a9c446e0 (patch)
tree447efe89ddbbdd89dc803ebc553a68b32f00d2b4
parentd4cc1508dd6fc2ce2ef701c87bc77740d1af0b69 (diff)
BSC_ConnectionHandler.ttcn: split up f_mt_sms() into two functions
This would allow to expect a MT SMS message using f_mt_sms_expect() and send an RP-ACK using f_mt_sms_send_rp_ack() separately in the follow-up changes for SMS over GSUP. Change-Id: I4730634a9f3352b6f8553ee2fd1d43044f41241e
-rw-r--r--msc/BSC_ConnectionHandler.ttcn29
1 files changed, 23 insertions, 6 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 17d9591..e66a3e6 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -874,17 +874,13 @@ runs on BSC_ConnHdlr {
f_mo_sms_wait_rp_ack(spars);
}
-/* receive MT-SMS delivered from the MSC/SMSC over an already existing DTAP connection */
-function f_mt_sms(inout SmsParameters spars)
+/* Wait for MT SMS on an already existing DTAP connection */
+function f_mt_sms_expect(inout SmsParameters spars)
runs on BSC_ConnHdlr {
- var template (value) TPDU_RP_DATA_MS_SGSN tp_mo;
- var template (value) RPDU_MS_SGSN rp_mo;
var template (value) PDU_ML3_MS_NW l3_mo;
-
var template TPDU_RP_DATA_SGSN_MS tp_mt;
var template RPDU_SGSN_MS rp_mt;
var template PDU_ML3_NW_MS l3_mt;
-
var PDU_DTAP_MT dtap_mt;
var default d := activate(as_other_sms());
@@ -894,6 +890,7 @@ runs on BSC_ConnHdlr {
rp_mt := tr_RP_DATA_MT(?, ?, omit, tp_mt);
l3_mt := tr_ML3_MT_SMS(?, c_TIF_ORIG, tr_CP_DATA_MT(rp_mt));
BSSAP.receive(tr_PDU_DTAP_MT(l3_mt, spars.dlci)) -> value dtap_mt;
+
/* Extract relevant identifiers */
spars.tid := bit2int(dtap_mt.dtap.tiOrSkip.transactionId.tio);
spars.rp.msg_ref := dtap_mt.dtap.msgs.sms.cP_DATA.cP_User_Data.cP_RPDU.rP_DATA_SGSN_MS.rP_MessageReference;
@@ -902,6 +899,19 @@ runs on BSC_ConnHdlr {
l3_mo := ts_ML3_MO_SMS(spars.tid, c_TIF_REPL, ts_CP_ACK_MO);
BSSAP.send(ts_PDU_DTAP_MO(l3_mo, spars.dlci, true));
+ deactivate(d);
+ setverdict(pass);
+}
+
+/* Send RP-ACK for MT-SMS over an already existing DTAP connection */
+function f_mt_sms_send_rp_ack(inout SmsParameters spars)
+runs on BSC_ConnHdlr {
+ var template (value) RPDU_MS_SGSN rp_mo;
+ var template (value) PDU_ML3_MS_NW l3_mo;
+ var template PDU_ML3_NW_MS l3_mt;
+
+ var default d := activate(as_other_sms());
+
/* send RP-ACK for RP-DATA */
rp_mo := ts_RP_ACK_MO(spars.rp.msg_ref);
l3_mo := ts_ML3_MO_SMS(spars.tid, c_TIF_REPL, ts_CP_DATA_MO(rp_mo));
@@ -915,6 +925,13 @@ runs on BSC_ConnHdlr {
setverdict(pass);
}
+/* Wait for a MT-SMS and send RP-ACK over an already existing
+ * (and authenticated, ...) DTAP connection */
+function f_mt_sms(inout SmsParameters spars)
+runs on BSC_ConnHdlr {
+ f_mt_sms_expect(spars);
+ f_mt_sms_send_rp_ack(spars);
+}