summaryrefslogtreecommitdiffstats
path: root/gsm_bs.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg2010-05-30 15:54:28 +0200
committerAndreas Eversberg2010-05-30 15:54:28 +0200
commit4da31ce07bd09e87ca1199a7cb060baa15b31d4e (patch)
tree44abbabff6d0c0707bbdc587253bb01c5f198450 /gsm_bs.cpp
parentSplitted GSM support into BS (network) and MS (mobile) part. (diff)
downloadlcr-4da31ce07bd09e87ca1199a7cb060baa15b31d4e.tar.gz
lcr-4da31ce07bd09e87ca1199a7cb060baa15b31d4e.tar.xz
lcr-4da31ce07bd09e87ca1199a7cb060baa15b31d4e.zip
Tested and fixed the new OpenBSC API.
modified: Makefile.in modified: config.h.in modified: configure modified: gsm_bs.cpp
Diffstat (limited to 'gsm_bs.cpp')
-rw-r--r--gsm_bs.cpp25
1 files changed, 25 insertions, 0 deletions
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 <osmocore/talloc.h>
#include <openbsc/mncc.h>
#include <openbsc/trau_frame.h>
+//#include <osmocom/vty/command.h>
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);