Change in ...osmo-ttcn3-hacks[master]: GSUP_Types: Add support for GSUP_IE_RAT_TYPE

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/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Aug 30 19:12:57 UTC 2019


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


Change subject: GSUP_Types: Add support for GSUP_IE_RAT_TYPE
......................................................................

GSUP_Types: Add support for GSUP_IE_RAT_TYPE

Depends: libosmocore I93850710ab55a605bf61b95063a69682a2899bb1
Change-Id: I5d899fc6f6d4cf6123609b596022a853561f35f5
---
M library/GSUP_Types.ttcn
1 file changed, 46 insertions(+), 6 deletions(-)



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

diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index 74fbfc4..e1aa24c 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -43,6 +43,7 @@
 	OSMO_GSUP_AUTS_IE		('26'O),
 	OSMO_GSUP_RES_IE		('27'O),
 	OSMO_GSUP_CN_DOMAIN_IE		('28'O),
+	OSMO_GSUP_RAT_TYPE_IE		('29'O),
 
 	OSMO_GSUP_SESSION_ID_IE		('30'O),
 	OSMO_GSUP_SESSION_STATE_IE	('31'O),
@@ -232,11 +233,21 @@
 				 cause_rr, tag = OSMO_GSUP_CAUSE_RR_IE;
 				 cause_bssap, tag = OSMO_GSUP_CAUSE_BSSAP_IE;
 				 cause_sm, tag = OSMO_GSUP_CAUSE_SM_IE;
+				 rat_type, tag = OSMO_GSUP_RAT_TYPE_IE;
 			)"
 };
 
 type record of GSUP_IE GSUP_IEs;
 
+type enumerated GSUP_RatType {
+	RAT_TYPE_UNKNOWN	(0),
+	RAT_TYPE_GERAN_A	(1),
+	RAT_TYPE_UTRAN_Iu	(2),
+	RAT_TYPE_EUTRAN_SGs	(3)
+} with { variant "FIELDLENGTH(8)" };
+
+type record of GSUP_RatType GSUP_RatTypes;
+
 type union GSUP_IeValue {
 	hexstring	imsi,
 	integer		cause,
@@ -287,7 +298,9 @@
 
 	OCT1			cause_rr,
 	OCT1			cause_bssap,
-	OCT1			cause_sm
+	OCT1			cause_sm,
+
+	GSUP_RatTypes		rat_type
 };
 
 type record GSUP_PDU {
@@ -433,6 +446,12 @@
 template (value) GSUP_PDU ts_GSUP_SAI_REQ(hexstring imsi) :=
 	ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { valueof(ts_GSUP_IE_IMSI(imsi)) });
 
+template (value) GSUP_PDU ts_GSUP_SAI_REQ_EPS(hexstring imsi) :=
+	ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, {
+		valueof(ts_GSUP_IE_IMSI(imsi)),
+		valueof(ts_GSUP_IE_RAT_TYPE({RAT_TYPE_EUTRAN_SGs}))
+	});
+
 template GSUP_PDU tr_GSUP_SAI_REQ(template hexstring imsi) :=
 	tr_GSUP_IMSI(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, imsi);
 
@@ -1105,6 +1124,23 @@
 	}
 }
 
+
+template (present) GSUP_IE tr_GSUP_IE_RAT_TYPE(template (present) GSUP_RatTypes ratt) := {
+	tag := OSMO_GSUP_RAT_TYPE_IE,
+	len := ?,
+	val := {
+		rat_type := ratt
+	}
+}
+template (value) GSUP_IE ts_GSUP_IE_RAT_TYPE(GSUP_RatTypes ratt) := {
+	tag := OSMO_GSUP_RAT_TYPE_IE,
+	len := 0, /* overwritten */
+	val := {
+		rat_type := ratt
+	}
+}
+
+
 private function f_gen_ts_ss_ies(
 	hexstring imsi,
 	OCT4 sid,
@@ -1486,14 +1522,18 @@
 	}
 );
 
-function f_gsup_find_ie(GSUP_PDU msg, GSUP_IEI iei, out GSUP_IeValue ret) return boolean {
-	for (var integer i := 0; i < sizeof(msg.ies); i := i+1) {
-		if (msg.ies[i].tag == iei) {
-			ret := msg.ies[i].val;
+function f_gsup_find_nested_ie(GSUP_IEs ies, GSUP_IEI iei, out GSUP_IeValue ret) return boolean {
+	for (var integer i := 0; i < sizeof(ies); i := i+1) {
+		if (ies[i].tag == iei) {
+			ret := ies[i].val;
 			return true;
 		}
 	}
-		return false;
+	return false;
+}
+
+function f_gsup_find_ie(GSUP_PDU msg, GSUP_IEI iei, out GSUP_IeValue ret) return boolean {
+	return f_gsup_find_nested_ie(msg.ies, iei, ret);
 }
 
 template GSUP_AN_APDU t_GSUP_AN_APDU(

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15365
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: I5d899fc6f6d4cf6123609b596022a853561f35f5
Gerrit-Change-Number: 15365
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at gnumonks.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190830/4af73f29/attachment.htm>


More information about the gerrit-log mailing list