<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26515">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">library/DIAMETER_Templates: prettify & enrich AIR/AIA templates<br><br>Change-Id: Iaf6472fecbadd58e86b78c59348d9924ab57f97d<br>Related: SYS#5602<br>---<br>M library/DIAMETER_Templates.ttcn<br>M mme/MME_Tests.ttcn<br>2 files changed, 51 insertions(+), 33 deletions(-)<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/15/26515/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn</span><br><span>index a70c59a..9271166 100644</span><br><span>--- a/library/DIAMETER_Templates.ttcn</span><br><span>+++ b/library/DIAMETER_Templates.ttcn</span><br><span>@@ -879,43 +879,60 @@</span><br><span> </span><br><span> </span><br><span> template (value) PDU_DIAMETER</span><br><span style="color: hsl(0, 100%, 40%);">-ts_DIA_AIR(template (value) UINT32 hbh_id, template (value) UINT32 ete_id,</span><br><span style="color: hsl(0, 100%, 40%);">-    template (value) octetstring sess_id,</span><br><span style="color: hsl(0, 100%, 40%);">-           template (value) charstring dest_realm, hexstring imsi)</span><br><span style="color: hsl(0, 100%, 40%);">-:= ts_DIAMETER(flags:='00000000'B, cmd_code:=Authentication_Information, hbh_id:=hbh_id, ete_id:=ete_id,</span><br><span style="color: hsl(0, 100%, 40%);">-      avps := {</span><br><span style="color: hsl(0, 100%, 40%);">-               ts_AVP_SessionId(sess_id),</span><br><span style="color: hsl(0, 100%, 40%);">-              ts_AVP_DestinationRealm(dest_realm),</span><br><span style="color: hsl(0, 100%, 40%);">-            ts_AVP_UserNameImsi(imsi),</span><br><span style="color: hsl(0, 100%, 40%);">-              /* Requested EUTRAN Auth Info */</span><br><span style="color: hsl(0, 100%, 40%);">-                ts_AVP_RequestedEutranAuthInfo,</span><br><span style="color: hsl(0, 100%, 40%);">-         ts_AVP_3GPP_VisitedPlmnId('11111F'O)</span><br><span style="color: hsl(120, 100%, 40%);">+ts_DIA_AIR(/* template (value) */ hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+          template (value) octetstring sess_id := c_def_sess_id,</span><br><span style="color: hsl(120, 100%, 40%);">+        template (value) charstring dest_realm := "localdomain",</span><br><span style="color: hsl(120, 100%, 40%);">+    template (value) UINT32 hbh_id := c_def_hbh_id,</span><br><span style="color: hsl(120, 100%, 40%);">+       template (value) UINT32 ete_id := c_def_ete_id) :=</span><br><span style="color: hsl(120, 100%, 40%);">+ ts_DIAMETER(flags := '00000000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+                 cmd_code := Authentication_Information,</span><br><span style="color: hsl(120, 100%, 40%);">+               hbh_id := hbh_id,</span><br><span style="color: hsl(120, 100%, 40%);">+             ete_id := ete_id,</span><br><span style="color: hsl(120, 100%, 40%);">+             avps := {</span><br><span style="color: hsl(120, 100%, 40%);">+                 ts_AVP_SessionId(sess_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                    ts_AVP_DestinationRealm(dest_realm),</span><br><span style="color: hsl(120, 100%, 40%);">+                  ts_AVP_UserNameImsi(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                    /* Requested EUTRAN Auth Info */</span><br><span style="color: hsl(120, 100%, 40%);">+                      ts_AVP_RequestedEutranAuthInfo,</span><br><span style="color: hsl(120, 100%, 40%);">+                       ts_AVP_3GPP_VisitedPlmnId('11111F'O)</span><br><span>         });</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> template (present) PDU_DIAMETER</span><br><span style="color: hsl(0, 100%, 40%);">-tr_DIA_AIR(hexstring imsi) := tr_DIAMETER(flags := '11000000'B, cmd_code:=Authentication_Information,</span><br><span style="color: hsl(0, 100%, 40%);">-                                       app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4),</span><br><span style="color: hsl(0, 100%, 40%);">- avps := superset(</span><br><span style="color: hsl(0, 100%, 40%);">-               tr_AVP_SessionId,</span><br><span style="color: hsl(0, 100%, 40%);">-               tr_AVP_DestinationRealm,</span><br><span style="color: hsl(0, 100%, 40%);">-                tr_AVP_UserNameImsi(imsi),</span><br><span style="color: hsl(0, 100%, 40%);">-              tr_AVP_3GPP_VisitedPlmnId</span><br><span style="color: hsl(120, 100%, 40%);">+tr_DIA_AIR(/* template (present) */ hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+           template (present) octetstring sess_id := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+          template (present) charstring dest_realm := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+        template (present) UINT32 hbh_id := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+        template (present) UINT32 ete_id := ?) :=</span><br><span style="color: hsl(120, 100%, 40%);">+  tr_DIAMETER(flags := '11000000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+                 cmd_code := Authentication_Information,</span><br><span style="color: hsl(120, 100%, 40%);">+               app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4),</span><br><span style="color: hsl(120, 100%, 40%);">+                 hbh_id := hbh_id, ete_id := ete_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                   avps := superset(</span><br><span style="color: hsl(120, 100%, 40%);">+                 tr_AVP_SessionId(sess_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                    tr_AVP_DestinationRealm(dest_realm),</span><br><span style="color: hsl(120, 100%, 40%);">+                  tr_AVP_UserNameImsi(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                    tr_AVP_3GPP_VisitedPlmnId</span><br><span>    ));</span><br><span> </span><br><span> /* TS 29.262 5.2.3.1 + 7.2.6 Authentication Information Answer */</span><br><span> template (value) PDU_DIAMETER</span><br><span style="color: hsl(0, 100%, 40%);">-ts_DIA_AIA(template (value) UINT32 hbh_id, template (value) UINT32 ete_id,</span><br><span style="color: hsl(0, 100%, 40%);">-    template (value) octetstring sess_id,</span><br><span style="color: hsl(0, 100%, 40%);">-           template (value) AVP_list auth_info_contents)</span><br><span style="color: hsl(0, 100%, 40%);">-:= ts_DIAMETER(flags:='01000000'B, cmd_code:=Authentication_Information,</span><br><span style="color: hsl(0, 100%, 40%);">-                app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), hbh_id:=hbh_id, ete_id:=ete_id,</span><br><span style="color: hsl(0, 100%, 40%);">-   avps := {</span><br><span style="color: hsl(0, 100%, 40%);">-               ts_AVP_SessionId(sess_id),</span><br><span style="color: hsl(0, 100%, 40%);">-              ts_AVP_ResultCode(DIAMETER_SUCCESS),</span><br><span style="color: hsl(0, 100%, 40%);">-            ts_AVP_AuthSessionState(NO_STATE_MAINTAINED),</span><br><span style="color: hsl(0, 100%, 40%);">-           ts_AVP_OriginHost("hss.localdomain"),</span><br><span style="color: hsl(0, 100%, 40%);">-         ts_AVP_OriginRealm("localdomain"),</span><br><span style="color: hsl(0, 100%, 40%);">-            ts_AVP_3GPP_AuthInfo(auth_info_contents)</span><br><span style="color: hsl(120, 100%, 40%);">+ts_DIA_AIA(template (value) AVP_list auth_info_contents,</span><br><span style="color: hsl(120, 100%, 40%);">+       template (value) octetstring sess_id := c_def_sess_id,</span><br><span style="color: hsl(120, 100%, 40%);">+        template (value) charstring orig_host := "hss.localdomain",</span><br><span style="color: hsl(120, 100%, 40%);">+         template (value) charstring orig_realm := "localdomain",</span><br><span style="color: hsl(120, 100%, 40%);">+    template (value) UINT32 hbh_id := c_def_hbh_id,</span><br><span style="color: hsl(120, 100%, 40%);">+       template (value) UINT32 ete_id := c_def_ete_id) :=</span><br><span style="color: hsl(120, 100%, 40%);">+ ts_DIAMETER(flags := '01000000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+                 cmd_code := Authentication_Information,</span><br><span style="color: hsl(120, 100%, 40%);">+               app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4),</span><br><span style="color: hsl(120, 100%, 40%);">+                 hbh_id := hbh_id,</span><br><span style="color: hsl(120, 100%, 40%);">+             ete_id := ete_id,</span><br><span style="color: hsl(120, 100%, 40%);">+             avps := {</span><br><span style="color: hsl(120, 100%, 40%);">+                 ts_AVP_SessionId(sess_id),</span><br><span style="color: hsl(120, 100%, 40%);">+                    ts_AVP_ResultCode(DIAMETER_SUCCESS),</span><br><span style="color: hsl(120, 100%, 40%);">+                  ts_AVP_AuthSessionState(NO_STATE_MAINTAINED),</span><br><span style="color: hsl(120, 100%, 40%);">+                 ts_AVP_OriginHost(orig_host),</span><br><span style="color: hsl(120, 100%, 40%);">+                 ts_AVP_OriginRealm(orig_realm),</span><br><span style="color: hsl(120, 100%, 40%);">+                       ts_AVP_3GPP_AuthInfo(auth_info_contents)</span><br><span>     });</span><br><span> </span><br><span> </span><br><span>diff --git a/mme/MME_Tests.ttcn b/mme/MME_Tests.ttcn</span><br><span>index 2140971..375a66a 100644</span><br><span>--- a/mme/MME_Tests.ttcn</span><br><span>+++ b/mme/MME_Tests.ttcn</span><br><span>@@ -483,8 +483,9 @@</span><br><span>               /* compute tuple */</span><br><span>          auth_info_content := { ts_AVP_EutranVec(1, '20080c3818183b522614162c07601d0d'O, '6a91970e838fd079'O, 'f11b89a2a8be00001f9c526f3d75d44c'O, '95AFAD9A0D29AFAA079A9451DF7161D7EE4CBF2AF9387F766D058BB6B44B905D'O) };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-           DIAMETER.send(ts_DIA_AIA(rx_dia.hop_by_hop_id, rx_dia.end_to_end_id,</span><br><span style="color: hsl(0, 100%, 40%);">-                                     sess_id, auth_info_content));</span><br><span style="color: hsl(120, 100%, 40%);">+                DIAMETER.send(ts_DIA_AIA(auth_info_content, sess_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                   hbh_id := rx_dia.hop_by_hop_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                       ete_id := rx_dia.end_to_end_id));</span><br><span>   }</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26515">change 26515</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/c/osmo-ttcn3-hacks/+/26515"/><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-Change-Id: Iaf6472fecbadd58e86b78c59348d9924ab57f97d </div>
<div style="display:none"> Gerrit-Change-Number: 26515 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>