<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13379">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Osmocom_Gb_Types: Add more templates for BSSGP SUSPEND/RESUME<br><br>Change-Id: Ife25401043d565e52a73206c562bbb68bcfdbafa<br>---<br>M library/Osmocom_Gb_Types.ttcn<br>1 file changed, 176 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/79/13379/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn</span><br><span>index 780c768..623be33 100644</span><br><span>--- a/library/Osmocom_Gb_Types.ttcn</span><br><span>+++ b/library/Osmocom_Gb_Types.ttcn</span><br><span>@@ -732,6 +732,40 @@</span><br><span>             unstructured_value := f_oct_or_wc(bvci, 2)</span><br><span>   }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ template (value) TLLI_BSSGP ts_BSSGP_TLLI(template (value) GprsTlli tlli) := {</span><br><span style="color: hsl(120, 100%, 40%);">+                iEI := '1F'O,</span><br><span style="color: hsl(120, 100%, 40%);">+         ext := '1'B,</span><br><span style="color: hsl(120, 100%, 40%);">+          lengthIndicator := {</span><br><span style="color: hsl(120, 100%, 40%);">+                  length1 := 4</span><br><span style="color: hsl(120, 100%, 40%);">+          },</span><br><span style="color: hsl(120, 100%, 40%);">+            tLLI_Value := tlli</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+     template TLLI_BSSGP tr_BSSGP_TLLI(template GprsTlli tlli) := {</span><br><span style="color: hsl(120, 100%, 40%);">+                iEI := '1F'O,</span><br><span style="color: hsl(120, 100%, 40%);">+         ext := '1'B,</span><br><span style="color: hsl(120, 100%, 40%);">+          lengthIndicator := {</span><br><span style="color: hsl(120, 100%, 40%);">+                  length1 := 4</span><br><span style="color: hsl(120, 100%, 40%);">+          },</span><br><span style="color: hsl(120, 100%, 40%);">+            tLLI_Value := tlli</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   template (value) Suspend_Reference_Number ts_BSSGP_SUSP_REF(template (value) OCT1 susp_ref) := {</span><br><span style="color: hsl(120, 100%, 40%);">+              iEI := '1D'O,</span><br><span style="color: hsl(120, 100%, 40%);">+         ext := '1'B,</span><br><span style="color: hsl(120, 100%, 40%);">+          lengthIndicator := {</span><br><span style="color: hsl(120, 100%, 40%);">+                  length1 := 1</span><br><span style="color: hsl(120, 100%, 40%);">+          },</span><br><span style="color: hsl(120, 100%, 40%);">+            suspend_Reference_Number_value := susp_ref</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+     template Suspend_Reference_Number tr_BSSGP_SUSP_REF(template OCT1 susp_ref) := {</span><br><span style="color: hsl(120, 100%, 40%);">+              iEI := '1D'O,</span><br><span style="color: hsl(120, 100%, 40%);">+         ext := '1'B,</span><br><span style="color: hsl(120, 100%, 40%);">+          lengthIndicator := {</span><br><span style="color: hsl(120, 100%, 40%);">+                  length1 := 1</span><br><span style="color: hsl(120, 100%, 40%);">+          },</span><br><span style="color: hsl(120, 100%, 40%);">+            suspend_Reference_Number_value := susp_ref</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  template IMSI_BSSGP tr_BSSGP_IMSI(template hexstring imsi) := {</span><br><span>              iEI := '0D'O,</span><br><span>                ext := '1'B,</span><br><span>@@ -781,6 +815,18 @@</span><br><span>          lLC_PDU := pdu</span><br><span>       }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ function ts_BSSGP_CAUSE(template (omit) BssgpCause cause) return template (omit) Cause_BSSGP {</span><br><span style="color: hsl(120, 100%, 40%);">+                var template (omit) Cause_BSSGP ret;</span><br><span style="color: hsl(120, 100%, 40%);">+          if (istemplatekind(cause, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        ret := omit;</span><br><span style="color: hsl(120, 100%, 40%);">+          } else {</span><br><span style="color: hsl(120, 100%, 40%);">+                      ret.iEI := '07'O;</span><br><span style="color: hsl(120, 100%, 40%);">+                     ret.ext := '1'B;</span><br><span style="color: hsl(120, 100%, 40%);">+                      ret.lengthIndicator := { length1 := 1 };</span><br><span style="color: hsl(120, 100%, 40%);">+                      ret.cause_Value := int2oct(enum2int(valueof(cause)), 1);</span><br><span style="color: hsl(120, 100%, 40%);">+              }</span><br><span style="color: hsl(120, 100%, 40%);">+             return ret;</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span>    function t_BSSGP_CAUSE(template BssgpCause cause) return template Cause_BSSGP {</span><br><span>              var template Cause_BSSGP ret;</span><br><span>                ret.iEI := '07'O;</span><br><span>@@ -843,7 +889,7 @@</span><br><span>              pDU_BSSGP_BVC_RESET := {</span><br><span>                     bssgpPduType := '22'O,</span><br><span>                       bVCI := t_BSSGP_BVCI(bvci),</span><br><span style="color: hsl(0, 100%, 40%);">-                     cause := t_BSSGP_CAUSE(cause),</span><br><span style="color: hsl(120, 100%, 40%);">+                        cause := ts_BSSGP_CAUSE(cause),</span><br><span>                      cell_Identifier := t_BSSGP_IE_CellId(cell_id),</span><br><span>                       feature_bitmap := omit,</span><br><span>                      extended_Feature_Bitmap := omit</span><br><span>@@ -1222,5 +1268,134 @@</span><br><span>            }</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ template (value) Routeing_Area ts_BSSGP_RA_ID(RoutingAreaIdentification input) := {</span><br><span style="color: hsl(120, 100%, 40%);">+           iEI := '1B'O,</span><br><span style="color: hsl(120, 100%, 40%);">+         ext := '1'B,</span><br><span style="color: hsl(120, 100%, 40%);">+          lengthIndicator := {</span><br><span style="color: hsl(120, 100%, 40%);">+                  length1 := 6</span><br><span style="color: hsl(120, 100%, 40%);">+          },</span><br><span style="color: hsl(120, 100%, 40%);">+            mccDigit1 := input.lai.mcc_mnc[0],</span><br><span style="color: hsl(120, 100%, 40%);">+            mccDigit2 := input.lai.mcc_mnc[1],</span><br><span style="color: hsl(120, 100%, 40%);">+            mccDigit3 := input.lai.mcc_mnc[2],</span><br><span style="color: hsl(120, 100%, 40%);">+            mncDigit3 := input.lai.mcc_mnc[3],</span><br><span style="color: hsl(120, 100%, 40%);">+            mncDigit1 := input.lai.mcc_mnc[4],</span><br><span style="color: hsl(120, 100%, 40%);">+            mncDigit2 := input.lai.mcc_mnc[5],</span><br><span style="color: hsl(120, 100%, 40%);">+            lac := int2oct(input.lai.lac, 2),</span><br><span style="color: hsl(120, 100%, 40%);">+             rac := int2oct(input.rac, 1)</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   template (value) PDU_BSSGP ts_BSSGP_SUSPEND(GprsTlli tlli, RoutingAreaIdentification ra_id) := {</span><br><span style="color: hsl(120, 100%, 40%);">+              pDU_BSSGP_SUSPEND := {</span><br><span style="color: hsl(120, 100%, 40%);">+                        bssgpPduType := '0B'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := ts_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id)</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     template PDU_BSSGP tr_BSSGP_SUSPEND(template GprsTlli tlli, RoutingAreaIdentification ra_id) := {</span><br><span style="color: hsl(120, 100%, 40%);">+             pDU_BSSGP_SUSPEND := {</span><br><span style="color: hsl(120, 100%, 40%);">+                        bssgpPduType := '0B'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := tr_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id)</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   template (value) PDU_BSSGP ts_BSSGP_SUSPEND_ACK(GprsTlli tlli, RoutingAreaIdentification ra_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                       template (value) OCT1 susp_ref) := {</span><br><span style="color: hsl(120, 100%, 40%);">+          pDU_BSSGP_SUSPEND_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+                    bssgpPduType := '0C'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := ts_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                       suspend_Reference_Number := ts_BSSGP_SUSP_REF(susp_ref)</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     template PDU_BSSGP tr_BSSGP_SUSPEND_ACK(GprsTlli tlli, RoutingAreaIdentification ra_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                               template OCT1 susp_ref) := {</span><br><span style="color: hsl(120, 100%, 40%);">+          pDU_BSSGP_SUSPEND_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+                    bssgpPduType := '0C'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := tr_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                       suspend_Reference_Number := tr_BSSGP_SUSP_REF(susp_ref)</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   template (value) PDU_BSSGP ts_BSSGP_SUSPEND_NACK(GprsTlli tlli, RoutingAreaIdentification ra_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                       template (omit) BssgpCause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+               pDU_BSSGP_SUSPEND_NACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+                   bssgpPduType := '0D'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := ts_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                       cause := ts_BSSGP_CAUSE(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     template PDU_BSSGP tr_BSSGP_SUSPEND_NACK(GprsTlli tlli, RoutingAreaIdentification ra_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                              template BssgpCause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+               pDU_BSSGP_SUSPEND_NACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+                   bssgpPduType := '0D'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := tr_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                       cause := t_BSSGP_CAUSE(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+         }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       template (value) PDU_BSSGP ts_BSSGP_RESUME(GprsTlli tlli, RoutingAreaIdentification ra_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                               OCT1 susp_ref) := {</span><br><span style="color: hsl(120, 100%, 40%);">+                pDU_BSSGP_RESUME := {</span><br><span style="color: hsl(120, 100%, 40%);">+                 bssgpPduType := '0E'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := ts_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                       suspend_Reference_Number := ts_BSSGP_SUSP_REF(susp_ref)</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     template PDU_BSSGP tr_BSSGP_RESUME(template GprsTlli tlli, RoutingAreaIdentification ra_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                      template OCT1 susp_ref) := {</span><br><span style="color: hsl(120, 100%, 40%);">+               pDU_BSSGP_RESUME := {</span><br><span style="color: hsl(120, 100%, 40%);">+                 bssgpPduType := '0E'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := tr_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                       suspend_Reference_Number := tr_BSSGP_SUSP_REF(susp_ref)</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   template (value) PDU_BSSGP ts_BSSGP_RESUME_ACK(GprsTlli tlli, RoutingAreaIdentification ra_id)</span><br><span style="color: hsl(120, 100%, 40%);">+                := {</span><br><span style="color: hsl(120, 100%, 40%);">+          pDU_BSSGP_RESUME_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+                     bssgpPduType := '0F'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := ts_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id)</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     template PDU_BSSGP tr_BSSGP_RESUME_ACK(template GprsTlli tlli,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                RoutingAreaIdentification ra_id) := {</span><br><span style="color: hsl(120, 100%, 40%);">+         pDU_BSSGP_RESUME_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+                     bssgpPduType := '0F'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := tr_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id)</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   template (value) PDU_BSSGP ts_BSSGP_RESUME_NACK(GprsTlli tlli, RoutingAreaIdentification ra_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                               template (omit) BssgpCause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+                pDU_BSSGP_RESUME_NACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+                    bssgpPduType := '10'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := ts_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                       cause := ts_BSSGP_CAUSE(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     template PDU_BSSGP tr_BSSGP_RESUME_NACK(template GprsTlli tlli,</span><br><span style="color: hsl(120, 100%, 40%);">+                                               RoutingAreaIdentification ra_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                              template BssgpCause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+               pDU_BSSGP_RESUME_NACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+                    bssgpPduType := '10'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        tLLI := tr_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := ts_BSSGP_RA_ID(ra_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                       cause := t_BSSGP_CAUSE(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+         }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> </span><br><span> } with { encode "RAW" };</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13379">change 13379</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13379"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ife25401043d565e52a73206c562bbb68bcfdbafa </div>
<div style="display:none"> Gerrit-Change-Number: 13379 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>