aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-11 18:48:39 +0200
committerHarald Welte <laforge@gnumonks.org>2016-12-02 12:09:16 +0000
commitb90eabfb46aaf5efcc3b5f16fe89b914db4542ea (patch)
tree560bc4da553e66e0c02d5a9e882ea9e7e052ec74 /openbsc/include
parent2c05f75bbf3d9a69eee1fe78eb5552acf1d7671d (diff)
move to libcommon-cs: global vty gsm_network pointer
Move gsmnet_from_vty() and the bsc_gsmnet global to common_cs_vty.c. Rename bsc_gsmnet to vty_global_gsm_network and make it static to common_cs_vty.c, to clearly mark the global variable for VTY use only. Introduce common_cs_vty_init() to set vty_global_gsm_network. Change-Id: I26c5c47de08f899b896813d09612d5cb2f8e42d6
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/common_cs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/common_cs.h b/openbsc/include/openbsc/common_cs.h
index 172d6e621..caecfebf6 100644
--- a/openbsc/include/openbsc/common_cs.h
+++ b/openbsc/include/openbsc/common_cs.h
@@ -7,6 +7,8 @@ struct gsm_network;
typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *);
+struct vty;
+
#define MAX_A5_KEY_LEN (128/8)
struct gsm_encr {
@@ -19,3 +21,6 @@ struct gsm_network *gsm_network_init(void *ctx,
uint16_t country_code,
uint16_t network_code,
mncc_recv_cb_t mncc_recv);
+
+int common_cs_vty_init(struct gsm_network *network);
+struct gsm_network *gsmnet_from_vty(struct vty *v);