mme: Introduce test TC_ue_cell_reselect_geran_to_eutran
This test allows reproducing an idle mobility GERAN->EUTRAN.
Related: OS#6294
Change-Id: I6f8f077b99e83e6467d2b0c05148b81dbcf2ede4
diff --git a/library/NAS_Templates.ttcn b/library/NAS_Templates.ttcn
index 944d857..d45dc7d 100644
--- a/library/NAS_Templates.ttcn
+++ b/library/NAS_Templates.ttcn
@@ -44,6 +44,9 @@
}
const BIT4 c_EPS_SEC_NONE := '0000'B;
+const BIT4 c_EPS_SEC_IP := '0001'B;
+const BIT4 c_EPS_SEC_IP_CIPH := '0010'B;
+
const BIT4 c_EPS_NAS_PD_EMM := '0111'B;
const BIT4 c_EPS_NAS_PD_ESM := '0010'B;
@@ -58,6 +61,16 @@
content := inp
}
+/* 9.9.3.4A - 10.5.1.2/24.008 */
+template (value) CipheringKeySequenceNumberTV
+ts_CipheringKeySequenceNumberTV(template (value) BIT3 key_seq) := {
+ keySequence := {
+ keySequence := key_seq,
+ spare := '0'B
+ },
+ elementIdentifier := '1000'B
+}
+
private template (value) MobileIdentityLV
ts_NAS_MobileIdLV(template (value) MobileIdentityV mid) := {
lengthIndicator := 0,
@@ -178,6 +191,19 @@
ePS_MobileIdentity := ts_NAS_MobileId_GUTI(guti)
}
+/* 9.9.3.25 Nonce */
+template (value) NonceTV
+ts_NonceTV(template (value) OCT4 nonce) := {
+ elementIdentifier := '55'O,
+ noncevalue := nonce
+}
+function f_ts_NonceTV(template (omit) OCT4 nonce) return template (omit) NonceTV {
+ if (istemplatekind(nonce, "omit")) {
+ return omit;
+ }
+ return ts_NonceTV(nonce);
+}
+
/* 9.9.3.26 P-TMSI signature */
template (value) P_TMSISignatureTV
ts_PTMSI_SignatureTV(template (value) OCT3 ptmsi_sig) := {
@@ -408,6 +434,20 @@
}
}
+/* 8.2.27 Tracking Area Update Complete */
+template (value) PDU_NAS_EPS
+ts_PDU_NAS_EPS_TrackingAreaUpdateComplete(template (value) BIT4 securityHeaderType := c_EPS_SEC_NONE) := {
+ protocolDiscriminator := c_EPS_NAS_PD_EMM,
+ ePS_messages := {
+ ePS_MobilityManagement := {
+ pDU_NAS_EPS_TrackingAreaUpdateComplete := {
+ securityHeaderType := securityHeaderType,
+ messageType := '01001010'B
+ }
+ }
+ }
+}
+
/* 8.2.28 Tracking Area Update Reject */
template (present) PDU_NAS_EPS
tr_PDU_NAS_EPS_TrackingAreaUpdateReject(template (present) EMM_CauseV cause := ?) := {
@@ -429,7 +469,9 @@
template (value) PDU_NAS_EPS
ts_PDU_NAS_EPS_TrackingAreaUpdateRequest(template (value) EPS_MobileIdentityLV old_guti,
template (omit) P_TMSISignatureTV old_ptmsi_sig := omit,
- template (omit) GUTI_TypeTV old_guti_type := omit) := {
+ template (omit) GUTI_TypeTV old_guti_type := omit,
+ template (omit) NonceTV nonce_ue := omit,
+ template (omit) CipheringKeySequenceNumberTV gprs_cksn := omit) := {
protocolDiscriminator := c_EPS_NAS_PD_EMM,
ePS_messages := {
ePS_MobilityManagement := {
@@ -440,10 +482,10 @@
nasKeySetId := ts_NAS_KeySetIdentifierV,
oldGUTI := old_guti,
nonCurrentNative_nasKeySetId := omit,
- gprsCipheringKeySequenceNumber := omit,
+ gprsCipheringKeySequenceNumber := gprs_cksn,
old_P_TMSISignature := old_ptmsi_sig,
additionalGUTI := omit,
- nonce := omit,
+ nonce := nonce_ue,
uENetworkCapability := omit,
lastVisitedRegisteredTAI := omit,
dRXParameter := omit,