diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-14 01:24:06 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-14 01:45:52 +0800 |
commit | e8d8811b12d8a604c66632af2e0de5845af84883 (patch) | |
tree | 308ac0a1b673ffea82b89a61427841d144cbc634 | |
parent | 39cb9f2a3c9ad4b8793c3c99675ccc6123527128 (diff) |
[vty] Add a one line show lchan summary command.
-rw-r--r-- | openbsc/src/vty_interface.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index 421dd72cc..8c09f21c5 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -716,6 +716,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 *)) { @@ -794,6 +802,14 @@ 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 a short summary about a logical channel\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); @@ -2033,6 +2049,7 @@ int bsc_vty_init(struct gsm_network *net) install_element(VIEW_NODE, &show_trx_cmd); install_element(VIEW_NODE, &show_ts_cmd); install_element(VIEW_NODE, &show_lchan_cmd); + install_element(VIEW_NODE, &show_lchan_summary_cmd); install_element(VIEW_NODE, &show_e1drv_cmd); install_element(VIEW_NODE, &show_e1line_cmd); |