pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37555?usp=email )

Change subject: library/L3_Templates: Introduce templates for GMM Service 
Req/Acc/Rej
......................................................................

library/L3_Templates: Introduce templates for GMM Service Req/Acc/Rej

Those will be used by a follow-up patch in SGSN_Tests.

Change-Id: Ia948a27e39cf11f1421396d15da32bd82ea9513c
---
M library/L3_Templates.ttcn
1 file changed, 100 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved




diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index 710b0ea..77d949b 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -44,6 +44,15 @@
        CM_ID_TYPE_PTMSI_RAI_PTMSI_SIG  ('101'B)
 }

+/* TS 24.008 10.5.5.20 Service type */
+type enumerated ServiceType {
+       SERVICE_TYPE_Signalling                         ('001'B),
+       SERVICE_TYPE_Data                               ('010'B),
+       SERVICE_TYPE_Paging_Response                    ('011'B),
+       SERVICE_TYPE_MBMS_Multicast_Service_Reception   ('100'B),
+       SERVICE_TYPE_MBMS_Broadcast_Service_Reception   ('101'B)
+}
+
 template ML3_Cause_TLV ts_ML3_Cause(BIT7 cause, BIT4 loc := '0001'B, BIT2 std 
:= '11'B) := {
        elementIdentifier := '08'O,
        lengthIndicator := 0, /* overwritten */
@@ -148,7 +157,7 @@


 /* send template for Mobile Identity (TMSI) */
-template MobileIdentityLV ts_MI_TMSI_LV(OCT4 tmsi) := {
+template MobileIdentityLV ts_MI_TMSI_LV(template (value) OCT4 tmsi) := {
        lengthIndicator := 0, /* overwritten */
        mobileIdentityV := {
                typeOfIdentity := '000'B,       /* overwritten */
@@ -315,6 +324,14 @@
        fop := '0'B
 };

+/* TS 24.008 10.5.7.1 PDPContextStatus */
+template (value) PDPContextStatusTLV ts_PDPContextStatusTLV(template (value) 
OCT2 status := '0000'O /* all inactive */) := {
+       elementIdentifier := '32'O,
+       lengthIndicator := 0, /* overwritten */
+       valueField := status
+};
+
+
 /* Send template for LOCATION UPDATING REQUEST */
 template (value) PDU_ML3_MS_NW ts_LU_REQ(template (value) LocationUpdatingType 
lu_type,
                                         template (value) MobileIdentityLV 
mi_lv,
@@ -431,8 +448,8 @@
        }
 }

-template (value) CipheringKeySequenceNumberV ts_CKSN(integer key_seq) := {
-       keySequence := int2bit(key_seq, 3),
+template (value) CipheringKeySequenceNumberV ts_CKSN(template (value) integer 
key_seq) := {
+       keySequence := int2bit(valueof(key_seq), 3),
        spare := '0'B
 }

@@ -2974,6 +2991,75 @@
        }
 }

+template (value) ServiceTypeV ts_ServiceTypeV(template (value) ServiceType 
serviceType) := {
+       serviceType := int2bit(enum2int(valueof(serviceType)), 3),
+       spare := '0'B
+}
+template (present) ServiceTypeV tr_ServiceTypeV(template (present) BIT3 
serviceType := ?) := {
+       serviceType := serviceType,
+       spare := '0'B
+}
+
+/* 3GPP TS 24.008 9.4.20 Service Request (Iu mode only) */
+template (value) PDU_L3_MS_SGSN ts_GMM_SERVICE_REQ(template (value) 
ServiceType service_type,
+                                                  template (value) OCT4 p_tmsi,
+                                                  template (value) integer 
cksn := 0,
+                                                  template (value) OCT2 
pdp_status := '0000'O) := {
+       discriminator := '1000'B, /* overwritten */
+       tiOrSkip := {
+               skipIndicator := '0000'B
+       },
+       msgs := {
+               gprs_mm := {
+                       serviceRequest := {
+                               messageType := '00001100'B, /* overwritten */
+                               cipheringKeySeqNum := ts_CKSN(cksn),
+                               serviceType := ts_ServiceTypeV(service_type),
+                               ptmsi := ts_MI_TMSI_LV(p_tmsi),
+                               pdpContextStatus := 
ts_PDPContextStatusTLV(pdp_status),
+                               mBMS_ContextStatus := omit,
+                               uplinkDataStatus := omit,
+                               deviceProperties := omit
+                       }
+               }
+       }
+}
+
+/* 3GPP TS 24.008 9.4.21 Service Accept (Iu mode only) */
+template (present) PDU_L3_SGSN_MS tr_GMM_SERVICE_ACC(template 
PDPContextStatusTLV pdp_status := *) := {
+       discriminator := '1000'B, /* overwritten */
+       tiOrSkip := {
+               skipIndicator := '0000'B
+       },
+       msgs := {
+               gprs_mm := {
+                       serviceAccept := {
+                               messageType := '00001101'B, /* overwritten */
+                               pdpContextStatus := pdp_status,
+                               mBMS_ContextStatus := *
+                       }
+               }
+       }
+}
+
+/* 3GPP TS 24.008 9.4.22 Service Reject (Iu mode only) */
+template (present) PDU_L3_SGSN_MS tr_GMM_SERVICE_REJ(template (present) 
GMM_CauseV gmmCause := ?,
+                                                    template GPRSTimer2TLV 
t3346 := *) := {
+       discriminator := '1000'B, /* overwritten */
+       tiOrSkip := {
+               skipIndicator := '0000'B
+       },
+       msgs := {
+               gprs_mm := {
+                       serviceReject := {
+                               messageType := '00001110'B, /* overwritten */
+                               gmmCause := gmmCause,
+                               t3346 := t3346
+                       }
+               }
+       }
+}
+
 template PDU_L3_MS_SGSN ts_GMM_DET_ACCEPT_MO := {
        discriminator := '0000'B, /* overwritten */
        tiOrSkip := {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37555?usp=email
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: Ia948a27e39cf11f1421396d15da32bd82ea9513c
Gerrit-Change-Number: 37555
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to