From 8f444c2bd9d5f3986062401b6ec40dba00825a42 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 14 Jul 2017 14:35:37 +0200 Subject: apply Change-Id: I8fb8a9f77ad682c6409c3abf362f9e1b996dd229 --- src/gprs/Makefile.am | 1 + src/gprs/gtphub_main.c | 35 +++++++++++++++++++++++++++++++---- src/gprs/gtphub_vty.c | 1 + 3 files changed, 33 insertions(+), 4 deletions(-) (limited to 'src/gprs') 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 #include +#include + #include #include #include @@ -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 \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 extern struct sgsn_instance *sgsn; +extern void *tall_bsc_ctx; static struct gtphub *g_hub = 0; static struct gtphub_cfg *g_cfg = 0; -- cgit v1.2.3