Change in ...osmo-ttcn3-hacks[master]: SGSN: introduce f_send_l3() to allow one function for Gb & Iu

lynxis lazus gerrit-no-reply at lists.osmocom.org
Tue Aug 13 11:36:19 UTC 2019


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15171


Change subject: SGSN: introduce f_send_l3() to allow one function for Gb & Iu
......................................................................

SGSN: introduce f_send_l3() to allow one function for Gb & Iu

f_send_l3() replaces f_send_l3_gmm_llc() to have one function
which sends L3 messages for Iu and Gb at the same time.
This allows to share most of the tests between Iu & Gb.

Change-Id: If47ad2be459ca7b87d9071d9ff020a51821e4433
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 122 insertions(+), 48 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/71/15171/1

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index a7cc57f..36297c5 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -461,23 +461,79 @@
 	BSSGP[gb_index].send(ts_BSSGP_UL_UD(g_pars.tlli, g_pars.bssgp_cell_id[gb_index], llc_enc));
 }
 
-function f_send_l3_gmm_llc(template PDU_L3_MS_SGSN l3_mo, integer gb_index := 0) runs on BSSGP_ConnHdlr {
+private function f_send_l3_gmm_llc(template (value) PDU_L3_MS_SGSN l3_mo, integer gb_index := 0) runs on BSSGP_ConnHdlr {
 	var octetstring l3_enc := enc_PDU_L3_MS_SGSN(valueof(l3_mo));
 	var BIT4 sapi := f_llc_sapi_by_l3_mo(valueof(l3_mo));
 	var integer n_u := f_llc_get_n_u_tx(llc[bit2int(sapi)]);
 	f_send_llc(ts_LLC_UI(l3_enc, sapi, '0'B, n_u), gb_index);
 }
 
+/* trigger sending of a RANAP InitialUE and wait for SCCP connection confirmation */
+function f_send_l3_initial_ue(template (value) PDU_L3_MS_SGSN l3_mo) runs on BSSGP_ConnHdlr {
+	log("Sending InitialUE: ", l3_mo);
+	var octetstring l3_enc := enc_PDU_L3_MS_SGSN(valueof(l3_mo));
+	var RANAP_PDU ranap;
+	var LAI lai := {
+		pLMNidentity := '62F224'O,
+		lAC := '1234'O,
+		iE_Extensions := omit
+	};
+	var SAI sai := {
+		pLMNidentity := lai.pLMNidentity,
+		lAC := lai.lAC,
+		sAC := '0000'O, /* FIXME */
+		iE_Extensions := omit
+	};
+	var IuSignallingConnectionIdentifier sigc_id := int2bit(23, 24); /* FIXME */
+	var GlobalRNC_ID grnc_id := {
+		pLMNidentity := lai.pLMNidentity,
+		rNC_ID := 2342 /* FIXME */
+	};
+
+	ranap := valueof(ts_RANAP_initialUE_CS(lai, sai, l3_enc, sigc_id, grnc_id));
+	BSSAP.send(ts_RANAP_Conn_Req(g_pars.sccp_addr_peer, g_pars.sccp_addr_local, ranap));
+	alt {
+	[] 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;
+		}
+	}
+}
+
+/* send a L3 (GMM/SM) message over whatever is the appropriate lower-layer bearer */
+function f_send_l3(template (value) PDU_L3_MS_SGSN l3_mo, integer gb_index := 0, boolean initial := false) runs on BSSGP_ConnHdlr {
+	if (gb_index >= NUM_GB) {
+		if (initial) {
+			f_send_l3_initial_ue(l3_mo);
+		} else {
+			BSSAP.send(ts_PDU_DTAP_PS_MO(l3_mo));
+		}
+	} else {
+		f_send_l3_gmm_llc(l3_mo, gb_index);
+	}
+}
+
 altstep as_mm_identity(integer gb_idx := 0) runs on BSSGP_ConnHdlr {
 	var MobileL3_CommonIE_Types.MobileIdentityLV mi;
-	[] BSSGP[gb_idx].receive(tr_GMM_ID_REQ('001'B)) {
+	[gb_idx < NUM_GB] 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);
+		f_send_l3(ts_GMM_ID_RESP(mi), gb_idx);
 		repeat;
 	}
-	[] BSSGP[gb_idx].receive(tr_GMM_ID_REQ('010'B)) {
+	[gb_idx >= NUM_GB] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_ID_REQ('001'B))) {
+		mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+		f_send_l3(ts_GMM_ID_RESP(mi), gb_idx);
+		repeat;
+	}
+	[gb_idx < NUM_GB] 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);
+		f_send_l3(ts_GMM_ID_RESP(mi), gb_idx);
+		repeat;
+	}
+	[gb_idx >= NUM_GB] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_ID_REQ('010'B))) {
+		mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
+		f_send_l3(ts_GMM_ID_RESP(mi), gb_idx);
 		repeat;
 	}
 }
@@ -485,9 +541,13 @@
 /* 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 PDU_DTAP_PS_MT mt;
 	var PDU_L3_SGSN_MS l3_mt;
 	alt {
-	[] BSSGP[gb_idx].receive(rx_tpl) -> value l3_mt { }
+	[gb_idx < NUM_GB] BSSGP[gb_idx].receive(rx_tpl) -> value l3_mt { }
+	[gb_idx >= NUM_GB] BSSAP.receive(tr_PDU_DTAP_PS_MT(rx_tpl)) -> value mt {
+		l3_mt := mt.dtap;
+		}
 	}
 	return l3_mt;
 }
@@ -555,7 +615,17 @@
 			l3_mo.msgs.gprs_mm.authenticationAndCipheringResponse.imeisv :=
 						valueof(ts_MI_IMEISV_TLV(g_pars.imei & '0'H));
 		}
-		f_send_l3_gmm_llc(l3_mo, gb_idx);
+		f_send_l3(l3_mo, gb_idx);
+
+		/* Security Mode Command + Complete on Iu case */
+		if (gb_idx >= NUM_GB) {
+			BSSAP.receive(tr_RANAP_SecurityModeCmd(uia_algs := ?, uia_key := oct2bit(g_pars.vec.ik),
+								key_sts := ?)) {
+				var IntegrityProtectionAlgorithm uia_chosen := 0; /*standard_UMTS_integrity_algorithm_UIA1;*/
+				BSSAP.send(ts_RANAP_SecurityModeComplete(uia_chosen));
+				//BSSAP.receive(tr_RANAP_CommonId(imsi_hex2oct(g_pars.imsi)));
+			}
+		}
 	} else {
 		/* wait for identity procedure */
 		f_sleep(1.0);
@@ -661,7 +731,7 @@
 	 * revisionLevelIndicatior is at the wrong place! */
 	attach_req.msgs.gprs_mm.attachRequest.msNetworkCapability.msNetworkCapabilityV.solSACapability := '0'B;
 
-	f_send_l3_gmm_llc(attach_req, gb_idx);
+	f_send_l3(attach_req, gb_idx, initial := true);
 	f_gmm_auth(umts_aka_challenge, force_gsm_sres, gb_idx);
 	/* Expect SGSN to perform LU with HLR */
 	f_gmm_gsup_lu_isd();
@@ -670,7 +740,12 @@
 	f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
 
 	/* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */
-	f_send_l3_gmm_llc(ts_GMM_ATTACH_COMPL, gb_idx);
+	f_send_l3(ts_GMM_ATTACH_COMPL, gb_idx);
+
+	/* IuPS case: Expect Iu Release */
+	if (gb_idx >= NUM_GB) {
+		as_iu_release_compl_disc();
+	}
 }
 
 private function f_TC_attach(charstring id) runs on BSSGP_ConnHdlr {
@@ -722,7 +797,7 @@
 private function f_TC_attach_auth_id_timeout(charstring id) runs on BSSGP_ConnHdlr {
 	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));
+	f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
 	alt {
 	[] BSSGP[0].receive(tr_GMM_ID_REQ(?)) {
 		/* don't send ID Response */
@@ -748,7 +823,7 @@
 private function f_TC_attach_auth_sai_timeout(charstring id) runs on BSSGP_ConnHdlr {
 	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));
+	f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
 	alt {
 	[] as_mm_identity();
 	[] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); { }
@@ -768,7 +843,7 @@
 private function f_TC_attach_auth_sai_reject(charstring id) runs on BSSGP_ConnHdlr {
 	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));
+	f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
 	alt {
 	[] as_mm_identity();
 	[] GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); {
@@ -790,7 +865,7 @@
 	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));
+	f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
 	f_gmm_auth();
 	/* Expect MSC to perform LU with HLR */
 	GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
@@ -819,7 +894,7 @@
 	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));
+	f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
 	f_gmm_auth();
 	/* Expect MSC to perform LU with HLR */
 	GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)) {
@@ -850,7 +925,7 @@
 	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));
+	f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, true, false, omit, omit));
 	f_gmm_auth();
 	/* Expect MSC to perform LU with HLR */
 	f_gmm_gsup_lu_isd();
@@ -858,7 +933,7 @@
 	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);
+	f_send_l3(ts_GMM_ATTACH_COMPL);
 	setverdict(pass);
 }
 testcase TC_attach_combined() runs on test_CT {
@@ -876,12 +951,12 @@
 
 	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_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
 	f_gmm_auth();
 	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);
+	f_send_l3(ts_GMM_ATTACH_COMPL);
 	setverdict(pass);
 }
 testcase TC_attach_accept_all() runs on test_CT {
@@ -903,7 +978,7 @@
 
 	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_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
 	alt {
 	[] as_mm_identity();
 	[] BSSGP[0].receive(tr_GMM_ATTACH_REJECT('07'O)) {
@@ -935,7 +1010,7 @@
 private function f_TC_rau_unknown(charstring id) runs on BSSGP_ConnHdlr {
 	var RoutingAreaIdentificationV old_ra := f_random_RAI();
 
-	f_send_l3_gmm_llc(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra, false, omit, omit));
+	f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra, false, omit, omit));
 	alt {
 	[] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) {
 		setverdict(pass);
@@ -971,7 +1046,7 @@
 function f_detach_mo(BIT3 detach_type, boolean power_off, boolean expect_purge, integer bssgp_index := 0) runs on BSSGP_ConnHdlr {
 	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);
+	f_send_l3(ts_GMM_DET_REQ_MO(detach_type, power_off), bssgp_index);
 	if (expect_purge) {
 		GSUP.receive(tr_GSUP_PURGE_MS_REQ(g_pars.imsi, OSMO_GSUP_CN_DOMAIN_PS));
 		GSUP.send(ts_GSUP_PURGE_MS_RES(g_pars.imsi));
@@ -1107,7 +1182,7 @@
 		recovery := ts_Recovery(apars.ggsn_restart_ctr);
 	}
 
-	f_send_l3_gmm_llc(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr,
+	f_send_l3(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr,
 				     apars.apn, apars.pco), gb_idx);
 	GTP.receive(tr_GTPC_MsgType(?, createPDPContextRequest, ?)) -> value g_ud {
 		f_process_gtp_ctx_act_req(apars, g_ud.gtpc);
@@ -1147,7 +1222,7 @@
 	var boolean exp_rej := ispresent(apars.exp_rej_cause);
 	var Gtp1cUnitdata g_ud;
 
-	f_send_l3_gmm_llc(ts_SM_DEACT_PDP_REQ_MO(apars.tid, cause, false, omit), gb_idx);
+	f_send_l3(ts_SM_DEACT_PDP_REQ_MO(apars.tid, cause, false, omit), gb_idx);
 	GTP.receive(tr_GTPC_MsgType(?, deletePDPContextRequest, apars.ggsn_tei_c)) -> value g_ud {
 		var integer seq_nr := oct2int(g_ud.gtpc.opt_part.sequenceNumber);
 		BSSGP[gb_idx].clear;
@@ -1179,7 +1254,7 @@
 
 	alt {
 	[] 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);
+		f_send_l3(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid), gb_idx);
 		}
 	[not error_ind] GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) {
 		repeat;
@@ -1365,7 +1440,7 @@
 /* PDP Context activation for not-attached subscriber; expect fail */
 private function f_TC_pdp_act_unattached(charstring id) runs on BSSGP_ConnHdlr {
 	var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip));
-	f_send_l3_gmm_llc(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr,
+	f_send_l3(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr,
 				     apars.apn, apars.pco));
 	alt {
 	/* We might want toalso actually expect a PDPC CTX ACT REJ? */
@@ -1513,7 +1588,7 @@
 	var OCT1 cause_network_failure := int2oct(38, 1)
 	alt {
 	[] 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));
+		f_send_l3(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid));
 		setverdict(pass);
 		}
 	[] as_xid(apars);
@@ -1594,7 +1669,7 @@
 
 	GTP.receive(tr_GTPC_MsgType(?, deletePDPContextResponse, apars.ggsn_tei_c)) {}
 
-	f_send_l3_gmm_llc(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid));
+	f_send_l3(ts_SM_DEACT_PDP_ACCEPT_MO(apars.tid));
 	setverdict(pass);
 }
 testcase TC_attach_pdp_act_deact_mt_t3395_expire() runs on test_CT {
@@ -1794,7 +1869,7 @@
 
 	/* MS: receive a Detach Request */
 	BSSGP[0].receive(tr_GMM_DET_REQ_MT(c_GMM_DTT_MT_IMSI_DETACH, ?, ?));
-	f_send_l3_gmm_llc(ts_GMM_DET_ACCEPT_MO);
+	f_send_l3(ts_GMM_DET_ACCEPT_MO);
 
 	setverdict(pass);
 }
@@ -1885,7 +1960,7 @@
 	var integer count_req := 0;
 	var MobileL3_CommonIE_Types.MobileIdentityLV mi;
 
-	f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
+	f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
 
 	alt {
 		[] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
@@ -1893,7 +1968,7 @@
 		}
 		[] 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));
+			f_send_l3(ts_GMM_ID_RESP(mi));
 			repeat;
 		}
 		[] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) {
@@ -1933,7 +2008,7 @@
 	/* set p_tmsi to use it in Attach Req via f_mi_get_lv() */
 	g_pars.p_tmsi := 'c0000035'O;
 
-	f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
+	f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
 
 	alt {
 		[] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
@@ -1946,7 +2021,7 @@
 		}
 		[] 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));
+			f_send_l3(ts_GMM_ID_RESP(mi));
 			repeat;
 		}
 	}
@@ -2007,7 +2082,7 @@
 	/* there is no auth */
 	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_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
 	f_gmm_auth();
 	alt {
 		[] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
@@ -2016,7 +2091,7 @@
 		}
 		[] 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);
+			f_send_l3(ts_GMM_ATTACH_COMPL);
 			setverdict(pass);
 		}
 	}
@@ -2060,7 +2135,7 @@
 private function f_TC_attach_check_complete_resend(charstring id) runs on BSSGP_ConnHdlr {
 	var integer count_req := 0;
 
-	f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
+	f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
 	f_gmm_auth();
 
 	timer T := 10.0;
@@ -2100,11 +2175,11 @@
 	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);
+	f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, false, omit, omit), bssgp);
 	alt {
 	[] 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);
+		f_send_l3(ts_GMM_RAU_COMPL, bssgp);
 		setverdict(pass);
 		}
 	[] BSSGP[bssgp].receive(tr_GMM_RAU_REJECT) {
@@ -2180,7 +2255,7 @@
 	var RoutingAreaIdentificationV rand_rai := f_random_RAI();
 	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));
+	f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit));
 
 	alt {
 		[] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
@@ -2189,16 +2264,16 @@
 		}
 		[] 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));
+			f_send_l3(ts_GMM_ID_RESP(mi));
 			repeat;
 		}
 		[] 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 */
-			f_send_l3_gmm_llc(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit));
+			f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit));
 			mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
-			f_send_l3_gmm_llc(ts_GMM_ID_RESP(mi));
+			f_send_l3(ts_GMM_ID_RESP(mi));
 		}
 	}
 	f_sleep(1.0);
@@ -2207,7 +2282,7 @@
 	alt {
 		[] 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));
+			f_send_l3(ts_GMM_ID_RESP(mi));
 			repeat;
 		}
 		[] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) {
@@ -2220,7 +2295,7 @@
 		}
 		[] 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);
+			f_send_l3(ts_GMM_ATTACH_COMPL);
 			setverdict(pass);
 			/* FIXME: Extract P-TMSI, if any. Only send Complete if necessary */
 		}
@@ -2258,7 +2333,7 @@
 	/* The thing is, if the solSACapability is 'omit', then the
 	 * revisionLevelIndicatior is at the wrong place! */
 	attach_req.msgs.gprs_mm.attachRequest.msNetworkCapability.msNetworkCapabilityV.solSACapability := '0'B;
-	f_send_l3_gmm_llc(attach_req);
+	f_send_l3(attach_req);
 
 	/* do the auth */
 	var PDU_L3_MS_SGSN l3_mo;
@@ -2290,7 +2365,7 @@
 	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));
+	f_send_l3(ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC(g_pars.vec.auts));
 
 	/* wait for the GSUP resync request */
 	GSUP.receive(tr_GSUP_SAI_REQ_UMTS_AKA_RESYNC(
@@ -2337,7 +2412,7 @@
 		l3_mo.msgs.gprs_mm.authenticationAndCipheringResponse.imeisv :=
 					valueof(ts_MI_IMEISV_TLV(g_pars.imei & '0'H));
 	}
-	f_send_l3_gmm_llc(l3_mo);
+	f_send_l3(l3_mo);
 	deactivate(di);
 
 	/* Expect SGSN to perform LU with HLR */
@@ -2346,7 +2421,7 @@
 	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);
+	f_send_l3(ts_GMM_ATTACH_COMPL);
 	setverdict(pass);
 }
 
@@ -2506,7 +2581,6 @@
 	vc_conn.done;
 }
 
-
 control {
 	execute( TC_attach() );
 	execute( TC_attach_mnc3() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15171
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If47ad2be459ca7b87d9071d9ff020a51821e4433
Gerrit-Change-Number: 15171
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190813/ec244e55/attachment.html>


More information about the gerrit-log mailing list