aboutsummaryrefslogtreecommitdiffstats
path: root/src/llc.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-15 11:05:44 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-22 10:39:06 +0200
commit07eb655244bd973a9bdf69ef958ee06cf867a0bb (patch)
treeb8755ad7d75edf67161f16560b702c0d31ba1c8c /src/llc.h
parent1eae96ca2fe1e23def798ea90645538a4e4193e5 (diff)
llc: Keep track of the number of stored LLC octets
To get the number of LLC octets that are stored in the queue, this commit adds a m_queue_octets member along with a octets() method. This value is updated similarly to m_queue_size on each modifying method call. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/llc.h')
-rw-r--r--src/llc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/llc.h b/src/llc.h
index 80d2f7ac..bd717739 100644
--- a/src/llc.h
+++ b/src/llc.h
@@ -73,10 +73,12 @@ struct gprs_llc_queue {
struct msgb *dequeue();
void clear(BTS *bts);
size_t size() const;
+ size_t octets() const;
private:
uint32_t m_avg_queue_delay; /* Average delay of data going through the queue */
size_t m_queue_size;
+ size_t m_queue_octets;
struct llist_head m_queue; /* queued LLC DL data */
};
@@ -118,3 +120,8 @@ inline size_t gprs_llc_queue::size() const
{
return this ? m_queue_size : 0;
}
+
+inline size_t gprs_llc_queue::octets() const
+{
+ return this ? m_queue_octets : 0;
+}