pcu_vty: Add a command to print info about all TBFs
This commit is contained in:
parent
afa72f5210
commit
772415fd8a
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1758,7 +1758,7 @@ void tbf_print_vty_info(struct vty *vty, llist_head *ltbf)
|
|||
{
|
||||
gprs_rlcmac_tbf *tbf = llist_entry(ltbf, gprs_rlcmac_tbf, list);
|
||||
|
||||
vty_out(vty, "TBF: TFI=%d TLLI=%08x (%s) DIR=%s IMSI=%s%s", tbf->tfi(),
|
||||
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",
|
||||
tbf->imsi(), VTY_NEWLINE);
|
||||
|
@ -1771,5 +1771,5 @@ void tbf_print_vty_info(struct vty *vty, llist_head *ltbf)
|
|||
if (tbf->pdch[i])
|
||||
vty_out(vty, "%d ", i);
|
||||
}
|
||||
vty_out(vty, "%s%s", VTY_NEWLINE, VTY_NEWLINE);
|
||||
vty_out(vty, " CS=%d%s%s", tbf->cs, VTY_NEWLINE, VTY_NEWLINE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue