aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-11-11 13:41:56 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-11-20 17:35:46 +0100
commit58ec07d580d1e3e93908e6383b5b1f969eba39cc (patch)
tree9ac4160634b0008a6fbc72266a3ec243894cf5ec
parent71465c21f40369be62cfc6165994cfd4ebe5bdd3 (diff)
[bsc] Add BSC specific config option... currently and empty show is implemented
In the future this should give a list of SCCP connections and their allocated radio resources/users...
-rw-r--r--openbsc/src/Makefile.am2
-rw-r--r--openbsc/src/bsc_msc_ip.c5
-rw-r--r--openbsc/src/vty_interface_bsc.c48
3 files changed, 49 insertions, 6 deletions
diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am
index e6c5fb743..8bcb031ab 100644
--- a/openbsc/src/Makefile.am
+++ b/openbsc/src/Makefile.am
@@ -24,7 +24,7 @@ libsccp_a_SOURCES = sccp/sccp.c
bsc_hack_SOURCES = bsc_hack.c bsc_init.c vty_interface.c vty_interface_layer3.c
bsc_hack_LDADD = libmsc.a libbsc.a libmsc.a libvty.a -ldl -ldbi $(LIBCRYPT)
-bsc_msc_ip_SOURCES = bssap.c bsc_msc_ip.c bsc_init.c vty_interface.c
+bsc_msc_ip_SOURCES = bssap.c bsc_msc_ip.c bsc_init.c vty_interface.c vty_interface_bsc.c
bsc_msc_ip_LDADD = libbsc.a libvty.a libsccp.a
bs11_config_SOURCES = bs11_config.c abis_nm.c gsm_data.c msgb.c debug.c \
diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c
index 7e810cf66..9153af83f 100644
--- a/openbsc/src/bsc_msc_ip.c
+++ b/openbsc/src/bsc_msc_ip.c
@@ -110,11 +110,6 @@ struct gsm_subscriber *find_subscriber(u_int8_t type, const char *mi_string)
-/* BSC -> MSC hooks */
-void bsc_vty_init_extra(void)
-{
-}
-
/* SCCP handling */
void msc_outgoing_sccp_data(struct sccp_connection *conn, struct msgb *msg, unsigned int len)
{
diff --git a/openbsc/src/vty_interface_bsc.c b/openbsc/src/vty_interface_bsc.c
new file mode 100644
index 000000000..346ed007f
--- /dev/null
+++ b/openbsc/src/vty_interface_bsc.c
@@ -0,0 +1,48 @@
+/* OpenBSC interface to quagga VTY - BSC options */
+/* (C) 2009 by Harald Welte <laforge@gnumonks.org>
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <vty/command.h>
+#include <vty/buffer.h>
+#include <vty/vty.h>
+
+#include <openbsc/gsm_data.h>
+
+static struct gsmnet *gsmnet = NULL;
+
+DEFUN(show_bsc, show_bsc_cmd, "show bsc",
+ SHOW_STR "Display information about the BSC\n")
+{
+ vty_out(vty, "BSC... not implemented yet%s", VTY_NEWLINE);
+ return CMD_SUCCESS;
+}
+
+int bsc_vty_init_extra(struct gsm_network *net)
+{
+ gsmnet = net;
+
+ /* get runtime information */
+ install_element(VIEW_NODE, &show_bsc_cmd);
+
+ return 0;
+}