pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36380?usp=email )
( 3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Move f_addrstr2addr() to library/Misc_Helpers.ttcn ...................................................................... Move f_addrstr2addr() to library/Misc_Helpers.ttcn This function can easily be reused in other testsuites supporting both IPv4 and IPv6 addresses. Change-Id: I4243ec5551f128629b6504ccc59efeb456a6855d --- M hlr/gen_links.sh M hlr/regen_makefile.sh M library/Misc_Helpers.ttcn M sip/SIP_Tests.ttcn M sysinfo/gen_links.sh M sysinfo/regen_makefile.sh 6 files changed, 26 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh index e3a64d9..588fe08 100755 --- a/hlr/gen_links.sh +++ b/hlr/gen_links.sh @@ -44,7 +44,7 @@ gen_links $DIR $FILES 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="Native_Functions.ttcn Native_FunctionDefs.cc 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+="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 " diff --git a/hlr/regen_makefile.sh b/hlr/regen_makefile.sh index 7cd6cf4..c5fadde 100755 --- a/hlr/regen_makefile.sh +++ b/hlr/regen_makefile.sh @@ -10,6 +10,7 @@ IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc + Native_FunctionDefs.cc MAP_EncDec.cc SS_EncDec.cc TCCConversion.cc diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn index e01c170..dda2c2c 100644 --- a/library/Misc_Helpers.ttcn +++ b/library/Misc_Helpers.ttcn @@ -1,5 +1,7 @@ module Misc_Helpers { +import from Native_Functions all; + modulepar { charstring mp_osmo_repo := "nightly"; } @@ -51,4 +53,12 @@ return false; } +function f_addrstr2addr(charstring addr) return octetstring { + if (f_addr_is_ipv6(addr)) { + return f_inet6_addr(addr); + } else { + return f_inet_addr(addr); + } +} + } diff --git a/sip/SIP_Tests.ttcn b/sip/SIP_Tests.ttcn index 208cc01..9f8f8f8 100644 --- a/sip/SIP_Tests.ttcn +++ b/sip/SIP_Tests.ttcn @@ -118,15 +118,6 @@ } return "IP4"; } - -private function f_addrstr2addr(charstring addr) return octetstring { - if (f_addr_is_ipv6(addr)) { - return f_inet6_addr(addr); - } else { - return f_inet_addr(addr); - } -} - function f_init_mncc(charstring id) runs on test_CT { id := id & "-MNCC"; var MnccOps ops := { diff --git a/sysinfo/gen_links.sh b/sysinfo/gen_links.sh index fa3cd33..c8a3ee3 100755 --- a/sysinfo/gen_links.sh +++ b/sysinfo/gen_links.sh @@ -25,7 +25,7 @@ gen_links $DIR $FILES DIR=../library -FILES="GSMTAP_PortType.ttcn GSMTAP_Types.ttcn GSM_SystemInformation.ttcn GSM_RestOctets.ttcn GSM_RR_Types.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_Types.ttcn IPL4_GSMTAP_CtrlFunct.ttcn IPL4_GSMTAP_CtrlFunctDef.cc Osmocom_Types.ttcn Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn" +FILES="GSMTAP_PortType.ttcn GSMTAP_Types.ttcn GSM_SystemInformation.ttcn GSM_RestOctets.ttcn GSM_RR_Types.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_Types.ttcn IPL4_GSMTAP_CtrlFunct.ttcn IPL4_GSMTAP_CtrlFunctDef.cc Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn" gen_links $DIR $FILES ignore_pp_results diff --git a/sysinfo/regen_makefile.sh b/sysinfo/regen_makefile.sh index 569f406..1ed5835 100755 --- a/sysinfo/regen_makefile.sh +++ b/sysinfo/regen_makefile.sh @@ -7,6 +7,7 @@ IPL4_GSMTAP_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc + Native_FunctionDefs.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36380?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: I4243ec5551f128629b6504ccc59efeb456a6855d Gerrit-Change-Number: 36380 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pes...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de> Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: pespin <pes...@sysmocom.de> Gerrit-MessageType: merged