[PATCH] libosmo-sccp[master]: vty: move sccp_addressbook from _sg to _addr

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/.

dexter gerrit-no-reply at lists.osmocom.org
Mon Jul 3 14:07:50 UTC 2017


Hello Neels Hofmeyr, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/3103

to look at the new patch set (#3).

vty: move sccp_addressbook from _sg to _addr

The installation of the vty commands for the sccp addressbook is
currently located in osmo_ss7_vty_init_sg(), which is normally
used in signalling gateway applications. It makes sense to
put the addressbook feature in a separate function to be able
to decide later whether the feature is needed or not.

Add new function osmo_ss7_vty_init_addr()

Change-Id: Ib49ab623055e9ada7f95e0163ba7e33c5f6f99cb
---
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7_vty.c
2 files changed, 28 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/03/3103/3

diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index caf12f5..f6bfa5d 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -456,6 +456,7 @@
 /* VTY related */
 struct vty;
 void osmo_ss7_set_vty_alloc_ctx(void *ctx);
+void osmo_ss7_vty_init_addr(void);
 void osmo_ss7_vty_init_asp(void);
 void osmo_ss7_vty_init_sg(void);
 int osmo_ss7_vty_go_parent(struct vty *vty);
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index b06f554..517caa5 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1630,31 +1630,9 @@
 	install_element(L_CS7_AS_NODE, &as_pc_override_cmd);
 }
 
-void osmo_ss7_vty_init_asp(void)
+/* Commands for SCCP-Addressbook */
+void osmo_ss7_vty_init_addr(void)
 {
-	vty_init_shared();
-}
-
-void osmo_ss7_vty_init_sg(void)
-{
-	vty_init_shared();
-
-	install_node(&rtable_node, NULL);
-	vty_install_default(L_CS7_RTABLE_NODE);
-	install_element_ve(&show_cs7_route_cmd);
-	install_element(L_CS7_NODE, &cs7_route_table_cmd);
-	install_element(L_CS7_RTABLE_NODE, &cfg_description_cmd);
-	install_element(L_CS7_RTABLE_NODE, &cs7_rt_upd_cmd);
-	install_element(L_CS7_RTABLE_NODE, &cs7_rt_rem_cmd);
-
-	install_node(&xua_node, NULL);
-	vty_install_default(L_CS7_XUA_NODE);
-	install_element(L_CS7_NODE, &cs7_xua_cmd);
-	install_element(L_CS7_NODE, &no_cs7_xua_cmd);
-	install_element(L_CS7_XUA_NODE, &xua_local_ip_cmd);
-	install_element(L_CS7_XUA_NODE, &xua_accept_dyn_asp_cmd);
-
-	/* Commands for SCCP-Addressbook */
 	install_node(&sccpaddr_node, NULL);
 	vty_install_default(L_CS7_SCCPADDR_NODE);
 	install_element(L_CS7_NODE, &cs7_show_sccpaddr_cmd);
@@ -1687,6 +1665,31 @@
 	install_element(L_CS7_SCCPADDR_GT_NODE, &cs7_sccpaddr_gt_digits_cmd);
 }
 
+void osmo_ss7_vty_init_asp(void)
+{
+	vty_init_shared();
+}
+
+void osmo_ss7_vty_init_sg(void)
+{
+	vty_init_shared();
+
+	install_node(&rtable_node, NULL);
+	vty_install_default(L_CS7_RTABLE_NODE);
+	install_element_ve(&show_cs7_route_cmd);
+	install_element(L_CS7_NODE, &cs7_route_table_cmd);
+	install_element(L_CS7_RTABLE_NODE, &cfg_description_cmd);
+	install_element(L_CS7_RTABLE_NODE, &cs7_rt_upd_cmd);
+	install_element(L_CS7_RTABLE_NODE, &cs7_rt_rem_cmd);
+
+	install_node(&xua_node, NULL);
+	vty_install_default(L_CS7_XUA_NODE);
+	install_element(L_CS7_NODE, &cs7_xua_cmd);
+	install_element(L_CS7_NODE, &no_cs7_xua_cmd);
+	install_element(L_CS7_XUA_NODE, &xua_local_ip_cmd);
+	install_element(L_CS7_XUA_NODE, &xua_accept_dyn_asp_cmd);
+}
+
 void osmo_ss7_set_vty_alloc_ctx(void *ctx)
 {
 	g_ctx = ctx;

-- 
To view, visit https://gerrit.osmocom.org/3103
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib49ab623055e9ada7f95e0163ba7e33c5f6f99cb
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list