This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: osmo_ss7_vty: Add 'show cs7 instance <0-15> users' command
......................................................................
osmo_ss7_vty: Add 'show cs7 instance <0-15> users' command
This will list which Service Indicators have bound local users (like SCCP)
Change-Id: Ibb21810e2ebe520e07cfdda3a0c62172b152015e
---
M src/osmo_ss7_vty.c
1 file changed, 28 insertions(+), 0 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index d97610d..40f99b1 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -178,6 +178,32 @@
return 0;
}
+DEFUN(show_cs7_user, show_cs7_user_cmd,
+ "show cs7 instance <0-15> users",
+ SHOW_STR CS7_STR INST_STR INST_STR "User Table\n")
+{
+ int id = atoi(argv[0]);
+ struct osmo_ss7_instance *inst;
+ unsigned int i;
+
+ inst = osmo_ss7_instance_find(id);
+ if (!inst) {
+ vty_out(vty, "No SS7 instance %d found%s", id, VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(inst->user); i++) {
+ const struct osmo_ss7_user *user = inst->user[i];
+ if (!user)
+ continue;
+ vty_out(vty, "SI %u: %s%s", i, user->name, VTY_NEWLINE);
+ }
+
+ return CMD_SUCCESS;
+}
+
+/* TODO: Links + Linksets */
+
/***********************************************************************
* Routing Table Configuration
***********************************************************************/
@@ -897,6 +923,8 @@
static void vty_init_shared(void)
{
+ install_element_ve(&show_cs7_user_cmd);
+
/* the mother of all VTY config nodes */
install_element(CONFIG_NODE, &cs7_instance_cmd);
--
To view, visit https://gerrit.osmocom.org/2333
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb21810e2ebe520e07cfdda3a0c62172b152015e
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder