aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-01-27 21:52:08 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2021-01-28 13:54:32 +0100
commite43b46e0188882e0dd8cee42d99b157393c04b5c (patch)
treebac2d18d5afc1cab1bfce315fc1082d21c57be2a /src
parent2e1a3a982a048765ffe29437ecb85e93cd13330b (diff)
gprs_ns2: introduce gprs_ns2_vty_init_reduced() for the PCU
The gprs_ns2_vty_init_reduced() call initialized the ns2 vty without configuration nodes (except timeout). The PCU can be only configured by the BTS/BSC. It should not configured by vty. Change-Id: I4437da74bd48ba64d3f16ea67afc26c45b6d3ac9
Diffstat (limited to 'src')
-rw-r--r--src/gb/gprs_ns2_vty.c17
-rw-r--r--src/gb/libosmogb.map1
2 files changed, 17 insertions, 1 deletions
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index b6ae5b46..9db81730 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -1617,7 +1617,12 @@ DEFUN(logging_fltr_nsvc,
return CMD_SUCCESS;
}
-int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi)
+/*! initialized a reduced vty interface which excludes the configuration nodes besides timeouts.
+ * This can be used by the PCU which can be only configured by the BTS/BSC and not by the vty.
+ * \param[in] nsi NS instance on which we operate
+ * \return 0 on success.
+ */
+int gprs_ns2_vty_init_reduced(struct gprs_ns2_inst *nsi)
{
vty_nsi = nsi;
INIT_LLIST_HEAD(&binds);
@@ -1645,6 +1650,16 @@ int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi)
install_node(&ns_node, config_write_ns);
/* TODO: convert into osmo timer */
install_lib_element(L_NS_NODE, &cfg_ns_timer_cmd);
+
+ return 0;
+}
+
+int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi)
+{
+ int rc = gprs_ns2_vty_init_reduced(nsi);
+ if (rc)
+ return rc;
+
install_lib_element(L_NS_NODE, &cfg_ns_nsei_cmd);
install_lib_element(L_NS_NODE, &cfg_no_ns_nsei_cmd);
install_lib_element(L_NS_NODE, &cfg_ns_bind_cmd);
diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map
index 71be117d..a3171d0c 100644
--- a/src/gb/libosmogb.map
+++ b/src/gb/libosmogb.map
@@ -185,6 +185,7 @@ gprs_ns2_start_alive_all_nsvcs;
gprs_ns2_sns_add_endpoint;
gprs_ns2_sns_del_endpoint;
gprs_ns2_vty_init;
+gprs_ns2_vty_init_reduced;
gprs_nsvc_create2;
gprs_nsvc_delete;