BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure
It originally seemed like a great idea to define a custom record
which aggregates the decoded BSSGP, LLC, L3 and/or SNDCP and passes
it to the individual ConnHdlr. However, particularly with testcase
interoperability for IuPS in mind, this seems bogus. Also, we
never really took advantage of this.
Let's now decode as far as we can decode any PDU, and then send the
decoded version of that PDU via the ports between the BSSGP_Emulation
and the ConnHdlr component.
Change-Id: I8c1082880902dd9a04935945f0293895f4d0c53a
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 03c9d05..e349719 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -401,12 +401,12 @@
altstep as_mm_identity(integer gb_idx := 0) runs on BSSGP_ConnHdlr {
var MobileL3_CommonIE_Types.MobileIdentityLV mi;
- [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {
+ [] BSSGP[gb_idx].receive(tr_GMM_ID_REQ('001'B)) {
mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi), gb_idx);
repeat;
}
- [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {
+ [] BSSGP[gb_idx].receive(tr_GMM_ID_REQ('010'B)) {
mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi), gb_idx);
repeat;
@@ -416,12 +416,9 @@
/* receive a L3 (GMM/SM) message over whatever is the appropriate lower-layer bearer */
function f_receive_l3(template PDU_L3_SGSN_MS rx_tpl := ?, integer gb_idx := 0)
runs on BSSGP_ConnHdlr return PDU_L3_SGSN_MS {
- var BssgpDecoded bd;
var PDU_L3_SGSN_MS l3_mt;
alt {
- [] BSSGP[gb_idx].receive(tr_BD_L3_MT(rx_tpl)) -> value bd {
- l3_mt := bd.l3_mt;
- }
+ [] BSSGP[gb_idx].receive(rx_tpl) -> value l3_mt { }
}
return l3_mt;
}
@@ -658,14 +655,14 @@
f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ(?))) {
+ [] BSSGP[0].receive(tr_GMM_ID_REQ(?)) {
/* don't send ID Response */
repeat;
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT('09'O))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT('09'O)) {
setverdict(pass);
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
setverdict(fail, "Wrong Attach Reject Cause");
mtc.stop;
}
@@ -688,7 +685,7 @@
[] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); { }
}
/* don't send SAI-response from HLR */
- BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?)));
+ BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?));
setverdict(pass);
}
testcase TC_attach_auth_sai_timeout() runs on test_CT {
@@ -709,7 +706,7 @@
GSUP.send(ts_GSUP_SAI_ERR(g_pars.imsi, 23));
}
}
- BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?)));
+ BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?));
setverdict(pass);
}
testcase TC_attach_auth_sai_reject() runs on test_CT {
@@ -721,7 +718,7 @@
/* HLR never responds to UL REQ, expect ATTACH REJECT */
private function f_TC_attach_gsup_lu_timeout(charstring id) runs on BSSGP_ConnHdlr {
- var BssgpDecoded bd;
+ var PDU_L3_SGSN_MS l3_mt;
var RoutingAreaIdentificationV old_ra := f_random_RAI();
f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
@@ -730,11 +727,11 @@
GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
/* Never follow-up with ISD_REQ or UL_RES */
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
setverdict(pass);
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd {
- f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
+ [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt {
+ f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
setverdict(fail);
mtc.stop;
}
@@ -750,7 +747,7 @@
/* HLR rejects UL REQ, expect ATTACH REJECT */
private function f_TC_attach_gsup_lu_reject(charstring id) runs on BSSGP_ConnHdlr {
- var BssgpDecoded bd;
+ var PDU_L3_SGSN_MS l3_mt;
var RoutingAreaIdentificationV old_ra := f_random_RAI();
f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
@@ -760,11 +757,11 @@
GSUP.send(ts_GSUP_UL_ERR(g_pars.imsi, 0));
}
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
setverdict(pass);
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd {
- f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
+ [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt {
+ f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
setverdict(fail);
mtc.stop;
}
@@ -781,7 +778,7 @@
/* Attempt of combined GPRS + IMSI attach: network should ACK only GPRS attach */
private function f_TC_attach_combined(charstring id) runs on BSSGP_ConnHdlr {
- var BssgpDecoded bd;
+ var PDU_L3_SGSN_MS l3_mt;
var RoutingAreaIdentificationV old_ra := f_random_RAI();
f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, true, false, omit, omit));
@@ -789,8 +786,8 @@
/* Expect MSC to perform LU with HLR */
f_gmm_gsup_lu_isd();
- BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd {
- f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
+ BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt {
+ f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
}
f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL);
setverdict(pass);
@@ -805,15 +802,15 @@
/* Attempt of GPRS ATTACH in 'accept all' mode */
private function f_TC_attach_accept_all(charstring id) runs on BSSGP_ConnHdlr {
- var BssgpDecoded bd;
+ var PDU_L3_SGSN_MS l3_mt;
var RoutingAreaIdentificationV old_ra := f_random_RAI();
g_pars.net.expect_auth := false;
f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
f_gmm_auth();
- BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd {
- f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
+ BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt {
+ f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
}
f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL);
setverdict(pass);
@@ -840,13 +837,13 @@
f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
alt {
[] as_mm_identity();
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT('07'O))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT('07'O)) {
setverdict(pass);
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
setverdict(pass);
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT(*, *, *))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT(*, *, *)) {
setverdict(fail);
mtc.stop;
}
@@ -871,7 +868,7 @@
f_send_l3_gmm_llc(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra, false, omit, omit));
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_RAU_REJECT('0a'O))) {
+ [] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) {
setverdict(pass);
}
/* FIXME: Expect XID RESET? */
@@ -887,8 +884,6 @@
}
private function f_TC_attach_rau(charstring id) runs on BSSGP_ConnHdlr {
- var BssgpDecoded bd;
-
/* first perform regular attach */
f_TC_attach(id);
@@ -905,7 +900,7 @@
/* general GPRS DETACH helper */
function f_detach_mo(BIT3 detach_type, boolean power_off, boolean expect_purge, integer bssgp_index := 0) runs on BSSGP_ConnHdlr {
- var BssgpDecoded bd;
+ var PDU_L3_SGSN_MS l3_mt;
timer T := 5.0;
f_send_l3_gmm_llc(ts_GMM_DET_REQ_MO(detach_type, power_off), bssgp_index);
if (expect_purge) {
@@ -918,7 +913,7 @@
setverdict(fail, "Unexpected GSUP PURGE MS for unregistered TLLI");
mtc.stop;
}
- [power_off] BSSGP[bssgp_index].receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) -> value bd {
+ [power_off] BSSGP[bssgp_index].receive(tr_GMM_DET_ACCEPT_MT) -> value l3_mt {
g_pars.ra := omit;
setverdict(fail, "Unexpected DETACH ACCEPT in power-off DETACH");
mtc.stop;
@@ -927,12 +922,12 @@
[power_off] T.timeout {
setverdict(pass);
}
- [not power_off] BSSGP[bssgp_index].receive(tr_BD_L3_MT(tr_GMM_DET_ACCEPT_MT)) -> value bd {
+ [not power_off] BSSGP[bssgp_index].receive(tr_GMM_DET_ACCEPT_MT) -> value l3_mt {
g_pars.ra := omit;
setverdict(pass);
/* TODO: check if any PDP contexts are deactivated on network side? */
}
- [] BSSGP[bssgp_index].receive(tr_BD_L3_MT(?)) -> value bd {
+ [] BSSGP[bssgp_index].receive(PDU_L3_SGSN_MS:?) -> value l3_mt {
if (power_off) {
setverdict(fail, "Unexpected Layer 3 package received in power-off DETACH");
} else {
@@ -1056,22 +1051,22 @@
omit, recovery));
}
alt {
- [exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, apars.exp_rej_cause))) {
+ [exp_rej] BSSGP[gb_idx].receive(tr_SM_ACT_PDP_REJ(apars.tid, apars.exp_rej_cause)) {
setverdict(pass);
}
- [exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT)) {
+ [exp_rej] BSSGP[gb_idx].receive(tr_SM_ACT_PDP_ACCEPT) {
setverdict(fail, "Unexpected PDP CTX ACT ACC");
mtc.stop;
}
- [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) {
+ [not exp_rej] BSSGP[gb_idx].receive(tr_SM_ACT_PDP_REJ(apars.tid, ?)) {
setverdict(fail, "Unexpected PDP CTX ACT FAIL");
mtc.stop;
}
- [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_REJ(apars.tid, ?))) {
+ [not exp_rej] BSSGP[gb_idx].receive(tr_SM_ACT_PDP_REJ(apars.tid, ?)) {
setverdict(fail, "Unexpected PDP CTX ACT FAIL");
mtc.stop;
}
- [not exp_rej] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(apars.tid, apars.sapi))) {
+ [not exp_rej] BSSGP[gb_idx].receive(tr_SM_ACT_PDP_ACCEPT(apars.tid, apars.sapi)) {
setverdict(pass);
}
[] as_xid(apars, gb_idx);
@@ -1090,7 +1085,7 @@
GTP.send(ts_GTPC_DeletePdpResp(g_ud.peer, seq_nr, apars.sgsn_tei_c, '7F'O));
}
alt {
- [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid))) {
+ [] BSSGP[gb_idx].receive(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid)) {
setverdict(pass);
}
[] as_xid(apars, gb_idx);
@@ -1114,7 +1109,7 @@
T.start;
alt {
- [] BSSGP[gb_idx].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) {
+ [] BSSGP[gb_idx].receive(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true)) {
f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid), gb_idx);
}
[not error_ind] GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) {
@@ -1219,7 +1214,7 @@
}
private altstep as_xid(PdpActPars apars, integer gb_idx := 0) runs on BSSGP_ConnHdlr {
- [] BSSGP[gb_idx].receive(tr_BD_LLC(tr_LLC_XID_MT_CMD(?, apars.sapi))) {
+ [] BSSGP[gb_idx].receive(tr_LLC_XID_MT_CMD(?, apars.sapi)) {
repeat;
}
}
@@ -1265,7 +1260,8 @@
/* Expect PDU via BSSGP/LLC on simulated PCU from SGSN */
alt {
[] as_xid(apars, gb_idx);
- [] BSSGP[gb_idx].receive(tr_BD_SNDCP(apars.sapi, tr_SN_UD(apars.nsapi, payload)));
+ //[] BSSGP[gb_idx].receive(tr_BD_SNDCP(apars.sapi, tr_SN_UD(apars.nsapi, payload)));
+ [] BSSGP[gb_idx].receive(tr_SN_UD(apars.nsapi, payload));
}
}
@@ -1304,14 +1300,14 @@
apars.apn, apars.pco));
alt {
/* We might want toalso actually expect a PDPC CTX ACT REJ? */
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_DET_REQ_MT(?, ?))) {
+ [] BSSGP[0].receive(tr_GMM_DET_REQ_MT(?, ?)) {
setverdict(pass);
}
[] GTP.receive(tr_GTPC_MsgType(?, createPDPContextRequest, ?)) {
setverdict(fail, "Unexpected GTP PDP CTX ACT");
mtc.stop;
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(?, ?))) {
+ [] BSSGP[0].receive(tr_SM_ACT_PDP_ACCEPT(?, ?)) {
setverdict(fail, "Unexpected SM PDP CTX ACT ACK");
mtc.stop;
}
@@ -1447,7 +1443,7 @@
}
var OCT1 cause_network_failure := int2oct(38, 1)
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, cause_network_failure, true))) {
+ [] BSSGP[0].receive(tr_SM_DEACT_PDP_REQ_MT(apars.tid, cause_network_failure, true)) {
f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid));
setverdict(pass);
}
@@ -1522,7 +1518,7 @@
for (i := 0; i < 5; i := i+1) {
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) {}
+ [] BSSGP[0].receive(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true)) {}
[] as_xid(apars);
}
}
@@ -1567,7 +1563,7 @@
apars.ggsn_ip_c, apars.ggsn_ip_u, apars.chg_id,
omit, omit));
}
- BSSGP[0].receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT)) {}
+ BSSGP[0].receive(tr_SM_ACT_PDP_ACCEPT) {}
/* Now the same with Deact */
f_send_l3_gmm_llc(ts_SM_DEACT_PDP_REQ_MO(apars.tid, '00'O, false, omit), 0);
@@ -1583,7 +1579,7 @@
GTP.send(ts_GTPC_DeletePdpResp(g_ud_second.peer, seq_nr, apars.sgsn_tei_c, '7F'O));
}
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid))) {
+ [] BSSGP[0].receive(tr_SM_DEACT_PDP_ACCEPT_MT(apars.tid)) {
setverdict(pass);
}
[] as_xid(apars, 0);
@@ -1614,7 +1610,7 @@
g_delete_req := ts_GTPC_DeletePDP(peer, seq_nr, apars.sgsn_tei_c, apars.nsapi, '1'B);
GTP.send(g_delete_req);
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true))) {
+ [] BSSGP[0].receive(tr_SM_DEACT_PDP_REQ_MT(apars.tid, ?, true)) {
f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid), 0);
}
[] as_xid(apars, 0);
@@ -1669,7 +1665,7 @@
timer T := 5.0;
T.start;
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_DET_REQ_MT(*, *, *))) {
+ [] BSSGP[0].receive(tr_GMM_DET_REQ_MT(*, *, *)) {
T.stop;
setverdict(fail, "Unexpected GMM Detach Request");
mtc.stop;
@@ -1728,7 +1724,7 @@
GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));
/* MS: receive a Detach Request */
- BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_DET_REQ_MT(c_GMM_DTT_MT_IMSI_DETACH, ?, ?)));
+ BSSGP[0].receive(tr_GMM_DET_REQ_MT(c_GMM_DTT_MT_IMSI_DETACH, ?, ?));
f_send_l3_gmm_llc(ts_GMM_DET_ACCEPT_MO);
setverdict(pass);
@@ -1823,15 +1819,15 @@
f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
/* break */
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {
+ [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) {
mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi));
repeat;
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {
+ [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) {
/* ignore ID REQ IMEI */
count_req := count_req + 1;
repeat;
@@ -1871,15 +1867,15 @@
f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
/* break */
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {
+ [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) {
/* ignore ID REQ IMSI */
count_req := count_req + 1;
repeat;
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {
+ [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) {
mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi));
repeat;
@@ -1931,7 +1927,7 @@
private function f_TC_attach_closed_imsi_added(charstring id) runs on BSSGP_ConnHdlr {
var RoutingAreaIdentificationV old_ra := f_random_RAI();
- var BssgpDecoded bd;
+ var PDU_L3_SGSN_MS l3_mt;
/* unregister the old IMSI */
f_bssgp_client_unregister(g_pars.imsi);
@@ -1945,12 +1941,12 @@
f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
f_gmm_auth();
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
setverdict(fail, "Received unexpected GMM Attach REJECT");
mtc.stop;
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT(*, *, *))) -> value bd {
- f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
+ [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT(*, *, *)) -> value l3_mt {
+ f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL);
setverdict(pass);
}
@@ -2004,7 +2000,7 @@
[] T.timeout {
/* break */
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT(*, *, *))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT(*, *, *)) {
/* ignore */
count_req := count_req + 1;
T.start;
@@ -2032,17 +2028,17 @@
}
private function f_routing_area_update(RoutingAreaIdentificationV ra, integer bssgp := 0) runs on BSSGP_ConnHdlr {
- var BssgpDecoded bd;
+ var PDU_L3_SGSN_MS l3_mt;
/* then send RAU */
f_send_l3_gmm_llc(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, false, omit, omit), bssgp);
alt {
- [] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_RAU_ACCEPT)) -> value bd {
- f_process_rau_accept(bd.l3_mt.msgs.gprs_mm.routingAreaUpdateAccept, bssgp);
+ [] BSSGP[bssgp].receive(tr_GMM_RAU_ACCEPT) -> value l3_mt {
+ f_process_rau_accept(l3_mt.msgs.gprs_mm.routingAreaUpdateAccept, bssgp);
f_send_l3_gmm_llc(ts_GMM_RAU_COMPL, bssgp);
setverdict(pass);
}
- [] BSSGP[bssgp].receive(tr_BD_L3_MT(tr_GMM_RAU_REJECT)) {
+ [] BSSGP[bssgp].receive(tr_GMM_RAU_REJECT) {
setverdict(fail, "Unexpected RAU Reject");
mtc.stop;
}
@@ -2051,8 +2047,6 @@
}
private function f_TC_attach_rau_a_a(charstring id) runs on BSSGP_ConnHdlr {
- var BssgpDecoded bd;
-
/* first perform regular attach */
f_TC_attach(id);
@@ -2081,8 +2075,6 @@
}
private function f_TC_attach_rau_a_b(charstring id) runs on BSSGP_ConnHdlr {
- var BssgpDecoded bd;
-
f_TC_attach(id);
log("attach complete sending rau");
@@ -2117,21 +2109,21 @@
var integer count_req := 0;
var MobileL3_CommonIE_Types.MobileIdentityLV mi;
var RoutingAreaIdentificationV rand_rai := f_random_RAI();
- var BssgpDecoded bd;
+ var PDU_L3_SGSN_MS l3_mt;
f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit));
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
setverdict(fail, "Unexpected GMM ATTACH REJECT");
mtc.stop;
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {
+ [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) {
mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi));
repeat;
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {
+ [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) {
/* send out a second GMM_Attach Request.
* If the SGSN follows the rules, this 2nd ATTACH REQ should be ignored, because
* of the same content */
@@ -2144,21 +2136,21 @@
/* we've sent already a IMEI answer, we should NOT asked again for IMEI */
alt {
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) {
+ [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) {
mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi));
repeat;
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ID_REQ('010'B))) {
+ [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) {
setverdict(fail, "Unexpected GMM ID REQ (IMEI).");
mtc.stop;
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_REJECT(?))) {
+ [] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
setverdict(fail, "Unexpected GMM ATTACH REJECT");
mtc.stop;
}
- [] BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd {
- f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
+ [] BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt {
+ f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL);
setverdict(pass);
/* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */
@@ -2186,7 +2178,6 @@
}
private function f_TC_attach_usim_resync(charstring id) runs on BSSGP_ConnHdlr {
- var BssgpDecoded bd;
var RoutingAreaIdentificationV old_ra := f_random_RAI();
var template PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit);
@@ -2227,7 +2218,7 @@
var template PDU_L3_SGSN_MS auth_ciph_req := tr_GMM_AUTH_REQ(g_pars.vec.rand);
auth_ciph_req.msgs.gprs_mm.authenticationAndCipheringRequest.authenticationParameterAUTN := autn;
- BSSGP[0].receive(tr_BD_L3_MT(auth_ciph_req)) -> value bd;
+ BSSGP[0].receive(auth_ciph_req) -> value l3_mt;
/* send the gmm auth failure with resync IE */
f_send_l3_gmm_llc(ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC(g_pars.vec.auts));
@@ -2259,8 +2250,7 @@
/* wait for the new Auth Request */
auth_ciph_req := tr_GMM_AUTH_REQ(g_pars.vec.rand);
auth_ciph_req.msgs.gprs_mm.authenticationAndCipheringRequest.authenticationParameterAUTN := autn;
- BSSGP[0].receive(tr_BD_L3_MT(auth_ciph_req)) -> value bd;
- l3_mt := bd.l3_mt;
+ BSSGP[0].receive(auth_ciph_req) -> value l3_mt;
var BIT4 ac_ref := l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.acReferenceNumber.valueField;
var template PDU_L3_MS_SGSN auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref, g_pars.vec.sres);
auth_ciph_resp := ts_GMM_AUTH_RESP_2G(ac_ref, g_pars.vec.sres);
@@ -2284,8 +2274,8 @@
/* Expect SGSN to perform LU with HLR */
f_gmm_gsup_lu_isd();
- BSSGP[0].receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd {
- f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
+ BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt {
+ f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
}
f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL);
setverdict(pass);
@@ -2337,7 +2327,7 @@
f_gmm_attach(false, false);
f_sleep(1.0);
f_send_llc(ts_LLC_SABM({}, '1'B, c_LLC_SAPI_LLGMM, LLC_CR_UL_CMD));
- BSSGP[0].receive(tr_BD_LLC(tr_LLC_DM(?, c_LLC_SAPI_LLGMM, LLC_CR_DL_RSP)));
+ BSSGP[0].receive(tr_LLC_DM(?, c_LLC_SAPI_LLGMM, LLC_CR_DL_RSP));
setverdict(pass);
}
testcase TC_llc_sabm_dm_llgmm() runs on test_CT {
@@ -2353,7 +2343,7 @@
f_gmm_attach(false, false);
f_sleep(1.0);
f_send_llc(ts_LLC_SABM({}, '1'B, c_LLC_SAPI_LL5, LLC_CR_UL_CMD));
- BSSGP[0].receive(tr_BD_LLC(tr_LLC_DM(?, c_LLC_SAPI_LL5, LLC_CR_DL_RSP)));
+ BSSGP[0].receive(tr_LLC_DM(?, c_LLC_SAPI_LL5, LLC_CR_DL_RSP));
setverdict(pass);
}
testcase TC_llc_sabm_dm_ll5() runs on test_CT {
@@ -2380,7 +2370,7 @@
xid_rx := { tr_XID_L3(''O) };
f_send_llc(ts_LLC_XID_MO_CMD(xid, apars.sapi));
alt {
- [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID(xid_rx, apars.sapi)));
+ [] BSSGP[0].receive(tr_LLC_XID(xid_rx, apars.sapi));
[] as_xid(apars);
}
setverdict(pass);
@@ -2408,7 +2398,7 @@
xid_rx := { tr_XID_N201U(1234) };
f_send_llc(ts_LLC_XID_MO_CMD(xid, apars.sapi));
alt {
- [] BSSGP[0].receive(tr_BD_LLC(tr_LLC_XID_MT_RSP(xid_rx, apars.sapi)));
+ [] BSSGP[0].receive(tr_LLC_XID_MT_RSP(xid_rx, apars.sapi));
[] as_xid(apars);
}
setverdict(pass);