aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vty_interface_cmds.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/vty_interface_cmds.c b/src/vty_interface_cmds.c
index 8c4d71d..8697961 100644
--- a/src/vty_interface_cmds.c
+++ b/src/vty_interface_cmds.c
@@ -106,20 +106,36 @@ DEFUN(show_msc, show_msc_cmd,
"show msc",
SHOW_STR "Display the status of the MSC\n")
{
- struct msc_connection *msc = msc_connection_num(bsc, 0);
+ struct msc_connection *msc;
- if (!msc) {
- vty_out(vty, "%%No MSC Connection defined in this app.%s", VTY_NEWLINE);
- return CMD_WARNING;
+ llist_for_each_entry(msc, &bsc->mscs, entry) {
+ vty_out(vty, "MSC link is %s and had %s.%s",
+ msc->msc_link_down == 0 ? "up" : "down",
+ msc->first_contact == 1 ? "no contact" : "contact",
+ VTY_NEWLINE);
}
- vty_out(vty, "MSC link is %s and had %s.%s",
- msc->msc_link_down == 0 ? "up" : "down",
- msc->first_contact == 1 ? "no contact" : "contact",
- VTY_NEWLINE);
return CMD_SUCCESS;
}
+DEFUN(show_mscs, show_mscs_cmd,
+ "show mscs",
+ SHOW_STR "Display the status of all MSCs\n")
+{
+ struct msc_connection *msc;
+
+ llist_for_each_entry(msc, &bsc->mscs, entry) {
+ vty_out(vty, "MSC link nr %d name '%s' is %s and had %s.%s",
+ msc->nr, msc->name,
+ msc->msc_link_down == 0 ? "up" : "down",
+ msc->first_contact == 1 ? "no contact" : "contact",
+ VTY_NEWLINE);
+ }
+
+ return CMD_SUCCESS;
+}
+
+
DEFUN(show_slc, show_slc_cmd,
"show link-set <0-100> slc",
SHOW_STR "LinkSet\n" "Linkset nr\n" "SLS to SLC\n")
@@ -295,6 +311,7 @@ void cell_vty_init_cmds(void)
install_element_ve(&show_slc_cmd);
install_element_ve(&show_msc_cmd);
+ install_element_ve(&show_mscs_cmd);
install_element_ve(&show_sctp_count_cmd);
install_element_ve(&show_sctp_details_cmd);
}