From 5464c9baf274950b051cbe7a597001343f4f5c07 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 27 Oct 2013 20:57:35 +0100 Subject: 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. --- src/tbf.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/tbf.h') 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); -- cgit v1.2.3