pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43381?usp=email )
Change subject: PFCP_Emulation: Use recovery timestamp to send proper time ......................................................................
PFCP_Emulation: Use recovery timestamp to send proper time
As per FPCP spec: "This IE shall contain the time stamp when the PFCP entity was started".
Change-Id: Iecbf76c9e7cb17d47edbe879ceeefc54d028f50b --- M hnbgw/gen_links.sh M hnbgw/regen_makefile.sh M library/PFCP_Emulation.ttcn M s1gw/gen_links.sh M s1gw/regen_makefile.sh M upf/gen_links.sh M upf/regen_makefile.sh 7 files changed, 12 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/81/43381/1
diff --git a/hnbgw/gen_links.sh b/hnbgw/gen_links.sh index c8ed46d..cbbc6f9 100755 --- a/hnbgw/gen_links.sh +++ b/hnbgw/gen_links.sh @@ -11,6 +11,7 @@ DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" FILES+=" TCCEncoding_Functions.ttcn TCCEncoding.cc " # GSM 7-bit coding +FILES+="TCCDateTime.cc TCCDateTime_Functions.ttcn " # NTP_Functions (NTP timestamp) gen_links $DIR $FILES
DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src @@ -100,7 +101,7 @@ FILES="Iuh_Types.ttcn Iuh_CodecPort.ttcn Iuh_CodecPort_CtrlFunctDef.cc Iuh_CodecPort_CtrlFunct.ttcn Iuh_Emulation.ttcn DNS_Helpers.ttcn " FILES+="SDP_Templates.ttcn MGCP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc " FILES+="SCCP_Adapter.ttcnpp RAN_Adapter.ttcnpp RAN_Emulation.ttcnpp BSSAP_CodecPort.ttcn SCCP_Templates.ttcn " -FILES+="PFCP_CodecPort.ttcn PFCP_CodecPort_CtrlFunct.ttcn PFCP_CodecPort_CtrlFunctDef.cc PFCP_Emulation.ttcn PFCP_Templates.ttcn " +FILES+="NTP_Functions.ttcn PFCP_Templates.ttcn PFCP_CodecPort.ttcn PFCP_CodecPort_CtrlFunct.ttcn PFCP_CodecPort_CtrlFunctDef.cc PFCP_Emulation.ttcn " FILES+="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn " FILES+="StatsD_Types.ttcn StatsD_CodecPort.ttcn StatsD_CodecPort_CtrlFunct.ttcn StatsD_CodecPort_CtrlFunctdef.cc StatsD_Checker.ttcnpp " FILES+="L3_Templates.ttcn L3_Common.ttcn " diff --git a/hnbgw/regen_makefile.sh b/hnbgw/regen_makefile.sh index d75ec1c..45a3f1f 100755 --- a/hnbgw/regen_makefile.sh +++ b/hnbgw/regen_makefile.sh @@ -19,6 +19,7 @@ SDP_EncDec.cc StatsD_CodecPort_CtrlFunctdef.cc TCCConversion.cc + TCCDateTime.cc TCCEncoding.cc TCCInterface.cc TELNETasp_PT.cc diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn index 2471faf..86c5879 100644 --- a/library/PFCP_Emulation.ttcn +++ b/library/PFCP_Emulation.ttcn @@ -21,6 +21,8 @@ import from PFCP_CodecPort all; import from PFCP_CodecPort_CtrlFunct all;
+import from NTP_Functions all; + /*********************************************************************** * Main Emulation Component ***********************************************************************/ @@ -220,7 +222,7 @@ res := PFCP_CodecPort_CtrlFunct.f_IPL4_listen(PFCP, cfg.pfcp_bind_ip, cfg.pfcp_bind_port, {udp:={}}); g_pfcp_conn_id := res.connId;
- g_recovery_timestamp := f_rnd_int(4294967296); + g_recovery_timestamp := f_time_ntp32_now(); g_pfcp_cfg := cfg;
g_conns_bcast := { }; diff --git a/s1gw/gen_links.sh b/s1gw/gen_links.sh index 58a3e57..ac58c3b 100755 --- a/s1gw/gen_links.sh +++ b/s1gw/gen_links.sh @@ -7,6 +7,7 @@ DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" FILES+=" TCCEncoding_Functions.ttcn TCCEncoding.cc " +FILES+="TCCDateTime.cc TCCDateTime_Functions.ttcn " # NTP_Functions (NTP timestamp) gen_links $DIR $FILES
DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src @@ -45,7 +46,7 @@
DIR=../library FILES="Misc_Helpers.ttcn Mutex.ttcn General_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc " -FILES+="PFCP_CodecPort.ttcn PFCP_CodecPort_CtrlFunct.ttcn PFCP_CodecPort_CtrlFunctDef.cc PFCP_Emulation.ttcn PFCP_Templates.ttcn " +FILES+="NTP_Functions.ttcn PFCP_Templates.ttcn PFCP_CodecPort.ttcn PFCP_CodecPort_CtrlFunct.ttcn PFCP_CodecPort_CtrlFunctDef.cc PFCP_Emulation.ttcn " FILES+="S1AP_CodecPort.ttcn S1AP_CodecPort_CtrlFunctDef.cc S1AP_CodecPort_CtrlFunct.ttcn S1AP_Functions.ttcn " FILES+="SCTP_Templates.ttcn " FILES+="StatsD_Types.ttcn StatsD_CodecPort.ttcn StatsD_CodecPort_CtrlFunct.ttcn StatsD_CodecPort_CtrlFunctdef.cc StatsD_Checker.ttcnpp " diff --git a/s1gw/regen_makefile.sh b/s1gw/regen_makefile.sh index aa575e7..8b46384 100755 --- a/s1gw/regen_makefile.sh +++ b/s1gw/regen_makefile.sh @@ -18,6 +18,7 @@ S1AP_EncDec.cc StatsD_CodecPort_CtrlFunctdef.cc TCCConversion.cc + TCCDateTime.cc TCCEncoding.cc TCCInterface.cc " diff --git a/upf/gen_links.sh b/upf/gen_links.sh index 2a65368..230c82b 100755 --- a/upf/gen_links.sh +++ b/upf/gen_links.sh @@ -7,6 +7,7 @@ DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" FILES+=" TCCEncoding_Functions.ttcn TCCEncoding.cc " # GSM 7-bit coding +FILES+="TCCDateTime.cc TCCDateTime_Functions.ttcn " # NTP_Functions (NTP timestamp) gen_links $DIR $FILES
DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src @@ -30,7 +31,7 @@ DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn " FILES+="StatsD_Types.ttcn StatsD_CodecPort.ttcn StatsD_CodecPort_CtrlFunct.ttcn StatsD_CodecPort_CtrlFunctdef.cc StatsD_Checker.ttcnpp " -FILES+="PFCP_CodecPort.ttcn PFCP_CodecPort_CtrlFunct.ttcn PFCP_CodecPort_CtrlFunctDef.cc PFCP_Emulation.ttcn PFCP_Templates.ttcn" +FILES+="NTP_Functions.ttcn PFCP_Templates.ttcn PFCP_CodecPort.ttcn PFCP_CodecPort_CtrlFunct.ttcn PFCP_CodecPort_CtrlFunctDef.cc PFCP_Emulation.ttcn " gen_links $DIR $FILES
gen_links_finish diff --git a/upf/regen_makefile.sh b/upf/regen_makefile.sh index d835449..99ff387 100755 --- a/upf/regen_makefile.sh +++ b/upf/regen_makefile.sh @@ -12,6 +12,7 @@ Native_FunctionDefs.cc StatsD_CodecPort_CtrlFunctdef.cc TCCConversion.cc + TCCDateTime.cc TCCEncoding.cc TCCInterface.cc TELNETasp_PT.cc