aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-22 13:09:29 +0100
committerHarald Welte <laforge@netfilter.org>2009-12-22 13:11:28 +0100
commitb908cb7e0ed9e10ee7ced8083d4abdfb9ca2e61c (patch)
tree1797293a9ebf7dca69dc303abf4d003e59802d0b /openbsc/include
parentc80210641a68a6ca07274f0319ba03d7521c2b3e (diff)
Display current channel usage load in 'show bts' and 'show network'
This is just the load at one given instant. We definitely also want to see some averages and record the measurements in a database later.
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/chan_alloc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/chan_alloc.h b/openbsc/include/openbsc/chan_alloc.h
index 38855d1ee..fa8663056 100644
--- a/openbsc/include/openbsc/chan_alloc.h
+++ b/openbsc/include/openbsc/chan_alloc.h
@@ -49,4 +49,16 @@ void lchan_free(struct gsm_lchan *lchan);
/* Consider releasing the channel */
int lchan_auto_release(struct gsm_lchan *lchan);
+struct load_counter {
+ unsigned int total;
+ unsigned int used;
+};
+
+struct pchan_load {
+ struct load_counter pchan[GSM_PCHAN_UNKNOWN];
+};
+
+void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts);
+void network_chan_load(struct pchan_load *pl, struct gsm_network *net);
+
#endif /* _CHAN_ALLOC_H */