aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-01-14 13:05:24 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-02-18 01:31:50 +0100
commit86aaa99ccf5d73c0ff40f9bbec1d874cdd3811f9 (patch)
treed18d6e6873dda64612cd105d22e1cb31c66f9dae
parentf67da5b0521d72124149bedec555142bbfdd4274 (diff)
hnb-test: comment on gen_initue_lu() IMSI
-rw-r--r--src/tests/hnb-test.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tests/hnb-test.c b/src/tests/hnb-test.c
index 6e4a91b..b75e98a 100644
--- a/src/tests/hnb-test.c
+++ b/src/tests/hnb-test.c
@@ -554,6 +554,19 @@ static struct msgb *gen_initue_lu(int is_ps, uint32_t conn_id, const char *imsi)
struct msgb *msg;
/* FIXME: patch imsi */
+ /* Note: the Mobile Identitiy IE's IMSI data has the identity type and
+ * an even/odd indicator bit encoded in the first octet. So the first
+ * octet looks like this:
+ *
+ * 8 7 6 5 | 4 | 3 2 1
+ * IMSI-digit | even/odd | type
+ *
+ * followed by the remaining IMSI digits.
+ * If digit count is even (bit 4 == 0), that first high-nibble is 0xf.
+ * (derived from Iu pcap Location Update Request msg and TS 25.413)
+ *
+ * TODO I'm only 90% sure about this
+ */
return ranap_new_msg_initial_ue(conn_id, is_ps, &rnc_id, lu, sizeof(lu));
}