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.
diff --git a/src/tbf.h b/src/tbf.h
index e8b66c9..e31653d 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -122,6 +122,9 @@
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 @@
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 @@
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 @@
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 @@
return m_tfi;
}
+inline const char *gprs_rlcmac_tbf::imsi() const
+{
+ return m_imsi;
+}
+
const char *tbf_name(gprs_rlcmac_tbf *tbf);