summaryrefslogtreecommitdiffstats
path: root/ggsn_tests/GGSN_Tests.ttcn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-01-25 09:20:04 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-26 10:42:53 +0100
commit9182704cbcfc044953f81d71fcc75d130646d835 (patch)
tree91f9008755c31a9eedeb47169cd6a54e08fb426b /ggsn_tests/GGSN_Tests.ttcn
parent161142834ff57d9493072e2d9c9f35df90b37daa (diff)
ggsn: Move random number helpers to Osmocom_Types.ttcn
Diffstat (limited to 'ggsn_tests/GGSN_Tests.ttcn')
-rw-r--r--ggsn_tests/GGSN_Tests.ttcn34
1 files changed, 0 insertions, 34 deletions
diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index 22cdc21..23e7054 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -615,11 +615,6 @@ module GGSN_Tests {
const octetstring c_ApnInet6 := '05696E657436'O;
const octetstring c_ApnInet46 := '06696E65743436'O;
- /* return random integer between 0 and max */
- function f_rnd_int(integer max) return integer {
- return float2int(rnd()*int2float(max));
- }
-
/* return random NSAPI */
function f_rnd_nsapi() return BIT4 {
return int2bit(f_rnd_int(16), 4);
@@ -630,35 +625,6 @@ module GGSN_Tests {
return int2oct(f_rnd_int(4294967296), 4);
}
- /* return hexstring composed of random digits */
- function f_rnd_hexstring(in integer len, in integer max := 15) return hexstring {
- var integer i;
- var hexstring ret := ''H;
- for (i := 0; i < len; i := i + 1) {
- ret := ret & int2hex(f_rnd_int(max), 1);
- }
- return ret;
- }
-
- /* return octetstring composed of random bytes */
- function f_rnd_octstring(in integer len) return octetstring {
- var integer i;
- var octetstring ret := ''O;
- for (i := 0; i < len; i := i + 1) {
- ret := ret & int2oct(f_rnd_int(255), 1);
- }
- return ret;
- }
-
- function f_rnd_imsi(in hexstring prefix) return hexstring {
- return prefix & f_rnd_hexstring(15 - lengthof(prefix), 9);
- }
-
- function f_rnd_msisdn(in octetstring prefix, integer len := 6) return octetstring {
- return prefix & f_rnd_octstring(len - lengthof(prefix));
- }
-
-
/* define an (internal) representation of a PDP context */
template PdpContext t_DefinePDP(hexstring imsi, octetstring msisdn, octetstring apn,
EndUserAddress eua) := {