Change in osmo-ttcn3-hacks[master]: library/GSM_RR_Types: do not duplicate Mobile Identity records

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Fri Mar 27 18:09:31 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17639 )


Change subject: library/GSM_RR_Types: do not duplicate Mobile Identity records
......................................................................

library/GSM_RR_Types: do not duplicate Mobile Identity records

All the records related to Mobile Identity IE (see 3GPP TS 24.008,
section 10.5.1.4) are defined in [1], so there is no real need to
dumplicate them. Moreover, most of the related templates in
library/L3_Templates.ttcn are based on these records.

[1] titan.ProtocolModules.MobileL3_v13.4.0/src/MobileL3_CommonIE_Types.ttcn

Change-Id: I27c2743c59db770d6f7e9447dc8c1f539b228ced
---
M bsc/BSC_Tests.ttcn
M bts/BTS_Tests.ttcn
M bts/BTS_Tests_SMSCB.ttcn
M library/BSSGP_Types.ttcn
M library/GSM_RR_Types.ttcn
5 files changed, 24 insertions(+), 62 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index d020d95..de7102e 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1301,7 +1301,7 @@
 				  template OCT4 tmsi := omit) runs on test_CT
 {
 	var template BSSMAP_IE_ChannelNeeded bssmap_chneed;
-	var MobileIdentity mi;
+	/* FIXME (unused): var MobileIdentity mi; */
 	var template octetstring id_enc; /* FIXME */
 	var RSL_Message rx_rsl;
 	var integer paging_group := hex2int(imsi[lengthof(imsi)-1]);
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 46c9647..3018bca 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2979,7 +2979,7 @@
 			var integer new_sent := f_min(pkt_total, float2int(T_total.read * pch_blocks_per_sec) + 1);
 			while (st.num_paging_sent < new_sent) {
 				/* build mobile Identity */
-				var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+				var MobileIdentityLV mi;
 				if (cfg.use_tmsi) {
 					mi := valueof(ts_MI_TMSI_LV(f_rnd_octstring(4)));
 				} else {
@@ -4570,7 +4570,7 @@
 	f_init_pcu_test();
 
 	for (var integer i := 0; i < 100; i := i+1) {
-		var MobileL3_CommonIE_Types.MobileIdentityLV mi;
+		var MobileIdentityLV mi;
 		timer T := 3.0;
 		if (i < 50) {
 			mi := valueof(ts_MI_TMSI_LV(f_rnd_octstring(4)));
diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn
index 292205a..ebd8d0f 100644
--- a/bts/BTS_Tests_SMSCB.ttcn
+++ b/bts/BTS_Tests_SMSCB.ttcn
@@ -894,12 +894,14 @@
 			},
 			page_mode := PAGE_MODE_NORMAL,
 			mi1 := {
-				len := 1,
-				mi := {
-					unused := {
-						pad := '1111'B,
-						odd := false,
-						mi_type := MI_TYPE_NONE
+				lengthIndicator := 1,
+				mobileIdentityV := {
+					typeOfIdentity := '000'B,
+					oddEvenInd_identity := {
+						no_identity := {
+							oddevenIndicator := '0'B,
+							fillerDigits := 'F'H
+						}
 					}
 				}
 			},
diff --git a/library/BSSGP_Types.ttcn b/library/BSSGP_Types.ttcn
index d51bb6d..e9984d8 100644
--- a/library/BSSGP_Types.ttcn
+++ b/library/BSSGP_Types.ttcn
@@ -245,9 +245,9 @@
 		BssgpCause		cause,		/* 11.3.8 */
 		BssgpCellId		cell_id,	/* 11.3.9 */
 		DrxParameter		drx_parameter,	/* 10.3.11 */
-		MobileIdentity		imsi,		/* 11.3.14 */
+		MobileIdentityV		imsi,		/* 11.3.14 */
 		LocationAreaIdentification lai,		/* 11.3.17 */
-		MobileIdentity		mobile_id,	/* 11.3.20 */
+		MobileIdentityV		mobile_id,	/* 11.3.20 */
 		BssgpPduLifetime	pdu_lifetime,	/* 11.3.25 */
 		BssgpPriority		priority,	/* 11.3.27 */
 		BssgpQosProfile		qos_profile,	/* 11.3.28 */
@@ -388,10 +388,14 @@
 		len := 4,
 		u := {
 			mobile_id := {
-				imsi := {
-					mi_type := MI_TYPE_IMSI,
-					odd := true, /* IMSI has 15 digits */
-					digits := imsi
+				typeOfIdentity := MI_TYPE_IMSI,
+				oddEvenInd_identity := {
+					imsi := {
+						/* TODO: introduce generic tr_IMSI_L3 */
+						oddevenIndicator := true, /* IMSI has 15 digits */
+						digits := imsi,
+						fillerDigit := '1111'B
+					}
 				}
 			}
 		}
diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index 9fd7733..878166b 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -16,6 +16,7 @@
 	import from Osmocom_Types all;
 	import from GSM_Types all;
 	import from RLCMAC_CSN1_Types all;
+	import from MobileL3_CommonIE_Types all;
 
 	/* Table 10.4.1 of Section 10.4 / 3GPP TS 44.018 */
 	type enumerated RrMessageType {
@@ -205,51 +206,6 @@
 		MI_TYPE_TMGI
 	} with { variant "FIELDLENGTH(3)" };
 
-	type record MobileIdentityBCD {
-		MobileIdentityType	mi_type (MI_TYPE_IMSI, MI_TYPE_IMEI, MI_TYPE_IMEISV),
-		boolean			odd,
-		hexstring		digits
-	} with { variant "FIELDORDER(lsb)" };
-
-	type record MobileIdentityTMSI {
-		BIT4			pad ('1111'B),
-		boolean			odd (false),
-		MobileIdentityType	mi_type (MI_TYPE_TMSI),
-		GsmTmsi			tmsi
-	} with { variant "FIELDORDER(lsb)" };
-
-	type record MobileIdentityNone {
-		BIT4			pad ('1111'B),
-		boolean			odd (false),
-		MobileIdentityType	mi_type (MI_TYPE_NONE)
-	} with { variant "FIELDORDER(lsb)" };
-
-	type union MobileIdentity {
-		MobileIdentityBCD	imsi,
-		MobileIdentityBCD	imei,
-		MobileIdentityBCD	imeisv,
-		MobileIdentityTMSI	tmsi,
-		MobileIdentityNone	unused
-	} with { variant "TAG(imsi, mi_type = MI_TYPE_IMSI;
-			      imei, mi_type = MI_TYPE_IMEI;
-			      imeisv, mi_type = MI_TYPE_IMEISV;
-			      tmsi, mi_type = MI_TYPE_TMSI;
-			      unused, mi_type = MI_TYPE_NONE)"
-		 variant "FIELDORDER(lsb)"
-	};
-
-	/* TS 24.008 10.5.1.4 "Mobile Identity" */
-	type record MobileIdentityLV {
-		uint8_t		len,
-		MobileIdentity	mi
-	} with { variant (len) "LENGTHTO(mi)" };
-
-	type record MobileIdentityTLV {
-		uint8_t		tag,
-		uint8_t		len,
-		MobileIdentity	mi
-	} with { variant (len) "LENGTHTO(mi)" };
-
 	/* TS 24.008 10.5.1.5 */
 	type record MsClassmark1 {
 		BIT1		spare,
@@ -762,7 +718,7 @@
 		MobileIdentityLV		mi1,
 		MobileIdentityTLV		mi2 optional,
 		RestOctets			rest_octets
-	} with { variant "TAG(mi2, tag = 23)" };
+	} with { variant "TAG(mi2, elementIdentifier = '0010111'B)" };
 
 	/* 9.1.23 */
 	type record PagingRequestType2 {
@@ -772,7 +728,7 @@
 		GsmTmsi				mi2,
 		MobileIdentityTLV		mi3 optional,
 		RestOctets			rest_octets
-	} with { variant "TAG(mi3, tag = 23)" };
+	} with { variant "TAG(mi3, elementIdentifier = '0010111'B)" };
 
 	/* 9.1.24 */
 	type record length(4) of GsmTmsi GsmTmsi4;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17639
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: I27c2743c59db770d6f7e9447dc8c1f539b228ced
Gerrit-Change-Number: 17639
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200327/998749f9/attachment.htm>


More information about the gerrit-log mailing list