pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36380?usp=email )
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 library/Misc_Helpers.ttcn
M sip/SIP_Tests.ttcn
2 files changed, 22 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/80/36380/1
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 := {
--
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: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange