library: Add template helpers for AoIP Transport Layer Address
This way one can simply pass an IP addr in string format and return the
IE no matter the IP version.
Change-Id: I743dbb7c89e504762498b7f278c12e130352e5f0
diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn
index 1ca6491..a402525 100644
--- a/library/Misc_Helpers.ttcn
+++ b/library/Misc_Helpers.ttcn
@@ -25,4 +25,13 @@
mtc.stop
}
+function f_addr_is_ipv6(charstring addr) return boolean {
+ for (var integer i := 0; i < lengthof(addr); i := i + 1) {
+ if (addr[i] == ":") {
+ return true;
+ }
+ }
+ return false;
+}
+
}