bsc vty: Provide a show mscs command to show the state of each MSC
This commit is contained in:
parent
5e80cc4adc
commit
c50e04a409
|
@ -356,6 +356,23 @@ DEFUN(show_statistics,
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN(show_mscs,
|
||||||
|
show_mscs_cmd,
|
||||||
|
"show mscs",
|
||||||
|
SHOW_STR "MSC Connections and State\n")
|
||||||
|
{
|
||||||
|
struct osmo_msc_data *msc;
|
||||||
|
llist_for_each_entry(msc, &bsc_gsmnet->bsc_data->mscs, entry) {
|
||||||
|
vty_out(vty, "MSC Nr: %d is connected: %d auth: %d.%s",
|
||||||
|
msc->nr,
|
||||||
|
msc->msc_con ? msc->msc_con->is_connected : -1,
|
||||||
|
msc->msc_con ? msc->msc_con->is_authenticated : -1,
|
||||||
|
VTY_NEWLINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
int bsc_vty_init_extra(void)
|
int bsc_vty_init_extra(void)
|
||||||
{
|
{
|
||||||
install_element(CONFIG_NODE, &cfg_net_msc_cmd);
|
install_element(CONFIG_NODE, &cfg_net_msc_cmd);
|
||||||
|
@ -377,6 +394,7 @@ int bsc_vty_init_extra(void)
|
||||||
install_element(MSC_NODE, &cfg_net_rf_socket_cmd);
|
install_element(MSC_NODE, &cfg_net_rf_socket_cmd);
|
||||||
|
|
||||||
install_element_ve(&show_statistics_cmd);
|
install_element_ve(&show_statistics_cmd);
|
||||||
|
install_element_ve(&show_mscs_cmd);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue