aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-27 20:57:35 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-30 21:24:13 +0100
commit5464c9baf274950b051cbe7a597001343f4f5c07 (patch)
tree320de9c63da9135c3baf04cdde2edf5dad6d87d4 /src/tbf.h
parent34f6e5ebe63f46ccf4ce97899c66a83f6f39d355 (diff)
tbf: Have one imsi field and assign it through a function
Have one IMSI field per TBF and assign through a function call. The IMSI should be used to look-up the TBF on the SGSN->PCU direction.
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/tbf.h b/src/tbf.h
index e8b66c94..e31653d4 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -122,6 +122,9 @@ struct gprs_rlcmac_tbf {
uint8_t tfi() const;
+ const char *imsi() const;
+ void assign_imsi(const char *imsi);
+
struct llist_head list;
uint32_t state_flags;
enum gprs_rlcmac_tbf_direction direction;
@@ -161,7 +164,6 @@ struct gprs_rlcmac_tbf {
uint16_t v_a; /* ack state */
char v_b[RLC_MAX_SNS/2]; /* acknowledge state array */
int32_t tx_counter; /* count all transmitted blocks */
- char imsi[16]; /* store IMSI for PCH retransmission */
uint8_t wait_confirm; /* wait for CCCH IMM.ASS cnf */
} dl;
struct {
@@ -190,8 +192,6 @@ struct gprs_rlcmac_tbf {
unsigned int num_fT_exp; /* number of consecutive fT expirations */
struct {
- char imsi[16];
-
struct timeval dl_bw_tv; /* timestamp for dl bw calculation */
uint32_t dl_bw_octets; /* number of octets since bw_tv */
@@ -227,6 +227,9 @@ struct gprs_rlcmac_tbf {
uint8_t m_tlli_valid;
uint8_t m_tfi;
+ /* store IMSI for look-up and PCH retransmission */
+ char m_imsi[16];
+
protected:
gprs_rlcmac_bts *bts_data() const;
@@ -287,4 +290,9 @@ inline uint8_t gprs_rlcmac_tbf::tfi() const
return m_tfi;
}
+inline const char *gprs_rlcmac_tbf::imsi() const
+{
+ return m_imsi;
+}
+
const char *tbf_name(gprs_rlcmac_tbf *tbf);