diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-07-13 03:23:30 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-07-13 03:23:30 +0200 |
commit | 5307472ba2a3e1bbb1df314541e5d7ef670fb82f (patch) | |
tree | e951beb03c018ebedcd0def80ef35927b01ad9e4 /src/gprs | |
parent | 2739d28ac8884c0e0085f357b578f8ed8e9443c0 (diff) |
apply
Change-Id: Iadd9af732cf8bc19d17eab214325d3659459fd8b
Diffstat (limited to 'src/gprs')
-rw-r--r-- | src/gprs/gb_proxy_main.c | 1 | ||||
-rw-r--r-- | src/gprs/gprs_llc.c | 3 | ||||
-rw-r--r-- | src/gprs/gprs_llc_vty.c | 1 | ||||
-rw-r--r-- | src/gprs/gprs_sndcp_vty.c | 1 | ||||
-rw-r--r-- | src/gprs/sgsn_ares.c | 2 | ||||
-rw-r--r-- | src/gprs/sgsn_ctrl.c | 1 | ||||
-rw-r--r-- | src/gprs/sgsn_main.c | 38 | ||||
-rw-r--r-- | src/gprs/sgsn_vty.c | 2 |
8 files changed, 37 insertions, 12 deletions
diff --git a/src/gprs/gb_proxy_main.c b/src/gprs/gb_proxy_main.c index 70f6c7db0..f4b05fae0 100644 --- a/src/gprs/gb_proxy_main.c +++ b/src/gprs/gb_proxy_main.c @@ -205,7 +205,6 @@ int gbproxy_vty_go_parent(struct vty *vty) { switch (vty->node) { case GBPROXY_NODE: - case SGSN_NODE: default: if (gbproxy_vty_is_config_node(vty, vty->node)) vty->node = CONFIG_NODE; diff --git a/src/gprs/gprs_llc.c b/src/gprs/gprs_llc.c index 2be663f98..904ec7e07 100644 --- a/src/gprs/gprs_llc.c +++ b/src/gprs/gprs_llc.c @@ -31,15 +31,14 @@ #include <osmocom/core/talloc.h> #include <osmocom/core/rate_ctr.h> #include <osmocom/gprs/gprs_bssgp.h> +#include <osmocom/gsm/gsm_utils.h> -#include <openbsc/gsm_data.h> #include <openbsc/debug.h> #include <openbsc/gprs_sgsn.h> #include <openbsc/gprs_gmm.h> #include <openbsc/gprs_llc.h> #include <openbsc/crc24.h> #include <openbsc/sgsn.h> -#include <openbsc/gsm_subscriber.h> #include <openbsc/gprs_llc_xid.h> #include <openbsc/gprs_sndcp_comp.h> #include <openbsc/gprs_sndcp.h> diff --git a/src/gprs/gprs_llc_vty.c b/src/gprs/gprs_llc_vty.c index bf34e9782..626d6ef1b 100644 --- a/src/gprs/gprs_llc_vty.c +++ b/src/gprs/gprs_llc_vty.c @@ -27,7 +27,6 @@ #include <arpa/inet.h> -#include <openbsc/gsm_data.h> #include <osmocom/core/msgb.h> #include <osmocom/gsm/tlv.h> #include <osmocom/core/talloc.h> diff --git a/src/gprs/gprs_sndcp_vty.c b/src/gprs/gprs_sndcp_vty.c index 430881fc8..4bad8b040 100644 --- a/src/gprs/gprs_sndcp_vty.c +++ b/src/gprs/gprs_sndcp_vty.c @@ -26,7 +26,6 @@ #include <arpa/inet.h> -#include <openbsc/gsm_data.h> #include <osmocom/core/msgb.h> #include <osmocom/gsm/tlv.h> #include <osmocom/core/talloc.h> diff --git a/src/gprs/sgsn_ares.c b/src/gprs/sgsn_ares.c index d94d184a3..623809911 100644 --- a/src/gprs/sgsn_ares.c +++ b/src/gprs/sgsn_ares.c @@ -24,6 +24,8 @@ #include <netdb.h> +extern void *tall_bsc_ctx; + struct cares_event_fd { struct llist_head head; struct osmo_fd fd; diff --git a/src/gprs/sgsn_ctrl.c b/src/gprs/sgsn_ctrl.c index 31ac74f1f..f7b1180be 100644 --- a/src/gprs/sgsn_ctrl.c +++ b/src/gprs/sgsn_ctrl.c @@ -21,7 +21,6 @@ #include <osmocom/ctrl/control_if.h> #include <osmocom/ctrl/control_cmd.h> -#include <openbsc/gsm_data.h> #include <openbsc/gprs_sgsn.h> #include <openbsc/sgsn.h> #include <openbsc/debug.h> diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c index 5af23321a..a543ae214 100644 --- a/src/gprs/sgsn_main.c +++ b/src/gprs/sgsn_main.c @@ -167,13 +167,40 @@ static void signal_handler(int signal) /* NSI that BSSGP uses when transmitting on NS */ extern struct gprs_ns_inst *bssgp_nsi; -extern int bsc_vty_go_parent(struct vty *vty); +int sgsn_vty_is_config_node(struct vty *vty, int node) +{ + switch (node) { + /* add items that are not config */ + case CONFIG_NODE: + return 0; + + default: + return 1; + } +} + +int sgsn_vty_go_parent(struct vty *vty) +{ + switch (vty->node) { + case SGSN_NODE: + default: + if (sgsn_vty_is_config_node(vty, vty->node)) + vty->node = CONFIG_NODE; + else + vty->node = ENABLE_NODE; + + vty->index = NULL; + } + + return vty->node; +} + static struct vty_app_info vty_info = { .name = "OsmoSGSN", .version = PACKAGE_VERSION, - .go_parent_cb = bsc_vty_go_parent, - .is_config_node = bsc_vty_is_config_node, + .go_parent_cb = sgsn_vty_go_parent, + .is_config_node = sgsn_vty_is_config_node, }; static void print_help(void) @@ -319,12 +346,11 @@ static const struct log_info gprs_log_info = { .num_cat = ARRAY_SIZE(gprs_categories), }; -int sgsn_ranap_iu_event(struct ue_conn_ctx *ctx, enum ranap_iu_event_type type, void *data); +int sgsn_ranap_iu_event(struct ranap_ue_conn_ctx *ctx, enum ranap_iu_event_type type, void *data); int main(int argc, char **argv) { struct ctrl_handle *ctrl; - struct gsm_network dummy_network; struct osmo_sccp_instance *sccp; int rc; @@ -382,7 +408,7 @@ int main(int argc, char **argv) } /* start telnet after reading config for vty_get_bind_addr() */ - rc = telnet_init_dynif(tall_bsc_ctx, &dummy_network, + rc = telnet_init_dynif(tall_bsc_ctx, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_SGSN); if (rc < 0) exit(1); diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index 77eb32bb6..a0c7b27f7 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -50,6 +50,8 @@ #include <osmocom/ranap/iu_client.h> #endif +extern void *tall_bsc_ctx; + static struct sgsn_config *g_cfg = NULL; const struct value_string sgsn_auth_pol_strs[] = { |