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


Change subject: library/pfcp: Support passing CP/UP Function Features to Assoc 
Setup helpers
......................................................................

library/pfcp: Support passing CP/UP Function Features to Assoc Setup helpers

For instance open5gs-smfd expects the UPF to support FTUP (F-TEID
allocation at the UPF), and otherwise logs a warning.

Change-Id: I8d74d56e3a602890f2559abbc671bfa3ee3c6e0d
---
M library/PFCP_Emulation.ttcn
M library/PFCP_Templates.ttcn
2 files changed, 129 insertions(+), 10 deletions(-)



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

diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn
index 2471faf..857a6da 100644
--- a/library/PFCP_Emulation.ttcn
+++ b/library/PFCP_Emulation.ttcn
@@ -418,7 +418,9 @@
 function f_pfcp_wait_assoc_setup_req(template (value) Node_ID local_node_id,
                                     boolean fail_timeout := true,
                                     boolean fail_rx_others := true,
-                                    float wait_timeout := 16.0) runs on 
PFCP_ConnHdlr {
+                                    float wait_timeout := 16.0,
+                                    template (omit) UP_Function_Features 
up_function_features := omit,
+                                    template (omit) CP_Function_Features 
cp_function_features := omit) runs on PFCP_ConnHdlr {
        var PDU_PFCP m;
        timer T := wait_timeout;
        var integer rts := f_PFCPEM_get_recovery_timestamp();
@@ -431,7 +433,9 @@
                        PFCP.send(ts_PFCP_Assoc_Setup_Resp(m.sequence_number,
                                                           local_node_id,
                                                           
ts_PFCP_Cause(REQUEST_ACCEPTED),
-                                                          rts));
+                                                          rts,
+                                                          up_function_features 
:= up_function_features,
+                                                          cp_function_features 
:= cp_function_features));
                        setverdict(pass);
                }
        [fail_rx_others] PFCP.receive(PDU_PFCP:?) -> value m {
@@ -455,7 +459,9 @@
 function f_pfcp_force_assoc_setup_req(template (value) Node_ID local_node_id,
                                      boolean fail_timeout := true,
                                      boolean fail_rx_others := true,
-                                     float wait_timeout := 16.0)
+                                     float wait_timeout := 16.0,
+                                     template (omit) UP_Function_Features 
up_function_features := omit,
+                                     template (omit) CP_Function_Features 
cp_function_features := omit)
 runs on PFCP_ConnHdlr {
        var boolean rx_hb_resp := false;
        var boolean rx_assoc_setup_req := false;
@@ -480,7 +486,9 @@
                PFCP.send(ts_PFCP_Assoc_Setup_Resp(m.sequence_number,
                                                   local_node_id,
                                                   
ts_PFCP_Cause(REQUEST_ACCEPTED),
-                                                  rts));
+                                                  rts,
+                                                  up_function_features := 
up_function_features,
+                                                  cp_function_features := 
cp_function_features));
                if (not rx_hb_resp) {
                        repeat;
                }
diff --git a/library/PFCP_Templates.ttcn b/library/PFCP_Templates.ttcn
index 0726fd2..5e2ea77 100644
--- a/library/PFCP_Templates.ttcn
+++ b/library/PFCP_Templates.ttcn
@@ -1,4 +1,4 @@
-/* PFCP Templates in TTCN-3
+/* PFCP Templates in TTCN-3, (3GPP TS 29.244)
  * (C) 2022 sysmocom - s.f.m.c. GmbH <[email protected]>
  * All rights reserved.
  *
@@ -72,7 +72,8 @@
        node_id_value := id_value
 };

-/* t_PFCP_Node_ID_IPv4(f_inet_addr("127.0.0.1")) */
+/* 8.2.38 Node ID
+ * t_PFCP_Node_ID_IPv4(f_inet_addr("127.0.0.1")) */
 template (value) Node_ID
 ts_PFCP_Node_ID_ipv4(template (value) OCT4 ip_value) := 
ts_PFCP_Node_ID(PFCP_Node_ID_IPv4, ip_value);
 template (present) Node_ID
@@ -83,6 +84,113 @@
 template (present) Node_ID
 tr_PFCP_Node_ID_fqdn(template (present) octetstring fqdn) := 
tr_PFCP_Node_ID(PFCP_Node_ID_FQDN, fqdn);

+/* 8.2.25 UP Function Features */
+template (value) UP_Function_Features
+ts_PFCP_UP_Function_Features(template (value) BIT1 ftup := '0'B) := {
+       elementIdentifier := 43,
+       lengthIndicator := 0,
+       /* octet 5: */
+       bucp := '0'B,
+       ddnd := '0'B,
+       dlbd := '0'B,
+       trst := '0'B,
+       ftup := ftup,
+       pfdm := '0'B,
+       heeu := '0'B,
+       treu := '0'B,
+       /* octet 6: */
+       empu := '0'B,
+       pdiu := '0'B,
+       udbc := '0'B,
+       quoac := '0'B,
+       trace := '0'B,
+       frrt := '0'B,
+       pfde := '0'B,
+       epfar := '0'B,
+       /* octet 7: */
+       dpdra := '0'B,
+       adpdp := '0'B,
+       ueip := '0'B,
+       sset := '0'B,
+       mnop := '0'B,
+       mte := '0'B,
+       bundl := '0'B,
+       gcom := '0'B,
+       /* octet 8: */
+       mpas := '0'B,
+       rttl := '0'B,
+       vtime := '0'B,
+       norp := '0'B,
+       iptv := '0'B,
+       ip6pl := '0'B,
+       tsn := '0'B,
+       mptcp := '0'B,
+       /* octet 9: */
+       atsss_ll := '0'B,
+       qfqm := '0'B,
+       gpqm := '0'B,
+       mt_edt := '0'B,
+       ciot := '0'B,
+       ethar := '0'B,
+       ddds := '0'B,
+       rds := '0'B,
+       /* octet 10: */
+       rttwp := '0'B,
+       quasf := '0'B,
+       nspoc := '0'B,
+       l2tp := '0'B,
+       upber := '0'B,
+       resps := '0'B,
+       iprep := '0'B,
+       dnsts := '0'B,
+       /* octet 11: */
+       drqos := '0'B,
+       mbsn4 := '0'B,
+       psuprm := '0'B,
+       epppi := '0'B,
+       ratp := '0'B,
+       upidp := '0'B,
+       afsfc := '0'B,
+       mquic_udp := '0'B,
+       /* octet 12: */
+       redsm := '0'B,
+       dbdm := '0'B,
+       tscts := '0'B,
+       drtsc := '0'B,
+       n6jedb := '0'B,
+       qmcon := '0'B,
+       detnet := '0'B,
+       eml4s := '0'B,
+       /* octet 13: */
+       pdusm := '0'B,
+       cn_tl := '0'B,
+       qmdrm := '0'B,
+       edbnc := '0'B,
+       mt_sdt := '0'B,
+       upsbies := '0'B,
+       umn6ip := '0'B,
+       un6tu := '0'B,
+       /* octet 14: */
+       mbsch := '0'B,
+       un6dm := '0'B,
+       natpub := '0'B,
+       ushph := '0'B,
+       mpquic_ip := '0'B,
+       mpquic_e := '0'B,
+       dyntr := '0'B,
+       muxmf := '0'B,
+       /* octet 15: */
+       conudp := '0'B,
+       moq := '0'B,
+       ulm := '0'B,
+       psitlm := '0'B,
+       udpopt := '0'B,
+       qmabr := '0'B,
+       papfd := '0'B,
+       spare:= '0'B
+}
+
+/* 8.2.65 Recovery Time Stamp */
 template (value) Recovery_Time_Stamp
 ts_PFCP_Recovery_Timestamp(template (value) LIN4_BO_LAST time_value) := {
        elementIdentifier := 96,
@@ -198,7 +306,10 @@
 ts_PFCP_Assoc_Setup_Resp(LIN3_BO_LAST sequence_number,
                         template (value) Node_ID node_id,
                         template (value) Cause cause,
-                        LIN4_BO_LAST recovery_timestamp)
+                        LIN4_BO_LAST recovery_timestamp,
+                        template (omit) UP_Function_Features 
up_function_features := omit,
+                        template (omit) CP_Function_Features 
cp_function_features := omit,
+                        template (omit) UP_IP_Resource_Information_list 
UP_IP_resource_list := omit)
 modifies ts_PDU_PFCP_ := {
        sequence_number := sequence_number,
        message_body := {
@@ -206,9 +317,9 @@
                        node_id := node_id,
                        cause := cause,
                        time_stamp := 
ts_PFCP_Recovery_Timestamp(recovery_timestamp),
-                       up_function_features := omit,
-                       cp_function_features := omit,
-                       UP_IP_resource_list := omit
+                       up_function_features := up_function_features,
+                       cp_function_features := cp_function_features,
+                       UP_IP_resource_list := UP_IP_resource_list
                }
        }
 };

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43379?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I8d74d56e3a602890f2559abbc671bfa3ee3c6e0d
Gerrit-Change-Number: 43379
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to