[M] Change in osmo-ttcn3-hacks[master]: gsup: Add PCO IE

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

Change subject: gsup: Add PCO IE
..

gsup: Add PCO IE

This commit adds a new file PCO_Types.ttcn which allows generically
encoding decoding PCOs.

Change-Id: I9a1ae74712d6e8e0cd524ccd7fc2529b1a15dd97
---
M dia2gsup/gen_links.sh
M epdg/EPDG_Tests.ttcn
M epdg/gen_links.sh
M hlr/gen_links.sh
M library/GSUP_Templates.ttcn
M library/GSUP_Types.ttcn
A library/PCO_Types.ttcn
M msc/gen_links.sh
M selftest/gen_links.sh
M sgsn/gen_links.sh
10 files changed, 181 insertions(+), 8 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve




diff --git a/dia2gsup/gen_links.sh b/dia2gsup/gen_links.sh
index e343bd2..d653781 100755
--- a/dia2gsup/gen_links.sh
+++ b/dia2gsup/gen_links.sh
@@ -40,7 +40,7 @@
 FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn "
 FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc
 IPA_Emulation.ttcnpp "
-FILES+="GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "
+FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn 
"
 gen_links $DIR $FILES

 ignore_pp_results
diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn
index 2ad1b32..ff026cf 100644
--- a/epdg/EPDG_Tests.ttcn
+++ b/epdg/EPDG_Tests.ttcn
@@ -8,6 +8,7 @@
 import from DNS_Helpers all;

 import from IPA_Emulation all;
+import from PCO_Types all;
 import from GSUP_Types all;
 import from GSUP_Templates all;
 import from GSUP_Emulation all;
@@ -600,7 +601,8 @@
 /* GSUP TunnelEPDG Tunnel Req + Resp, triggers S2b CreateSession Req + 
Response. */
 private function f_GSUP_EPDGTunnel_success() runs on EPDG_ConnHdlr {
var GSUP_PDU rx_gsup;
-   GSUP.send(ts_GSUP_EPDGTunnel_REQ(g_pars.imsi));
+   var template (value) PCO_DATA pco := ts_PCO({ ts_PCO_P_DNS_IPv4, 
ts_PCO_P_PCSCF_IPv4 });
+   GSUP.send(ts_GSUP_EPDGTunnel_REQ(g_pars.imsi, pco));
as_GTP2C_CreateSession_success();
/* Expect a positive response back to the translator; */
var template (present) GSUP_IEs pdp_info := {
diff --git a/epdg/gen_links.sh b/epdg/gen_links.sh
index c8eadc8..f981586 100755
--- a/epdg/gen_links.sh
+++ b/epdg/gen_links.sh
@@ -46,7 +46,7 @@
 FILES+="DIAMETER_Templates.ttcn DIAMETER_rfc5447_Templates.ttcn 
DIAMETER_ts29_273_Templates.ttcn "
 FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc
 IPA_Emulation.ttcnpp "
-FILES+="GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "
+FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn 
"
 FILES+="GTPv2_PrivateExtensions.ttcn GTPv2_Templates.ttcn "
 FILES+="GTPv2_CodecPort.ttcn GTPv2_CodecPort_CtrlFunctDef.cc 
GTPv2_CodecPort_CtrlFunct.ttcn GTPv2_Emulation.ttcn "
 gen_links $DIR $FILES
diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh
index 52e01ba..e3a64d9 100755
--- a/hlr/gen_links.sh
+++ b/hlr/gen_links.sh
@@ -45,7 +45,7 @@

 DIR=../library
 FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn 
IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp "
-FILES+="GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "
+FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn 
"
 FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn 
Osmocom_CTRL_Adapter.ttcn "
 FILES+="Osmocom_VTY_Functions.ttcn "
 FILES+="SS_Templates.ttcn USSD_Helpers.ttcn "
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index 10c682c..d886088 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -17,6 +17,7 @@

 import from General_Types all;
 import from Osmocom_Types all;
+import from PCO_Types all;
 import from GSUP_Types all;

 function f_gsup_postprocess_decoded(inout GSUP_PDU gsup) {
@@ -292,6 +293,14 @@
}
 }

+template (value) GSUP_IE ts_GSUP_IE_PCO(template (value) PCO_DATA pco) := {
+   tag := OSMO_GSUP_PCO_IE,
+   len := 0,
+   val := {
+   pco := pco
+   }
+}
+
 template GSUP_PDU tr_GSUP(template GSUP_MessageType msgt := ?, template 
GSUP_IEs ies := *) := {
msg_type := msgt,
ies := ies
@@ -496,11 +505,13 @@

 /* EPDG Tunnel */
 template (value) GSUP_PDU ts_GSUP_EPDGTunnel_REQ(hexstring imsi,
+template (value) PCO_DATA pco,
 GSUP_Message_Class 
message_class := OSMO_GSUP_MESSAGE_CLASS_IPSEC_EPDG,
 GSUP_CnDomain dom := 
OSMO_GSUP_CN_DOMAIN_PS,
 template (omit) octetstring 
source_name := omit) :=

[M] Change in osmo-ttcn3-hacks[master]: gsup: Add PCO IE

2024-02-22 Thread pespin
Attention is currently required from: fixeria, lynxis lazus.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36049?usp=email )

Change subject: gsup: Add PCO IE
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36049?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: I9a1ae74712d6e8e0cd524ccd7fc2529b1a15dd97
Gerrit-Change-Number: 36049
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Thu, 22 Feb 2024 16:19:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: gsup: Add PCO IE

2024-02-22 Thread osmith
Attention is currently required from: fixeria, lynxis lazus, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36049?usp=email )

Change subject: gsup: Add PCO IE
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36049?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: I9a1ae74712d6e8e0cd524ccd7fc2529b1a15dd97
Gerrit-Change-Number: 36049
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Thu, 22 Feb 2024 11:29:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: gsup: Add PCO IE

2024-02-22 Thread laforge
Attention is currently required from: fixeria, lynxis lazus, osmith, pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36049?usp=email )

Change subject: gsup: Add PCO IE
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36049?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: I9a1ae74712d6e8e0cd524ccd7fc2529b1a15dd97
Gerrit-Change-Number: 36049
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Thu, 22 Feb 2024 10:19:42 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: gsup: Add PCO IE

2024-02-21 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36049?usp=email )


Change subject: gsup: Add PCO IE
..

gsup: Add PCO IE

This commit adds a new file PCO_Types.ttcn which allows generically
encoding decoding PCOs.

Change-Id: I9a1ae74712d6e8e0cd524ccd7fc2529b1a15dd97
---
M dia2gsup/gen_links.sh
M epdg/EPDG_Tests.ttcn
M epdg/gen_links.sh
M hlr/gen_links.sh
M library/GSUP_Templates.ttcn
M library/GSUP_Types.ttcn
A library/PCO_Types.ttcn
M msc/gen_links.sh
M selftest/gen_links.sh
M sgsn/gen_links.sh
10 files changed, 181 insertions(+), 8 deletions(-)



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

diff --git a/dia2gsup/gen_links.sh b/dia2gsup/gen_links.sh
index e343bd2..d653781 100755
--- a/dia2gsup/gen_links.sh
+++ b/dia2gsup/gen_links.sh
@@ -40,7 +40,7 @@
 FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn "
 FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc
 IPA_Emulation.ttcnpp "
-FILES+="GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "
+FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn 
"
 gen_links $DIR $FILES

 ignore_pp_results
diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn
index 2ad1b32..ff026cf 100644
--- a/epdg/EPDG_Tests.ttcn
+++ b/epdg/EPDG_Tests.ttcn
@@ -8,6 +8,7 @@
 import from DNS_Helpers all;

 import from IPA_Emulation all;
+import from PCO_Types all;
 import from GSUP_Types all;
 import from GSUP_Templates all;
 import from GSUP_Emulation all;
@@ -600,7 +601,8 @@
 /* GSUP TunnelEPDG Tunnel Req + Resp, triggers S2b CreateSession Req + 
Response. */
 private function f_GSUP_EPDGTunnel_success() runs on EPDG_ConnHdlr {
var GSUP_PDU rx_gsup;
-   GSUP.send(ts_GSUP_EPDGTunnel_REQ(g_pars.imsi));
+   var template (value) PCO_DATA pco := ts_PCO({ ts_PCO_P_DNS_IPv4, 
ts_PCO_P_PCSCF_IPv4 });
+   GSUP.send(ts_GSUP_EPDGTunnel_REQ(g_pars.imsi, pco));
as_GTP2C_CreateSession_success();
/* Expect a positive response back to the translator; */
var template (present) GSUP_IEs pdp_info := {
diff --git a/epdg/gen_links.sh b/epdg/gen_links.sh
index c8eadc8..f981586 100755
--- a/epdg/gen_links.sh
+++ b/epdg/gen_links.sh
@@ -46,7 +46,7 @@
 FILES+="DIAMETER_Templates.ttcn DIAMETER_rfc5447_Templates.ttcn 
DIAMETER_ts29_273_Templates.ttcn "
 FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc
 IPA_Emulation.ttcnpp "
-FILES+="GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "
+FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn 
"
 FILES+="GTPv2_PrivateExtensions.ttcn GTPv2_Templates.ttcn "
 FILES+="GTPv2_CodecPort.ttcn GTPv2_CodecPort_CtrlFunctDef.cc 
GTPv2_CodecPort_CtrlFunct.ttcn GTPv2_Emulation.ttcn "
 gen_links $DIR $FILES
diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh
index 52e01ba..e3a64d9 100755
--- a/hlr/gen_links.sh
+++ b/hlr/gen_links.sh
@@ -45,7 +45,7 @@

 DIR=../library
 FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn 
IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp "
-FILES+="GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "
+FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn 
"
 FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn 
Osmocom_CTRL_Adapter.ttcn "
 FILES+="Osmocom_VTY_Functions.ttcn "
 FILES+="SS_Templates.ttcn USSD_Helpers.ttcn "
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index 10c682c..d886088 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -17,6 +17,7 @@

 import from General_Types all;
 import from Osmocom_Types all;
+import from PCO_Types all;
 import from GSUP_Types all;

 function f_gsup_postprocess_decoded(inout GSUP_PDU gsup) {
@@ -292,6 +293,14 @@
}
 }

+template (value) GSUP_IE ts_GSUP_IE_PCO(template (value) PCO_DATA pco) := {
+   tag := OSMO_GSUP_PCO_IE,
+   len := 0,
+   val := {
+   pco := pco
+   }
+}
+
 template GSUP_PDU tr_GSUP(template GSUP_MessageType msgt := ?, template 
GSUP_IEs ies := *) := {
msg_type := msgt,
ies := ies
@@ -496,11 +505,13 @@

 /* EPDG Tunnel */
 template (value) GSUP_PDU ts_GSUP_EPDGTunnel_REQ(hexstring imsi,
+template (value) PCO_DATA pco,
 GSUP_Message_Class 
message_class := OSMO_GSUP_MESSAGE_CLASS_IPSEC_EPDG,
 GSUP_CnDomain dom := 
OSMO_GSUP_CN_DOMAIN_PS,
 template (omit) octetstring 
source_name := omit) :=
ts_GSUP(OSMO_GSUP_MSGT_EPDG_TUNNEL_REQUEST, f_gen_ts_ies(imsi,