diff options
author | Max <msuraev@sysmocom.de> | 2018-11-09 17:13:00 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2018-11-13 15:59:39 +0000 |
commit | c51609aa5c85dc802823393ee3c37abb734db938 (patch) | |
tree | e162da4269bdc2f73d54392033ad6236bb145ec9 /src | |
parent | 5b6ccce1c681853a0312ca8286aa12a63c382638 (diff) |
vty: add command to show all known BSC
Change-Id: I247fdce00f43072b0a2a0122b80bd40cdd9e0128
Diffstat (limited to 'src')
-rw-r--r-- | src/libmsc/msc_vty.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index a16cec894..840559aa6 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -31,6 +31,8 @@ #include <osmocom/gsm/protocol/gsm_08_58.h> #include <osmocom/gsm/protocol/gsm_04_14.h> +#include <osmocom/sigtran/sccp_helpers.h> + #include <osmocom/vty/command.h> #include <osmocom/vty/logging.h> #include <osmocom/vty/misc.h> @@ -47,6 +49,7 @@ #include <osmocom/msc/vlr.h> #include <osmocom/msc/transaction.h> #include <osmocom/msc/db.h> +#include <osmocom/msc/a_iface.h> #include <osmocom/msc/sms_queue.h> #include <osmocom/msc/silent_call.h> #include <osmocom/msc/gsm_04_80.h> @@ -467,6 +470,19 @@ static int config_write_msc(struct vty *vty) return CMD_SUCCESS; } +DEFUN(show_bsc, show_bsc_cmd, + "show bsc", SHOW_STR "BSC\n") +{ + struct bsc_context *bsc_ctx; + struct osmo_ss7_instance *ss7 = osmo_ss7_instance_find(gsmnet->a.cs7_instance); + + llist_for_each_entry(bsc_ctx, &gsmnet->a.bscs, list) { + vty_out(vty, "BSC %s%s", osmo_sccp_addr_name(ss7, &bsc_ctx->bsc_addr), VTY_NEWLINE); + } + + return CMD_SUCCESS; +} + static void vty_conn_hdr(struct vty *vty) { vty_out(vty, "--ConnId ------------Subscriber RAN --LAC Use --Tokens C A5 State%s", @@ -1446,6 +1462,7 @@ void msc_vty_init(struct gsm_network *msc_network) install_element_ve(&show_subscr_cmd); install_element_ve(&show_subscr_cache_cmd); + install_element_ve(&show_bsc_cmd); install_element_ve(&show_msc_conn_cmd); install_element_ve(&show_msc_transaction_cmd); |