diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-14 02:08:49 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-14 02:08:49 +0800 |
commit | 3d6a5d648e0dca3c65c1be42bc1ce617179b4a2c (patch) | |
tree | 552b8e4b538d29786efe368b2302e0205b4f95be /openbsc/src/vty_interface.c | |
parent | 029235ea96fffe4c522c9f2fafd138fedcb40abf (diff) |
[vty] Add a one line show lchan summary command.
Diffstat (limited to 'openbsc/src/vty_interface.c')
-rw-r--r-- | openbsc/src/vty_interface.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index 41a235551..85530d004 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -683,6 +683,14 @@ static void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan) meas_rep_dump_vty(vty, &lchan->meas_rep[idx], " "); } +static void lchan_dump_short_vty(struct vty *vty, struct gsm_lchan *lchan) +{ + vty_out(vty, "Lchan %u in Timeslot %u of TRX %u in BTS %u, Type %s%s", + lchan->nr, lchan->ts->nr, lchan->ts->trx->nr, + lchan->ts->trx->bts->nr, gsm_lchant_name(lchan->type), + VTY_NEWLINE); +} + static int lchan_summary(struct vty *vty, int argc, const char **argv, void (*dump_cb)(struct vty *, struct gsm_lchan *)) { @@ -764,6 +772,16 @@ DEFUN(show_lchan, return lchan_summary(vty, argc, argv, lchan_dump_full_vty); } +DEFUN(show_lchan_summary, + show_lchan_summary_cmd, + "show lchan summary [bts_nr] [trx_nr] [ts_nr] [lchan_nr]", + SHOW_STR "Display information about a logical channel\n" + "BTS Number\n" "TRX Number\n" "Timeslot Number\n" + "Logical Channel Number\n") +{ + return lchan_summary(vty, argc, argv, lchan_dump_short_vty); +} + static void e1drv_dump_vty(struct vty *vty, struct e1inp_driver *drv) { vty_out(vty, "E1 Input Driver %s%s", drv->name, VTY_NEWLINE); @@ -1900,6 +1918,7 @@ int bsc_vty_init(struct gsm_network *net) install_element_ve(&show_trx_cmd); install_element_ve(&show_ts_cmd); install_element_ve(&show_lchan_cmd); + install_element_ve(&show_lchan_summary_cmd); install_element_ve(&show_e1drv_cmd); install_element_ve(&show_e1line_cmd); |