Change in osmo-ttcn3-hacks[master]: library/L3_Templates: add more templates for Mobile Identity IE

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 22:17:40 UTC 2020


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


Change subject: library/L3_Templates: add more templates for Mobile Identity IE
......................................................................

library/L3_Templates: add more templates for Mobile Identity IE

Change-Id: Ife954becab8c51605da05618a721541e7a4de319
---
M library/L3_Templates.ttcn
1 file changed, 61 insertions(+), 0 deletions(-)



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

diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index af4a573..7e53709 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -63,6 +63,67 @@
 }
 
 
+/* 3GPP TS 24.008, section 10.5.1.4 "Mobile Identity" */
+template (value) MobileIdentityTLV ts_MI_TLV(template (value) MobileIdentityV mi) := {
+	elementIdentifier := '0010111'B,
+	spare1 := '0'B,
+	mobileIdentityLV := ts_MI_LV(mi)
+};
+template MobileIdentityTLV tr_MI_TLV(template MobileIdentityV mi) := {
+	elementIdentifier := '0010111'B,
+	spare1 := '0'B,
+	mobileIdentityLV := tr_MI_LV(mi)
+};
+
+template (value) MobileIdentityLV ts_MI_LV(template (value) MobileIdentityV mi) := {
+	lengthIndicator := 0, /* overwritten */
+	mobileIdentityV := mi
+};
+template MobileIdentityLV tr_MI_LV(template MobileIdentityV mi) := {
+	lengthIndicator := ?,
+	mobileIdentityV := mi
+};
+
+/* Universal (send & receive) template for No Identity */
+template MobileIdentityV t_MI_NoIdentity(template (present) hexstring filler := 'F'H) := {
+	typeOfIdentity := '000'B,
+	oddEvenInd_identity := {
+		no_identity := {
+			/* Always old, since length can be 1, 3, or 5 */
+			oddevenIndicator := '0'B,
+			fillerDigits := filler
+		}
+	}
+};
+
+/* Universal (send & receive) template for TMSI/P-TMSI */
+template MobileIdentityV t_MI_TMSI(template (present) OCT4 tmsi) := {
+	typeOfIdentity := '100'B,
+	oddEvenInd_identity := {
+		tmsi_ptmsi := {
+			oddevenIndicator := '0'B,
+			fillerDigit := '1111'B,
+			octets := tmsi
+		}
+	}
+};
+
+private function f_tr_MI_IMSI(template (present) hexstring digits)
+return template (present) IMSI_L3 {
+	if (istemplatekind(digits, "?")) {
+		return ?;
+	} else {
+		return f_enc_IMSI_L3(valueof(digits))
+	}
+}
+template MobileIdentityV tr_MI_IMSI(template hexstring imsi) := {
+	typeOfIdentity := '001'B,
+	oddEvenInd_identity := {
+		imsi := f_tr_MI_IMSI(imsi)
+	}
+};
+
+
 /* send template for Mobile Identity (TMSI) */
 template MobileIdentityLV ts_MI_TMSI_LV(OCT4 tmsi) := {
 	lengthIndicator := 0, /* overwritten */

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17645
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: Ife954becab8c51605da05618a721541e7a4de319
Gerrit-Change-Number: 17645
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/7605611c/attachment.htm>


More information about the gerrit-log mailing list