Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-16 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 7:

(1 comment)

Patchset:

PS5:
> you appear to have fixed ctags meanwhile. […]
https://github.com/universal-ctags/ctags/pull/3456

I wouldn't say "never" and see a tradeoff between effort and benefit. So far i 
didn't see the benefit of template restrictions, but after you made it clear 
that the restrictions are important the tradeoff shifted to submitting a PR.

It was easier than I thought and I'm very glad that u-ctags now tags all of the 
restricted templates everywhere, so happy end =)



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 7
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 16 Aug 2022 13:42:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-16 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..

add library/PFCP_*, deps/PFCP

Will soon be used by new subdir 'upf' (test osmo-upf),
and by 'hnbgw' (test GTP mapping via UPF).

Related: SYS#5599
Change-Id: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
---
M deps/Makefile
M library/General_Types.ttcn
A library/PFCP_CodecPort.ttcn
A library/PFCP_CodecPort_CtrlFunct.ttcn
A library/PFCP_CodecPort_CtrlFunctDef.cc
A library/PFCP_Emulation.ttcn
A library/PFCP_Templates.ttcn
7 files changed, 926 insertions(+), 0 deletions(-)

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



diff --git a/deps/Makefile b/deps/Makefile
index 2a906eb..f284f69 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -47,6 +47,7 @@
titan.ProtocolModules.NS_v7.3.0 \
titan.ProtocolModules.SGsAP_13.2.0 \
titan.ProtocolModules.SNDCP_v7.0.0 \
+   titan.ProtocolModules.PFCP_v15.1.0 \
titan.TestPorts.Common_Components.Socket-API \
titan.TestPorts.Common_Components.Abstract_Socket \
titan.TestPorts.HTTPmsg \
@@ -111,6 +112,7 @@
 titan.ProtocolModules.SUA_commit=  R.5.A-5-gcf1137a
 titan.ProtocolModules.TCP_commit=  R.3.A-5-g39e5f45
 titan.ProtocolModules.UDP_commit=  R.4.A-5-geea8aa3
+titan.ProtocolModules.PFCP_v15.1.0_commit= 
d550ad9ddb6f9c823c9a555254cd76cf0e738d18
 titan.TestPorts.AF_PACKET_commit=  0.1-5-g89ebea6
 titan.TestPorts.Common_Components.Socket-API_commit=   R.6.A-6-gf4380d0
 titan.TestPorts.Common_Components.Abstract_Socket_commit=  R.9.B-4-gbd41994
diff --git a/library/General_Types.ttcn b/library/General_Types.ttcn
index 9a8489f..c818313 100644
--- a/library/General_Types.ttcn
+++ b/library/General_Types.ttcn
@@ -286,6 +286,7 @@
   type integer LIN2_BO_LAST (0..65535) with { variant "FIELDLENGTH(16), 
COMP(nosign), BYTEORDER(last)" };
   type integer LIN3_BO_LAST (0..16777215) with { variant "FIELDLENGTH(24), 
COMP(nosign), BYTEORDER(last)" };
   type integer LIN4_BO_LAST (0..4294967295) with { variant "FIELDLENGTH(32), 
COMP(nosign), BYTEORDER(last)" };
+  type integer LIN8_BO_LAST (0..18446744073709551616) with { variant 
"FIELDLENGTH(64), COMP(nosign), BYTEORDER(last)" };

   //integer with fixed bit number
   type integer INT1b (0..1) with { variant "FIELDLENGTH(1)" };
diff --git a/library/PFCP_CodecPort.ttcn b/library/PFCP_CodecPort.ttcn
new file mode 100644
index 000..8d4078d
--- /dev/null
+++ b/library/PFCP_CodecPort.ttcn
@@ -0,0 +1,56 @@
+/* dual-faced port sitting on top of IPL4_asp UDP to encode/decode PFCP
+ *
+ * (C) 2022 sysmocom - s.f.m.c. GmbH 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+module PFCP_CodecPort {
+
+import from IPL4asp_PortType all;
+import from IPL4asp_Types all;
+import from PFCP_Types all;
+
+/* identifies a remote peer (sender or receiver) */
+type record PFCP_Peer {
+   ConnectionId conn_id,
+   HostName remote_name,
+   PortNumber remote_port
+}
+
+type record PFCP_Unitdata {
+   PFCP_Peer peer,
+   PDU_PFCP pdu
+}
+
+/* Translation port on top of IPL4asp; ASP_Event passed through transparently 
*/
+type port PFCP_PT message {
+   out PFCP_Unitdata;
+   in PFCP_Unitdata,
+  ASP_ConnId_ReadyToRelease,
+  ASP_Event;
+} with { extension "user IPL4asp_PT
+   out(PFCP_Unitdata -> ASP_SendTo: function(f_enc_pfcp_unitdata))
+   in(ASP_RecvFrom -> PFCP_Unitdata: function(f_dec_pfcp_unitdata);
+  ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple;
+  ASP_Event -> ASP_Event: simple)" }
+
+private function f_enc_pfcp_unitdata(in PFCP_Unitdata in_ud, out ASP_SendTo 
out_ud) {
+   out_ud.connId := in_ud.peer.conn_id;
+   out_ud.remName := in_ud.peer.remote_name;
+   out_ud.remPort := in_ud.peer.remote_port;
+   out_ud.proto := { udp := {} };
+   out_ud.msg := enc_PDU_PFCP(in_ud.pdu);
+} with { extension "prototype(fast)" };
+
+private function f_dec_pfcp_unitdata(in ASP_RecvFrom in_ud, out PFCP_Unitdata 
out_ud) {
+   out_ud.peer.conn_id := in_ud.connId;
+   out_ud.peer.remote_name := in_ud.remName;
+   out_ud.peer.remote_port := in_ud.remPort;
+   out_ud.pdu := dec_PDU_PFCP(in_ud.msg);
+} with { extension "prototype(fast)" };
+
+}
diff --git a/library/PFCP_CodecPort_CtrlFunct.ttcn 
b/library/PFCP_CodecPort_CtrlFunct.ttcn
new file mode 100644
index 000..bd6af4b
--- /dev/null
+++ b/library/PFCP_CodecPort_CtrlFunct.ttcn
@@ -0,0 +1,43 @@
+module PFCP_CodecPort_CtrlFunct {
+

Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-12 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 6: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 6
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Fri, 12 Aug 2022 11:51:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-12 Thread laforge
Attention is currently required from: neels.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 6: Code-Review+1

(1 comment)

Patchset:

PS5:
> my s/ rule missed quite a few of them in the last patch set, […]
you appear to have fixed ctags meanwhile.  And just to re-iterate, in general: 
Whatever bugs in 3rd party tooling should never influence us in a way to write 
less correct/constrained code.  Particularl if said 3rd party tools are open 
source and can be fixed.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 6
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Fri, 12 Aug 2022 11:01:41 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-11 Thread neels
Attention is currently required from: neels, laforge.
Hello Jenkins Builder, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817

to look at the new patch set (#6).

Change subject: add library/PFCP_*, deps/PFCP
..

add library/PFCP_*, deps/PFCP

Will soon be used by new subdir 'upf' (test osmo-upf),
and by 'hnbgw' (test GTP mapping via UPF).

Related: SYS#5599
Change-Id: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
---
M deps/Makefile
M library/General_Types.ttcn
A library/PFCP_CodecPort.ttcn
A library/PFCP_CodecPort_CtrlFunct.ttcn
A library/PFCP_CodecPort_CtrlFunctDef.cc
A library/PFCP_Emulation.ttcn
A library/PFCP_Templates.ttcn
7 files changed, 926 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/17/28817/6
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 6
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-10 Thread pespin
Attention is currently required from: neels, laforge.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 5:

(1 comment)

File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/31dfc23b_8d0ae9d4
PS4, Line 188:  var template PDU_PFCP t := ts_PDU_PFCP();
> template (value)
THis has not yet been resolved.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 10 Aug 2022 13:49:27 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-10 Thread neels
Attention is currently required from: pespin.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 5:

(1 comment)

Patchset:

PS5:
my s/ rule missed quite a few of them in the last patch set,
i've put all possible modifiers for templates now, afaict.

In other news, i already find it annoying as hell that my ctags jumps no longer 
work for PFCP templates :/ guess i need to do universal-ctags hacking



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 10 Aug 2022 12:12:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-10 Thread neels
Attention is currently required from: neels, pespin.
Hello Jenkins Builder, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817

to look at the new patch set (#5).

Change subject: add library/PFCP_*, deps/PFCP
..

add library/PFCP_*, deps/PFCP

Will soon be used by new subdir 'upf' (test osmo-upf),
and by 'hnbgw' (test GTP mapping via UPF).

Related: SYS#5599
Change-Id: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
---
M deps/Makefile
M library/General_Types.ttcn
A library/PFCP_CodecPort.ttcn
A library/PFCP_CodecPort_CtrlFunct.ttcn
A library/PFCP_CodecPort_CtrlFunctDef.cc
A library/PFCP_Emulation.ttcn
A library/PFCP_Templates.ttcn
7 files changed, 926 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/17/28817/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-08 Thread laforge
Attention is currently required from: neels, pespin.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 4:

(5 comments)

File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/42166368_8c294574
PS1, Line 460: function tr_PFCP_Session_Est_Resp(template OCT8 hdr_seid := ?) 
return template PDU_PFCP {
> Can it be "omit"? then "template (omit)", otherwise "template (present)". […]
unresolved. both for the argument and for the return type


File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/e123c505_a0dc470b
PS4, Line 187: function ts_PFCP_Assoc_Release_Req(template (value) Node_ID 
node_id) return template PDU_PFCP {
return template (value) ?


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/c88f0463_767a499f
PS4, Line 188:  var template PDU_PFCP t := ts_PDU_PFCP();
template (value)


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/37f09e41_bf5eb2a5
PS4, Line 198: function tr_PFCP_Assoc_Release_Resp(template Node_ID node_id := 
?, template Cause cause := ?) return template PDU_PFCP {
return template (present) ?


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/0853a02f_0abd68a4
PS4, Line 440: function tr_PFCP_Session_Est_Req() return template PDU_PFCP {
template (present) here for the tr_ case?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 08 Aug 2022 19:59:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-08 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 4:

(1 comment)

File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/e71527d3_9ab277dd
PS4, Line 82: template (present) Recovery_Time_Stamp 
tr_PFCP_Recovery_Timestamp(template LIN4_BO_LAST time_value := ?) := {
"template (present) LIN4_BO_LAST time_value := ?" because I don't think it can 
be ommited here right?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Mon, 08 Aug 2022 15:57:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-08 Thread neels
Attention is currently required from: neels, pespin.
Hello Jenkins Builder, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817

to look at the new patch set (#4).

Change subject: add library/PFCP_*, deps/PFCP
..

add library/PFCP_*, deps/PFCP

Will soon be used by new subdir 'upf' (test osmo-upf),
and by 'hnbgw' (test GTP mapping via UPF).

Related: SYS#5599
Change-Id: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
---
M deps/Makefile
M library/General_Types.ttcn
A library/PFCP_CodecPort.ttcn
A library/PFCP_CodecPort_CtrlFunct.ttcn
A library/PFCP_CodecPort_CtrlFunctDef.cc
A library/PFCP_Emulation.ttcn
A library/PFCP_Templates.ttcn
7 files changed, 921 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/17/28817/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-01 Thread laforge
Attention is currently required from: neels, pespin.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 3: Code-Review-1

(3 comments)

Patchset:

PS3:
IMHO the (value|omit) template designators are mandatory.  We use them 
everywhere, except maybe code written in the first few months of TTCN-3 usage 
in Osmocom, when we didn't understand them yet.


File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/244062b0_ec1aed18
PS1, Line 18: type enumerated e_PFCP_Cause {
> I thought it was in our library/ dir, then it's fine you can keep it in 
> Templates.
Done


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/dc716423_016239e1
PS1, Line 418: function ts_PFCP_Session_Est_Req(charstring node_id, OCT8 
cp_seid, Create_PDR_list create_pdr, Create_FAR_list create_far) return 
template PDU_PFCP {
> marking as (value) means you cannot pass a template containing a field which 
> is not set to a value,  […]
I agree that those annotations are a very useful tool and allow to detect a 
number of issues already at compile time, which otherwise are only caught at 
runtime (if at all).  Just like the use of "const" in C, or the use of type 
annotations in python.

There are good reasons to use them, and hence we use all of the above, in the 
respective language.  Nobody has ever started to debate about it until this 
discussion here.

Another way to think of it is something like "compile-time invariant checks", 
if that helps.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 01 Aug 2022 09:54:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-08-01 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 3:

(3 comments)

File library/PFCP_CodecPort_CtrlFunct.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/76f2f4d3_d3956eee
PS1, Line 7:   inout PFCP_PT portRef,
> yes, i most definitely copied it, because i would not have had a clue how to 
> structure a new kind of […]
Ack


File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/bfea1ff6_5ca44a9e
PS1, Line 18: type enumerated e_PFCP_Cause {
> was going to move now but noticed that PFCP_Types.ttcn is from 
> deps/titan.ProtocolModules.PFCP_v15. […]
I thought it was in our library/ dir, then it's fine you can keep it in 
Templates.


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/1c12fe40_6612d603
PS1, Line 418: function ts_PFCP_Session_Est_Req(charstring node_id, OCT8 
cp_seid, Create_PDR_list create_pdr, Create_FAR_list create_far) return 
template PDU_PFCP {
> honestly i'd like to know. i don't see constrictions nor errors with these 
> templates. […]
marking as (value) means you cannot pass a template containing a field which is 
not set to a value, aka ? or *, which means the compiler shouldn't allow you 
passing a tr_ template in there.

Similarly, (present) prevents people from passing omit to a function not 
expecting it. Furthermore, it clarifies to the reader what is expected to be 
passed there. This kinda "nullable" mark some languages have, which allows 
knowing whether passing a null pointer is accepted or not.

Having correct restrictions properly written also translate to work hours spent 
by all others.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Mon, 01 Aug 2022 09:38:15 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-30 Thread neels
Attention is currently required from: pespin.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 3:

(1 comment)

File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/466a9b10_0587a3d8
PS1, Line 18: type enumerated e_PFCP_Cause {
> I disagree, having a _Types file it should go there.
was going to move now but noticed that PFCP_Types.ttcn is from 
deps/titan.ProtocolModules.PFCP_v15.1.0/
so it's upstream code.

these types are only there for use with the templates, i hope you're not making 
me create a PFCP_Types2.ttcn for these?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Sat, 30 Jul 2022 20:04:57 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-30 Thread neels
Attention is currently required from: pespin.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 3:

(1 comment)

File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/8084122f_59b53b72
PS1, Line 418: function ts_PFCP_Session_Est_Req(charstring node_id, OCT8 
cp_seid, Create_PDR_list create_pdr, Create_FAR_list create_far) return 
template PDU_PFCP {
> I'm sorry but your personal tooling is not an acceptable motivation to avoid 
> specifying template typ […]
honestly i'd like to know. i don't see constrictions nor errors with these 
templates.
i still don't understand the benefit. does someone have examples where a 
(value) and where a (present) actually improves usage of a template?

(also i find my tooling pretty important, since it translates to work hours our 
employer actually pays me)



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Sat, 30 Jul 2022 19:56:38 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-28 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 3:

(2 comments)

File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/377dd1d4_ffb79257
PS1, Line 418: function ts_PFCP_Session_Est_Req(charstring node_id, OCT8 
cp_seid, Create_PDR_list create_pdr, Create_FAR_list create_far) return 
template PDU_PFCP {
> the thing that annoys me there is that universal-ctags in general does a good 
> job of taging ttcn3, b […]
I'm sorry but your personal tooling is not an acceptable motivation to avoid 
specifying template types properly, which affects everybody else.

It shows a lot of errors and also makes stuff more difficult when using them 
due to constrictions.
Think of it as if it was a const pointer mark, or a nullable pointer mark.


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/25670c34_8ea44096
PS1, Line 460: function tr_PFCP_Session_Est_Resp(template OCT8 hdr_seid := ?) 
return template PDU_PFCP {
> why?
Can it be "omit"? then "template (omit)", otherwise "template (present)". You 
see, they serve to actually provide information on what can be passed to it.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Thu, 28 Jul 2022 14:43:29 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-28 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 3:

(1 comment)

File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/82079d4c_7ad9dccc
PS1, Line 18: type enumerated e_PFCP_Cause {
> i put them directly above the template using them, because that's the only 
> place using it. […]
I disagree, having a _Types file it should go there.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Thu, 28 Jul 2022 14:38:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-28 Thread neels
Attention is currently required from: pespin.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 3:

(2 comments)

File library/Osmocom_VTY_Functions.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/aa441db6_ebe49d65
PS1, Line 247: type record of charstring StrList;
> oh wait, this patch isn't even using this
Done


File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/187b72ea_47779371
PS1, Line 460: function tr_PFCP_Session_Est_Resp(template OCT8 hdr_seid := ?) 
return template PDU_PFCP {
> template (present) OCT8 hdr_seid
why?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 28 Jul 2022 14:03:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-28 Thread neels
Attention is currently required from: pespin.
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 3:

(4 comments)

File library/Osmocom_VTY_Functions.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/6b08e191_1d2e6b53
PS1, Line 247: type record of charstring StrList;
> You may be probably reusing this for something no VTY related? then maybe 
> move it to another module  […]
oh wait, this patch isn't even using this


File library/PFCP_CodecPort_CtrlFunct.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/08125310_038b1bcf
PS1, Line 7:   inout PFCP_PT portRef,
> did you copy this? indentation looks weird.
yes, i most definitely copied it, because i would not have had a clue how to 
structure a new kind of port. maybe from MGCP or RSL, don't remember which 
exactly.

i guess it would be an idea to fix the whitespace... at first i was just happy 
that it worked at all


File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/805c91e5_37e530cb
PS1, Line 18: type enumerated e_PFCP_Cause {
> You could move some of these into PFCP_Types. […]
i put them directly above the template using them, because that's the only 
place using it. makes sense to move it to *Types.ttcn as soon as it is a more 
generally useful type, but for now can stay here, agree?


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/ca8feda7_4d035b8c
PS1, Line 418: function ts_PFCP_Session_Est_Req(charstring node_id, OCT8 
cp_seid, Create_PDR_list create_pdr, Create_FAR_list create_far) return 
template PDU_PFCP {
> Please improve the scope of template types. […]
the thing that annoys me there is that universal-ctags in general does a good 
job of taging ttcn3, but fails to tag functions with such (value) or (present) 
directives. so i can easily navigate the code as long as those things are not 
there, as soon as it says '(value)' i have to start grepping manually and copy 
paste file paths and line numbers. that's my personal motivation to keep those 
keywords away for as long as i can.

And also I do not notice any functional/semantic difference at all! i don't 
understand why those directives should be added, how does it help, what is the 
point i am missing?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 28 Jul 2022 14:00:05 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-28 Thread neels
Attention is currently required from: neels.
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817

to look at the new patch set (#3).

Change subject: add library/PFCP_*, deps/PFCP
..

add library/PFCP_*, deps/PFCP

Will soon be used by new subdir 'upf' (test osmo-upf),
and by 'hnbgw' (test GTP mapping via UPF).

Related: SYS#5599
Change-Id: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
---
M deps/Makefile
M library/General_Types.ttcn
A library/PFCP_CodecPort.ttcn
A library/PFCP_CodecPort_CtrlFunct.ttcn
A library/PFCP_CodecPort_CtrlFunctDef.cc
A library/PFCP_Emulation.ttcn
A library/PFCP_Templates.ttcn
7 files changed, 919 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/17/28817/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-28 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 2:

(1 comment)

File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/8f11044c_bc3d4d2a
PS1, Line 18: type enumerated e_PFCP_Cause {
> You could move some of these into PFCP_Types. […]
Not resolved (any of my comments in this file).



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Thu, 28 Jul 2022 11:31:32 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-28 Thread neels
Attention is currently required from: neels.
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817

to look at the new patch set (#2).

Change subject: add library/PFCP_*, deps/PFCP
..

add library/PFCP_*, deps/PFCP

Will soon be used by new subdir 'upf' (test osmo-upf),
and by 'hnbgw' (test GTP mapping via UPF).

Related: SYS#5599
Change-Id: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
---
M deps/Makefile
M library/General_Types.ttcn
A library/PFCP_CodecPort.ttcn
A library/PFCP_CodecPort_CtrlFunct.ttcn
A library/PFCP_CodecPort_CtrlFunctDef.cc
A library/PFCP_Emulation.ttcn
A library/PFCP_Templates.ttcn
7 files changed, 910 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/17/28817/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-27 Thread pespin
Attention is currently required from: neels.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )

Change subject: add library/PFCP_*, deps/PFCP
..


Patch Set 1:

(5 comments)

File library/Osmocom_VTY_Functions.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/3b9498ad_d441b80f
PS1, Line 247: type record of charstring StrList;
You may be probably reusing this for something no VTY related? then maybe move 
it to another module actually aimed at providing types?


File library/PFCP_CodecPort_CtrlFunct.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/98d16bbb_a6a2ad25
PS1, Line 7:   inout PFCP_PT portRef,
did you copy this? indentation looks weird.


File library/PFCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/1368050c_8d56071b
PS1, Line 18: type enumerated e_PFCP_Cause {
You could move some of these into PFCP_Types.ttcn


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/79d5a3d0_ec6f5fb0
PS1, Line 418: function ts_PFCP_Session_Est_Req(charstring node_id, OCT8 
cp_seid, Create_PDR_list create_pdr, Create_FAR_list create_far) return 
template PDU_PFCP {
Please improve the scope of template types.
ts_* -> "template (value)"
tr_* -> "template (present)"


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/5a13e485_f10635e7
PS1, Line 460: function tr_PFCP_Session_Est_Resp(template OCT8 hdr_seid := ?) 
return template PDU_PFCP {
template (present) OCT8 hdr_seid



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 27 Jul 2022 14:48:26 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: add library/PFCP_*, deps/PFCP

2022-07-27 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )


Change subject: add library/PFCP_*, deps/PFCP
..

add library/PFCP_*, deps/PFCP

Will soon be used by new subdir 'upf' (test osmo-upf),
and by 'hnbgw' (test GTP mapping via UPF).

Related: SYS#5599
Change-Id: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
---
M deps/Makefile
M library/General_Types.ttcn
M library/Osmocom_VTY_Functions.ttcn
A library/PFCP_CodecPort.ttcn
A library/PFCP_CodecPort_CtrlFunct.ttcn
A library/PFCP_CodecPort_CtrlFunctDef.cc
A library/PFCP_Emulation.ttcn
A library/PFCP_Templates.ttcn
8 files changed, 911 insertions(+), 1 deletion(-)



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

diff --git a/deps/Makefile b/deps/Makefile
index 2a906eb..f284f69 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -47,6 +47,7 @@
titan.ProtocolModules.NS_v7.3.0 \
titan.ProtocolModules.SGsAP_13.2.0 \
titan.ProtocolModules.SNDCP_v7.0.0 \
+   titan.ProtocolModules.PFCP_v15.1.0 \
titan.TestPorts.Common_Components.Socket-API \
titan.TestPorts.Common_Components.Abstract_Socket \
titan.TestPorts.HTTPmsg \
@@ -111,6 +112,7 @@
 titan.ProtocolModules.SUA_commit=  R.5.A-5-gcf1137a
 titan.ProtocolModules.TCP_commit=  R.3.A-5-g39e5f45
 titan.ProtocolModules.UDP_commit=  R.4.A-5-geea8aa3
+titan.ProtocolModules.PFCP_v15.1.0_commit= 
d550ad9ddb6f9c823c9a555254cd76cf0e738d18
 titan.TestPorts.AF_PACKET_commit=  0.1-5-g89ebea6
 titan.TestPorts.Common_Components.Socket-API_commit=   R.6.A-6-gf4380d0
 titan.TestPorts.Common_Components.Abstract_Socket_commit=  R.9.B-4-gbd41994
diff --git a/library/General_Types.ttcn b/library/General_Types.ttcn
index 9a8489f..c818313 100644
--- a/library/General_Types.ttcn
+++ b/library/General_Types.ttcn
@@ -286,6 +286,7 @@
   type integer LIN2_BO_LAST (0..65535) with { variant "FIELDLENGTH(16), 
COMP(nosign), BYTEORDER(last)" };
   type integer LIN3_BO_LAST (0..16777215) with { variant "FIELDLENGTH(24), 
COMP(nosign), BYTEORDER(last)" };
   type integer LIN4_BO_LAST (0..4294967295) with { variant "FIELDLENGTH(32), 
COMP(nosign), BYTEORDER(last)" };
+  type integer LIN8_BO_LAST (0..18446744073709551616) with { variant 
"FIELDLENGTH(64), COMP(nosign), BYTEORDER(last)" };

   //integer with fixed bit number
   type integer INT1b (0..1) with { variant "FIELDLENGTH(1)" };
diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index e4a9182..be32d2c 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -244,7 +244,7 @@
return count;
 }

-private type record of charstring StrList;
+type record of charstring StrList;

 /* Perform a 'show talloc-context' to get a count of the given object_strs 
that are still allocated.
  * Retry 'attempts' times until the actual talloc object count matches 
'expect_count'.
diff --git a/library/PFCP_CodecPort.ttcn b/library/PFCP_CodecPort.ttcn
new file mode 100644
index 000..8d4078d
--- /dev/null
+++ b/library/PFCP_CodecPort.ttcn
@@ -0,0 +1,56 @@
+/* dual-faced port sitting on top of IPL4_asp UDP to encode/decode PFCP
+ *
+ * (C) 2022 sysmocom - s.f.m.c. GmbH 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+module PFCP_CodecPort {
+
+import from IPL4asp_PortType all;
+import from IPL4asp_Types all;
+import from PFCP_Types all;
+
+/* identifies a remote peer (sender or receiver) */
+type record PFCP_Peer {
+   ConnectionId conn_id,
+   HostName remote_name,
+   PortNumber remote_port
+}
+
+type record PFCP_Unitdata {
+   PFCP_Peer peer,
+   PDU_PFCP pdu
+}
+
+/* Translation port on top of IPL4asp; ASP_Event passed through transparently 
*/
+type port PFCP_PT message {
+   out PFCP_Unitdata;
+   in PFCP_Unitdata,
+  ASP_ConnId_ReadyToRelease,
+  ASP_Event;
+} with { extension "user IPL4asp_PT
+   out(PFCP_Unitdata -> ASP_SendTo: function(f_enc_pfcp_unitdata))
+   in(ASP_RecvFrom -> PFCP_Unitdata: function(f_dec_pfcp_unitdata);
+  ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple;
+  ASP_Event -> ASP_Event: simple)" }
+
+private function f_enc_pfcp_unitdata(in PFCP_Unitdata in_ud, out ASP_SendTo 
out_ud) {
+   out_ud.connId := in_ud.peer.conn_id;
+   out_ud.remName := in_ud.peer.remote_name;
+   out_ud.remPort := in_ud.peer.remote_port;
+   out_ud.proto := { udp := {} };
+   out_ud.msg := enc_PDU_PFCP(in_ud.pdu);
+} with { extension "prototype(fast)" };
+
+private function f_dec_pfcp_unitdata(in ASP_RecvFrom in_ud, out