aboutsummaryrefslogtreecommitdiffstats
path: root/library/RAN_Emulation.ttcnpp
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-01-10 00:23:10 +0100
committerlaforge <laforge@osmocom.org>2020-01-10 16:03:27 +0000
commitae747741388d3e3bb538332f26d49b20ac9aee69 (patch)
treed277bff678e1253a2d466d903258658df9dfad6b /library/RAN_Emulation.ttcnpp
parent70d15bf48f500c26357f82ad03a2dd7ade9fecfe (diff)
MSC: f_ran_register_imsi(): allow passing omit as TMSI
Diffstat (limited to 'library/RAN_Emulation.ttcnpp')
-rw-r--r--library/RAN_Emulation.ttcnpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index 891de09d..b54d6e4d 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -1444,8 +1444,17 @@ runs on RAN_Emulation_CT {
}
/* helper function for clients to register their IMSI/TMSI */
-function f_ran_register_imsi(hexstring imsi, OCT4 tmsi)
+function f_ran_register_imsi(hexstring imsi, template (omit) OCT4 tmsi_or_omit)
runs on RAN_ConnHdlr {
+ var OCT4 tmsi;
+
+ /* Resolve omit to a special reserved value */
+ if (istemplatekind(tmsi_or_omit, "omit")) {
+ tmsi := 'FFFFFFFF'O;
+ } else {
+ tmsi := valueof(tmsi_or_omit);
+ }
+
BSSAP_PROC.call(RAN_register_imsi:{imsi, tmsi, self}) {
[] BSSAP_PROC.getreply(RAN_register_imsi:{?,?,?}) {};
}