laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-sccp/+/32299 )
Change subject: vty: Add new "show cs7 instance <0-15> point-codes"
command
......................................................................
vty: Add new "show cs7 instance <0-15> point-codes" command
This is a comment supported on Cisco ITP.
Change-Id: I2908dc5d9f18610352b7ed7ec8ca814ae3736359
---
M src/osmo_ss7_vty.c
1 file changed, 40 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/99/32299/1
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index acded2b..8504473 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -282,6 +282,34 @@
return CMD_SUCCESS;
}
+DEFUN(show_cs7_pc, show_cs7_pc_cmd,
+ "show cs7 instance <0-15> point-codes",
+ SHOW_STR CS7_STR INST_STR INST_STR "Point Codes we are responding to\n")
+{
+ int id = atoi(argv[0]);
+ struct osmo_ss7_instance *inst;
+
+ inst = osmo_ss7_instance_find(id);
+ if (!inst) {
+ vty_out(vty, "No SS7 instance %d found%s", id, VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ vty_out(vty, "CS7 Point Code Type Status%s", VTY_NEWLINE);
+ vty_out(vty, "-------------- ---------- ---------------%s", VTY_NEWLINE);
+ if (osmo_ss7_pc_is_valid(inst->cfg.primary_pc)) {
+ vty_out(vty, "%s %s %s%s", osmo_ss7_pointcode_print(inst,
inst->cfg.primary_pc),
+ "local", "active", VTY_NEWLINE);
+ }
+ if (osmo_ss7_pc_is_valid(inst->cfg.secondary_pc)) {
+ vty_out(vty, "%s %s %s%s", osmo_ss7_pointcode_print(inst,
inst->cfg.secondary_pc),
+ "secondary", "active", VTY_NEWLINE);
+ }
+
+ return CMD_SUCCESS;
+}
+
+
/* TODO: Links + Linksets */
/***********************************************************************
@@ -2097,6 +2125,7 @@
NO_STR "Disable quirk to work around interop issues\n",
"\n", "\n", 0);
+ install_lib_element_ve(&show_cs7_pc_cmd);
install_lib_element_ve(&show_cs7_user_cmd);
install_lib_element_ve(&show_cs7_xua_cmd);
install_lib_element_ve(&show_cs7_config_cmd);
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/32299
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I2908dc5d9f18610352b7ed7ec8ca814ae3736359
Gerrit-Change-Number: 32299
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange