aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/src/bsc_hack.c12
-rw-r--r--openbsc/src/gprs/gb_proxy_main.c11
-rw-r--r--openbsc/src/gprs/sgsn_main.c11
-rw-r--r--openbsc/src/mgcp/mgcp_main.c10
4 files changed, 40 insertions, 4 deletions
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c
index 739d7a54..a107fcb2 100644
--- a/openbsc/src/bsc_hack.c
+++ b/openbsc/src/bsc_hack.c
@@ -198,10 +198,20 @@ extern int bts_model_unknown_init(void);
extern int bts_model_bs11_init(void);
extern int bts_model_nanobts_init(void);
+extern int bsc_vty_go_parent(struct vty *vty);
+
+static struct vty_app_info vty_info = {
+ .name = "OpenBSC",
+ .version = PACKAGE_VERSION,
+ .go_parent_cb = bsc_vty_go_parent,
+};
+
int main(int argc, char **argv)
{
int rc;
+ vty_info.copyright = openbsc_copyright;
+
log_init(&log_info);
tall_bsc_ctx = talloc_named_const(NULL, 1, "openbsc");
talloc_ctx_init();
@@ -219,7 +229,7 @@ int main(int argc, char **argv)
log_set_all_filter(stderr_target, 1);
/* This needs to precede handle_options() */
- vty_init("OpenBSC", PACKAGE_VERSION, openbsc_copyright);
+ vty_init(&vty_info);
bsc_vty_init();
rc = bsc_bootstrap_network(mncc_recv, config_file);
diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c
index 208ae47c..87efb21a 100644
--- a/openbsc/src/gprs/gb_proxy_main.c
+++ b/openbsc/src/gprs/gb_proxy_main.c
@@ -185,6 +185,14 @@ static void handle_options(int argc, char **argv)
extern void *tall_msgb_ctx;
+extern int bsc_vty_go_parent(struct vty *vty);
+
+static struct vty_app_info vty_info = {
+ .name = "Osmocom Gb Proxy",
+ .version = PACKAGE_VERSION,
+ .go_parent_cb = bsc_vty_go_parent,
+};
+
int main(int argc, char **argv)
{
struct gsm_network dummy_network;
@@ -204,7 +212,8 @@ int main(int argc, char **argv)
log_add_target(stderr_target);
log_set_all_filter(stderr_target, 1);
- vty_init("Osmocom Gb Proxy", PACKAGE_VERSION, openbsc_copyright);
+ vty_info.copyright = openbsc_copyright;
+ vty_init(&vty_info);
logging_vty_add_cmds();
gbproxy_vty_init();
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c
index 4ed49804..6338f70f 100644
--- a/openbsc/src/gprs/sgsn_main.c
+++ b/openbsc/src/gprs/sgsn_main.c
@@ -125,6 +125,14 @@ static void signal_handler(int signal)
extern struct gprs_ns_inst *bssgp_nsi;
extern void *tall_msgb_ctx;
+extern int bsc_vty_go_parent(struct vty *vty);
+
+static struct vty_app_info vty_info = {
+ .name = "Osmocom SGSN",
+ .version = PACKAGE_VERSION,
+ .go_parent_cb = bsc_vty_go_parent,
+};
+
int main(int argc, char **argv)
{
struct gsm_network dummy_network;
@@ -146,7 +154,8 @@ int main(int argc, char **argv)
log_add_target(stderr_target);
log_set_all_filter(stderr_target, 1);
- vty_init("Osmocom SGSN", PACKAGE_VERSION, openbsc_copyright);
+ vty_info.copyright = openbsc_copyright;
+ vty_init(&vty_info);
logging_vty_add_cmds();
sgsn_vty_init();
diff --git a/openbsc/src/mgcp/mgcp_main.c b/openbsc/src/mgcp/mgcp_main.c
index 35e7fb1d..3ccd7343 100644
--- a/openbsc/src/mgcp/mgcp_main.c
+++ b/openbsc/src/mgcp/mgcp_main.c
@@ -174,6 +174,13 @@ static int read_call_agent(struct bsc_fd *fd, unsigned int what)
return 0;
}
+extern int bsc_vty_go_parent(struct vty *vty);
+
+static struct vty_app_info vty_info = {
+ .name = "OpenBSC MGCP",
+ .version = PACKAGE_VERSION,
+ .go_parent_cb = bsc_vty_go_parent,
+};
int main(int argc, char** argv)
{
@@ -193,7 +200,8 @@ int main(int argc, char** argv)
if (!cfg)
return -1;
- vty_init("OpenBSC MGCP", PACKAGE_VERSION, openbsc_copyright);
+ vty_info.copyright = openbsc_copyright;
+ vty_init(&vty_info);
logging_vty_add_cmds();
mgcp_vty_init();