aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-19 17:10:07 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:36 +0100
commit9f6867033f19dd8d1e33100c5b80e9b70bddbe2a (patch)
tree6d3fd5c12b83df8b27be8fb48e7bbd6455acf27e /src
parent36df7740dd7f81fe36d35e808cc53f518f4e360e (diff)
tbf: Show window parameters in VTY
Add V(Q), V(R), V(A), V(S) to the output of the "show tbf" command. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/pcu_vty_functions.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp
index 66994de..a8b5ddd 100644
--- a/src/pcu_vty_functions.cpp
+++ b/src/pcu_vty_functions.cpp
@@ -41,6 +41,9 @@ int pcu_vty_config_write_pcu_ext(struct vty *vty)
static void tbf_print_vty_info(struct vty *vty, gprs_rlcmac_tbf *tbf)
{
+ gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(tbf);
+ gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(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",
@@ -56,9 +59,21 @@ static void tbf_print_vty_info(struct vty *vty, gprs_rlcmac_tbf *tbf)
if (tbf->pdch[i])
vty_out(vty, "%d ", i);
}
- vty_out(vty, " CS=%s WS=%d%s%s",
- tbf->current_cs().name(), tbf->window()->ws(),
- VTY_NEWLINE, VTY_NEWLINE);
+ vty_out(vty, " CS=%s WS=%d",
+ tbf->current_cs().name(), tbf->window()->ws());
+
+ if (ul_tbf) {
+ gprs_rlc_ul_window *win = &ul_tbf->m_window;
+ vty_out(vty, " V(Q)=%d V(R)=%d",
+ win->v_q(), win->v_r());
+ }
+ if (dl_tbf) {
+ gprs_rlc_dl_window *win = &dl_tbf->m_window;
+ vty_out(vty, " V(A)=%d V(S)=%d nBSN=%d%s",
+ win->v_a(), win->v_s(), win->resend_needed(),
+ win->window_stalled() ? " STALLED" : "");
+ }
+ vty_out(vty, "%s%s", VTY_NEWLINE, VTY_NEWLINE);
}
int pcu_vty_show_tbf_all(struct vty *vty, struct gprs_rlcmac_bts *bts_data)