aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty_functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcu_vty_functions.cpp')
-rw-r--r--src/pcu_vty_functions.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp
index 74780c2c..7082d990 100644
--- a/src/pcu_vty_functions.cpp
+++ b/src/pcu_vty_functions.cpp
@@ -39,9 +39,8 @@ int pcu_vty_config_write_pcu_ext(struct vty *vty)
return CMD_SUCCESS;
}
-void tbf_print_vty_info(struct vty *vty, struct llist_head *ltbf)
+static void tbf_print_vty_info(struct vty *vty, gprs_rlcmac_tbf *tbf)
{
- gprs_rlcmac_tbf *tbf = llist_pods_entry(ltbf, gprs_rlcmac_tbf);
vty_out(vty, "TBF: TFI=%d TLLI=0x%08x (%s) DIR=%s IMSI=%s%s", tbf->tfi(),
tbf->tlli(), tbf->is_tlli_valid() ? "valid" : "invalid",
tbf->direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL",
@@ -60,6 +59,22 @@ void tbf_print_vty_info(struct vty *vty, struct llist_head *ltbf)
VTY_NEWLINE, VTY_NEWLINE);
}
+int pcu_vty_show_tbf_all(struct vty *vty, struct gprs_rlcmac_bts *bts_data)
+{
+ BTS *bts = bts_data->bts;
+ LListHead<gprs_rlcmac_tbf> *ms_iter;
+
+ vty_out(vty, "UL TBFs%s", VTY_NEWLINE);
+ llist_for_each(ms_iter, &bts->ul_tbfs())
+ tbf_print_vty_info(vty, ms_iter->entry());
+
+ vty_out(vty, "%sDL TBFs%s", VTY_NEWLINE, VTY_NEWLINE);
+ llist_for_each(ms_iter, &bts->dl_tbfs())
+ tbf_print_vty_info(vty, ms_iter->entry());
+
+ return CMD_SUCCESS;
+}
+
int pcu_vty_show_ms_all(struct vty *vty, struct gprs_rlcmac_bts *bts_data)
{
BTS *bts = bts_data->bts;