aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-29 10:37:09 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-08 09:35:11 +0200
commit6dbe822062d54a6c765c6fa7e2c6b79a5dff29b1 (patch)
tree7f1f703d29edfc1b03b3e0c4d70123b7571c9e0c /src/tbf.h
parentb3f713bd7be2af9bf7c3168099d35df089020164 (diff)
llc: Separate LLC queue handling from gprs_llc
Currently the gprs_llc class handles both LLC queueing and the partition into smaller pieces for RLC/MAC encapsulation. This hinders the separation of TBF and MS related data, since LLC queueing belongs to the MS related code while the RLC/MAC encoding/decoding belongs to the TBF layer. This commits takes the LLC queueing related methods and members and puts them into a new class gprs_llc_queue. It puts the queueing object into gprs_rlcmac_tbf and adds accessor functions. The implementation in tbf.cpp and tbf_dl.cpp is adapted accordingly. Ticket: #1674 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tbf.h b/src/tbf.h
index d288669d..2a403c65 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -151,6 +151,8 @@ struct gprs_rlcmac_tbf {
void assign_imsi(const char *imsi);
uint8_t ta() const;
void set_ta(uint8_t);
+ gprs_llc_queue *llc_queue();
+ const gprs_llc_queue *llc_queue() const;
time_t created_ts() const;
@@ -229,6 +231,8 @@ protected:
/* Field to take the TA value if no MS is associated */
uint8_t m_ta;
+
+ gprs_llc_queue m_llc_queue;
private:
mutable char m_name_buf[60];
};
@@ -285,6 +289,16 @@ inline GprsMs *gprs_rlcmac_tbf::ms()
return m_ms;
}
+inline gprs_llc_queue *gprs_rlcmac_tbf::llc_queue()
+{
+ return &m_llc_queue;
+}
+
+inline const gprs_llc_queue *gprs_rlcmac_tbf::llc_queue() const
+{
+ return &m_llc_queue;
+}
+
inline bool gprs_rlcmac_tbf::is_tlli_valid() const
{
return tlli() != 0;