summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-11-24 03:40:47 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-12-03 03:21:21 +0700
commit563185253bc05f218fecdaf6e6728d1bb089d486 (patch)
tree8a2f5b16ce5084d126f727ba101ec09a9b3da05c
parent2159acbc769640b044bee230f7d235a6a9c446e0 (diff)
BSC_ConnectionHandler.ttcn: introduce f_mt_sms_send_rp_error()
-rw-r--r--msc/BSC_ConnectionHandler.ttcn22
1 files changed, 22 insertions, 0 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index e66a3e6..f005e02 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -925,6 +925,28 @@ runs on BSC_ConnHdlr {
setverdict(pass);
}
+/* Send RP-ERROR for MT-SMS over an already existing DTAP connection */
+function f_mt_sms_send_rp_error(inout SmsParameters spars, uint7_t cause)
+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_ERROR_MO(spars.rp.msg_ref, cause);
+ l3_mo := ts_ML3_MO_SMS(spars.tid, c_TIF_REPL, ts_CP_DATA_MO(rp_mo));
+ BSSAP.send(ts_PDU_DTAP_MO(l3_mo, spars.dlci, true));
+
+ /* expect CP-ACK for CP-DATA(RP-ERROR) just sent */
+ l3_mt := tr_ML3_MT_SMS(spars.tid, c_TIF_ORIG, tr_CP_ACK_MT);
+ BSSAP.receive(tr_PDU_DTAP_MT(l3_mt, spars.dlci));
+
+ deactivate(d);
+ 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)