aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-14 14:35:37 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-14 14:35:37 +0200
commit8f444c2bd9d5f3986062401b6ec40dba00825a42 (patch)
treebbc0c0b307541522137d2a019fce0f8ef21f8a56
parent47febd9409364680c594bed62925ff761b20223f (diff)
apply
-rw-r--r--src/gprs/Makefile.am1
-rw-r--r--src/gprs/gtphub_main.c35
-rw-r--r--src/gprs/gtphub_vty.c1
-rw-r--r--src/libcommon/common_vty.c1
-rw-r--r--tests/gbproxy/Makefile.am3
-rw-r--r--tests/gbproxy/gbproxy_test.c2
-rw-r--r--tests/oap/Makefile.am2
-rw-r--r--tests/sgsn/Makefile.am3
8 files changed, 38 insertions, 10 deletions
diff --git a/src/gprs/Makefile.am b/src/gprs/Makefile.am
index a2be90591..654604b80 100644
--- a/src/gprs/Makefile.am
+++ b/src/gprs/Makefile.am
@@ -93,6 +93,7 @@ osmo_sgsn_SOURCES = \
gprs_llc_xid.c \
v42bis.c \
gsup_client.c \
+ oap_client.c \
$(NULL)
osmo_sgsn_LDADD = \
$(OSMO_LIBS) \
diff --git a/src/gprs/gtphub_main.c b/src/gprs/gtphub_main.c
index 73a122c31..800fe3161 100644
--- a/src/gprs/gtphub_main.c
+++ b/src/gprs/gtphub_main.c
@@ -39,6 +39,8 @@
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/vty/ports.h>
+#include <osmocom/sigtran/osmo_ss7.h>
+
#include <openbsc/debug.h>
#include <openbsc/gtphub.h>
#include <openbsc/vty.h>
@@ -46,7 +48,7 @@
#include "../../bscconfig.h"
extern void *osmo_gtphub_ctx;
-
+void *tall_bsc_ctx;
const char *gtphub_copyright =
"Copyright (C) 2015 sysmocom s.f.m.c GmbH <info@sysmocom.de>\r\n"
@@ -112,13 +114,38 @@ static void signal_handler(int signal)
}
}
-extern int bsc_vty_go_parent(struct vty *vty);
+int gtphub_vty_go_parent(struct vty *vty)
+{
+ switch (vty->node) {
+ default:
+ osmo_ss7_vty_go_parent(vty);
+ }
+
+ return vty->node;
+}
+
+int gtphub_vty_is_config_node(struct vty *vty, int node)
+{
+ /* Check if libosmo-sccp declares the node in
+ * question as config node */
+ if (osmo_ss7_is_config_node(vty, node))
+ return 1;
+
+ switch (node) {
+ /* add items that are not config */
+ case CONFIG_NODE:
+ return 0;
+
+ default:
+ return 1;
+ }
+}
static struct vty_app_info vty_info = {
.name = "OsmoGTPhub",
.version = PACKAGE_VERSION,
- .go_parent_cb = bsc_vty_go_parent,
- .is_config_node = bsc_vty_is_config_node,
+ .go_parent_cb = gtphub_vty_go_parent,
+ .is_config_node = gtphub_vty_is_config_node,
};
struct cmdline_cfg {
diff --git a/src/gprs/gtphub_vty.c b/src/gprs/gtphub_vty.c
index a30ad2a54..d611b1f9a 100644
--- a/src/gprs/gtphub_vty.c
+++ b/src/gprs/gtphub_vty.c
@@ -37,6 +37,7 @@
* globals. */
#include <openbsc/sgsn.h>
extern struct sgsn_instance *sgsn;
+extern void *tall_bsc_ctx;
static struct gtphub *g_hub = 0;
static struct gtphub_cfg *g_cfg = 0;
diff --git a/src/libcommon/common_vty.c b/src/libcommon/common_vty.c
index 1443791f0..856583e0c 100644
--- a/src/libcommon/common_vty.c
+++ b/src/libcommon/common_vty.c
@@ -24,7 +24,6 @@
#include <osmocom/core/talloc.h>
#include <openbsc/vty.h>
-#include <openbsc/gsm_data.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/bsc_nat.h>
diff --git a/tests/gbproxy/Makefile.am b/tests/gbproxy/Makefile.am
index 2dd66dfd4..3291839b6 100644
--- a/tests/gbproxy/Makefile.am
+++ b/tests/gbproxy/Makefile.am
@@ -40,9 +40,6 @@ gbproxy_test_LDADD = \
$(top_builddir)/src/gprs/gprs_llc_parse.o \
$(top_builddir)/src/gprs/crc24.o \
$(top_builddir)/src/gprs/gprs_utils.o \
- $(top_builddir)/src/libcommon/libcommon.a \
- $(top_builddir)/src/libbsc/libbsc.a \
- $(top_builddir)/src/libtrau/libtrau.a \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGB_LIBS) \
$(LIBOSMOGSM_LIBS) \
diff --git a/tests/gbproxy/gbproxy_test.c b/tests/gbproxy/gbproxy_test.c
index 577daa95e..9672dcba6 100644
--- a/tests/gbproxy/gbproxy_test.c
+++ b/tests/gbproxy/gbproxy_test.c
@@ -49,6 +49,8 @@
#define MATCH_ANY (-1)
+void *tall_bsc_ctx;
+
struct gbproxy_config gbcfg = {0};
struct llist_head *received_messages = NULL;
diff --git a/tests/oap/Makefile.am b/tests/oap/Makefile.am
index 1bb672d44..5f8bbc5c2 100644
--- a/tests/oap/Makefile.am
+++ b/tests/oap/Makefile.am
@@ -29,7 +29,7 @@ oap_client_test_SOURCES = \
oap_client_test_LDADD = \
$(top_builddir)/src/gprs/gprs_utils.o \
- $(top_builddir)/src/libcommon/libcommon.a \
+ $(top_builddir)/src/gprs/oap_client.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
-lrt
diff --git a/tests/sgsn/Makefile.am b/tests/sgsn/Makefile.am
index ccb8f44f4..36026dd56 100644
--- a/tests/sgsn/Makefile.am
+++ b/tests/sgsn/Makefile.am
@@ -60,7 +60,8 @@ sgsn_test_LDADD = \
$(top_builddir)/src/gprs/gprs_sndcp_pcomp.o \
$(top_builddir)/src/gprs/v42bis.o \
$(top_builddir)/src/gprs/gprs_sndcp_dcomp.o \
- $(top_builddir)/src/libcommon/libcommon.a \
+ $(top_builddir)/src/gprs/gsup_client.o \
+ $(top_builddir)/src/gprs/oap_client.o \
$(LIBOSMOABIS_LIBS) \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \