X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=gsm_bs.cpp;h=10d1e8cef8c6f1d9795a3a92098964425cd29a75;hp=fafe7f6ae1e77cfb1cebb9671d931285cc66b870;hb=4da31ce07bd09e87ca1199a7cb060baa15b31d4e;hpb=a12d7eee22a72f4c999535892763dde15212e89e diff --git a/gsm_bs.cpp b/gsm_bs.cpp index fafe7f6..10d1e8c 100644 --- a/gsm_bs.cpp +++ b/gsm_bs.cpp @@ -24,6 +24,7 @@ extern "C" { #include #include #include +//#include struct gsm_network *bsc_gsmnet = 0; extern int ipacc_rtp_direct; extern int bsc_bootstrap_network(int (*mmc_rev)(struct gsm_network *, int, void *), @@ -41,6 +42,26 @@ static struct log_target *stderr_target; /* timer to store statistics */ #define DB_SYNC_INTERVAL 60, 0 static struct timer_list db_sync_timer; + +/* FIXME: copied from the include file, because it will con compile with C++ */ +struct vty_app_info { + const char *name; + const char *version; + char *copyright; + void *tall_ctx; + int (*go_parent_cb)(struct vty *vty); +}; +extern int bsc_vty_go_parent(struct vty *vty); +static struct vty_app_info vty_info = { + "OpenBSC", + PACKAGE_VERSION, + NULL, + NULL, + bsc_vty_go_parent, +}; +void vty_init(struct vty_app_info *app_info); +int bsc_vty_init(void); + } /* timer handling */ @@ -812,6 +833,10 @@ int gsm_bs_init(void) db_sync_timer.data = NULL; bsc_schedule_timer(&db_sync_timer, DB_SYNC_INTERVAL); + /* Init VTY */ + vty_init(&vty_info); + bsc_vty_init(); + /* bootstrap network */ if (gsm->conf.openbsc_cfg[0] == '/') SCPY(cfg, gsm->conf.openbsc_cfg);