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: Add "show cs7 (m3ua}sua}ipa)" command to show xUA servers
......................................................................
Add "show cs7 (m3ua}sua}ipa)" command to show xUA servers
Change-Id: If072e009f4a95a66e0da1576958ab4d3e227d87e
---
M src/osmo_ss7_vty.c
1 file changed, 37 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 cbbb9e3..403a9ac 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -497,6 +497,42 @@
vty_out(vty, " accept-asp-connections dynamic-permitted%s", VTY_NEWLINE);
}
+static void vty_dump_xua_server(struct vty *vty, struct osmo_xua_server *xs)
+{
+ vty_out(vty, "xUA server for %s on %s:%u%s",
+ get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto),
+ xs->cfg.local.host ? xs->cfg.local.host : "0.0.0.0",
+ xs->cfg.local.port, VTY_NEWLINE);
+}
+
+/* List all addressbook entries */
+DEFUN(show_cs7_xua, show_cs7_xua_cmd,
+ "show cs7 "XUA_VAR_STR" [<0-65534>]",
+ SHOW_STR CS7_STR XUA_VAR_HELP_STR "Port Number")
+{
+ struct osmo_ss7_instance *inst;
+ struct osmo_xua_server *xs;
+ enum osmo_ss7_asp_protocol proto = parse_asp_proto(argv[0]);
+
+ llist_for_each_entry(inst, &osmo_ss7_instances, list) {
+ if (argc > 1) {
+ int port = atoi(argv[1]);
+ xs = osmo_ss7_xua_server_find(inst, proto, port);
+ if (!xs) {
+ vty_out(vty, "%% No matching server found%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+ vty_dump_xua_server(vty, xs);
+ } else {
+ llist_for_each_entry(xs, &inst->xua_servers, list) {
+ if (xs->cfg.proto == proto)
+ vty_dump_xua_server(vty, xs);
+ }
+ }
+ }
+ return CMD_SUCCESS;
+}
+
/***********************************************************************
* Application Server Process
@@ -1721,6 +1757,7 @@
g_ctx = ctx;
install_element_ve(&show_cs7_user_cmd);
+ install_element_ve(&show_cs7_xua_cmd);
/* the mother of all VTY config nodes */
install_element(CONFIG_NODE, &cs7_instance_cmd);
--
To view, visit https://gerrit.osmocom.org/4938
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If072e009f4a95a66e0da1576958ab4d3e227d87e
Gerrit-PatchSet: 2
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