aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_ms.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-15 15:50:43 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-21 17:10:42 +0200
commit939904672961fa7e28397e27f942a7d1fff4bbdf (patch)
treef17d491b73f8c54982da96a2431b45e8d98f6000 /src/gprs_ms.h
parente43460b50fc152026ab96b5095b94fbac6939ab2 (diff)
ms: Support new and old TLLIs
According to the specification (GSM 04.08/24.008, 4.7.1.5) after a new P-TMSI has been assigned, the old P-TMSI must be kept basically until it has been used by both sides. Since the TLLI will be derived from the P-TMSI, the old TLLI must also be kept until the new TLLI has been used by both MS and SGSN. This commit modifies the TLLI handling of GprsMs accordingly. set_tlli() is only used with TLLIs derived from MS messages, confirm_tlli() is used with TLLIs derived from messages received from the SGSN. tlli() returns the value set by the MS. check_tlli() matches each of the TLLI used by either MS or SGSN as well as the old TLLI until it has been confirmed. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_ms.h')
-rw-r--r--src/gprs_ms.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index 3a8a2e17..ac1928e7 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -51,8 +51,10 @@ public:
gprs_rlcmac_ul_tbf *ul_tbf() const {return m_ul_tbf;}
gprs_rlcmac_dl_tbf *dl_tbf() const {return m_dl_tbf;}
- uint32_t tlli() const {return m_tlli;}
+ uint32_t tlli() const;
void set_tlli(uint32_t tlli);
+ bool confirm_tlli(uint32_t tlli);
+ bool check_tlli(uint32_t tlli);
void attach_tbf(gprs_rlcmac_tbf *tbf);
void attach_ul_tbf(gprs_rlcmac_ul_tbf *tbf);
@@ -78,7 +80,20 @@ private:
gprs_rlcmac_ul_tbf *m_ul_tbf;
gprs_rlcmac_dl_tbf *m_dl_tbf;
uint32_t m_tlli;
+ uint32_t m_new_ul_tlli;
+ uint32_t m_new_dl_tlli;
bool m_is_idle;
int m_ref;
LListHead<GprsMs> m_list;
};
+
+inline uint32_t GprsMs::tlli() const
+{
+ return m_new_ul_tlli ? m_new_ul_tlli : m_tlli;
+}
+
+inline bool GprsMs::check_tlli(uint32_t tlli)
+{
+ return tlli != 0 &&
+ (tlli == m_tlli || tlli == m_new_ul_tlli || tlli == m_new_dl_tlli);
+}