diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-12-28 19:06:09 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-01 13:58:13 +0100 |
commit | bf49f042d432780fe37c53aed5e4e3f34ac80793 (patch) | |
tree | d2c25383480fb572ccf65cef8fce33f9caa15fc4 /src/pcu_vty_functions.cpp | |
parent | aa9daa1b9dfc74deb2ab4993f74ba61ee2712f73 (diff) |
tbf/vty: Move tbf_print_vty_info to pcu_vty_functions.cpp
This function is similar to the show_ms function already present in
the target file. Since the TBF lists will be turned into LListHead
based lists, they will get an iteration function in
pcu_vty_functions.cpp, too.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/pcu_vty_functions.cpp')
-rw-r--r-- | src/pcu_vty_functions.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index ce2a006..74780c2 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -39,6 +39,27 @@ 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) +{ + 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", + tbf->imsi(), VTY_NEWLINE); + vty_out(vty, " created=%lu state=%08x 1st_TS=%d 1st_cTS=%d ctrl_TS=%d " + "MS_CLASS=%d%s", + tbf->created_ts(), tbf->state_flags, tbf->first_ts, + tbf->first_common_ts, tbf->control_ts, tbf->ms_class(), + VTY_NEWLINE); + vty_out(vty, " TS_alloc="); + for (int i = 0; i < 8; i++) { + if (tbf->pdch[i]) + vty_out(vty, "%d ", i); + } + vty_out(vty, " CS=%d%s%s", tbf->ms() ? tbf->ms()->current_cs_dl() : 1, + VTY_NEWLINE, VTY_NEWLINE); +} + int pcu_vty_show_ms_all(struct vty *vty, struct gprs_rlcmac_bts *bts_data) { BTS *bts = bts_data->bts; |