aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2014-01-15 17:06:51 +0100
committerDaniel Willmann <daniel@totalueberwachung.de>2014-01-15 17:41:45 +0100
commit772415fd8a30472b28ac7d1e56c97a0d70307835 (patch)
treefeeb95abb89278755c33dd4f3a709bf755823f1a /src/pcu_vty.c
parentafa72f521018b38d91bc68c4c87fba26cf26728c (diff)
pcu_vty: Add a command to print info about all TBFs
Diffstat (limited to 'src/pcu_vty.c')
-rw-r--r--src/pcu_vty.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 8a9255c5..041d5294 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -282,7 +282,28 @@ DEFUN(show_bts_stats,
{
vty_out_rate_ctr_group(vty, "", bts_main_data_stats());
return CMD_SUCCESS;
-}
+}
+
+DEFUN(show_tbf,
+ show_tbf_cmd,
+ "show tbf all",
+ SHOW_STR "information about all current TBFs\n")
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+ struct llist_head *tbf;
+
+ vty_out(vty, "UL TBFs%s", VTY_NEWLINE);
+ llist_for_each(tbf, &bts->ul_tbfs) {
+ tbf_print_vty_info(vty, tbf);
+ }
+
+ vty_out(vty, "%sDL TBFs%s", VTY_NEWLINE, VTY_NEWLINE);
+ llist_for_each(tbf, &bts->dl_tbfs) {
+ tbf_print_vty_info(vty, tbf);
+ }
+
+ return CMD_SUCCESS;
+}
static const char pcu_copyright[] =
"Copyright (C) 2012 by Ivan Kluchnikov <kluchnikovi@gmail.com> and \r\n"
@@ -322,6 +343,7 @@ int pcu_vty_init(const struct log_info *cat)
install_element(PCU_NODE, &ournode_end_cmd);
install_element_ve(&show_bts_stats_cmd);
+ install_element_ve(&show_tbf_cmd);
return 0;
}