diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2018-02-21 13:25:57 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-03-12 10:18:07 +0000 |
commit | f27dbc5f889bc1f87118c1c689ca490bc8a0a09d (patch) | |
tree | d59d1e9e799e20e25b8039bc0da0a70e09ce32f9 /src/libbsc/bsc_vty.c | |
parent | 8c498fc26b1ce4cf5aa864d6e7d712e946549f2c (diff) |
bsc_vty: display bts features in show bts
The command show bts displays all kind of BTS related info, but it
does not display the bts features yet.
- display bts specific features in vty-command show bts
Change-Id: I650133563436349d4ce55f292ea683dbb2ae68d7
Diffstat (limited to 'src/libbsc/bsc_vty.c')
-rw-r--r-- | src/libbsc/bsc_vty.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 04818d9f1..9dc754e96 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -295,6 +295,24 @@ static void vty_out_neigh_list(struct vty *vty, struct bitvec *bv) vty_out(vty, " (%d)", count); } +static void bts_dump_vty_features(struct vty *vty, struct gsm_bts *bts) +{ + unsigned int i; + bool no_features = true; + vty_out(vty, " Features:%s", VTY_NEWLINE); + + for (i = 0; i < _NUM_BTS_FEAT; i++) { + if (osmo_bts_has_feature(&bts->features, i)) { + vty_out(vty, " %03u ", i); + vty_out(vty, "%-40s%s", osmo_bts_feature_name(i), VTY_NEWLINE); + no_features = false; + } + } + + if (no_features) + vty_out(vty, " (not available)%s", VTY_NEWLINE); +} + static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts) { struct pchan_load pl; @@ -468,6 +486,8 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts) bts->bts_ctrs->ctr[BTS_CTR_BTS_OML_FAIL].current, bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL].current, VTY_NEWLINE); + + bts_dump_vty_features(vty, bts); } DEFUN(show_bts, show_bts_cmd, "show bts [<0-255>]", |