aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-08-15 19:51:45 +0200
committerHarald Welte <laforge@gnumonks.org>2015-08-18 19:32:33 +0200
commit1f6aad1c042f3040ac62696fc38c65a875862b6a (patch)
treee93fc12fec24030d9c296ba01187b8564e2a172b
parent538ff49837c95e2ba6514356c863112569128532 (diff)
Add G-RNTI derived TLLI types defined in 23.003
-rw-r--r--include/osmocom/gsm/gsm_utils.h2
-rw-r--r--src/gsm/gsm_utils.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h
index c3085c0..6431866 100644
--- a/include/osmocom/gsm/gsm_utils.h
+++ b/include/osmocom/gsm/gsm_utils.h
@@ -160,6 +160,8 @@ enum gprs_tlli_type {
TLLI_RANDOM,
TLLI_AUXILIARY,
TLLI_RESERVED,
+ TLLI_G_RNTI,
+ TLLI_RAND_G_RNTI,
};
/* TS 03.03 Chapter 2.6 */
diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c
index 198ec69..fad59bc 100644
--- a/src/gsm/gsm_utils.c
+++ b/src/gsm/gsm_utils.c
@@ -647,7 +647,7 @@ uint32_t gsm_gsmtime2fn(struct gsm_time *time)
return (51 * ((time->t3 - time->t2 + 26) % 26) + time->t3 + (26 * 51 * time->t1));
}
-/* TS 03.03 Chapter 2.6 */
+/* TS 23.003 Chapter 2.6 */
int gprs_tlli_type(uint32_t tlli)
{
if ((tlli & 0xc0000000) == 0xc0000000)
@@ -658,6 +658,10 @@ int gprs_tlli_type(uint32_t tlli)
return TLLI_RANDOM;
else if ((tlli & 0xf8000000) == 0x70000000)
return TLLI_AUXILIARY;
+ else if ((tlli & 0xf0000000) == 0x00000000)
+ return TLLI_G_RNTI;
+ else if ((tlli & 0xf0000000) == 0x10000000)
+ return TLLI_RAND_G_RNTI;
return TLLI_RESERVED;
}