summaryrefslogtreecommitdiffstats
path: root/library/L3_Templates.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'library/L3_Templates.ttcn')
-rw-r--r--library/L3_Templates.ttcn21
1 files changed, 21 insertions, 0 deletions
diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index a3db409..76725fc 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -1472,5 +1472,26 @@ template (value) PDU_L3_MS_SGSN ts_GMM_DET_REQ_MO(BIT3 dtt := c_GMM_DTT_MO_GPRS)
}
}
+private function f_concat_pad(integer tot_len, hexstring prefix, integer suffix) return hexstring {
+ var integer suffix_len := tot_len - lengthof(prefix);
+ var charstring suffix_ch := int2str(suffix);
+ var integer pad_len := suffix_len - lengthof(suffix_ch);
+
+ return prefix & int2hex(0, pad_len) & str2hex(suffix_ch);
+}
+
+function f_gen_imei(integer suffix) return hexstring {
+ return f_concat_pad(15, '49999'H, suffix);
+}
+
+function f_gen_imsi(integer suffix) return hexstring {
+ return f_concat_pad(15, '26242'H, suffix);
+}
+
+function f_gen_msisdn(integer suffix) return hexstring {
+ return f_concat_pad(12, '49123'H, suffix);
+}
+
+
}