diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2016-05-21 17:35:57 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-09-01 23:41:10 +0200 |
commit | 6292c8d44d0c5b053518cbdf20b2384090aa03a3 (patch) | |
tree | bbf94ae7b5e80f53d752379251ddafca0784cfff /openbsc/src/gprs/sgsn_main.c | |
parent | 9bc42ec47b292ce2b51dc1967458e228eb0bf221 (diff) |
IuPS: osmo-sgsn: add core IuPS impl, call iu_init()
Add main Iu entry points for IuPS:
* gsm0408_gprs_rcvmsg_iu()
* sgsn_ranap_iu_event()
* sgsn_ranap_rab_ass_resp()
Add main MM context management for IuPS:
* sgsn_mm_ctx_by_ue_ctx()
* sgsn_mm_ctx_alloc_iu()
Call iu_init() from sgsn_main.c.
Add asn_debug impl ("extern" from libasn1c).
Initialize asn_debug VTY command (iu_vty_init()).
osmo-sgsn build: add libiu and libasn1c, libosmo-sigtran, libosmo-ranap
Change-Id: I469ae6ca9ef254d04ee0d2d79bdd65aebcd027b5
Diffstat (limited to 'openbsc/src/gprs/sgsn_main.c')
-rw-r--r-- | openbsc/src/gprs/sgsn_main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c index 52fc98561..7d533c060 100644 --- a/openbsc/src/gprs/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -56,6 +56,8 @@ #include <openbsc/sgsn.h> #include <openbsc/gprs_llc.h> #include <openbsc/gprs_gmm.h> +#include <openbsc/iu.h> + #include <osmocom/ctrl/control_if.h> #include <osmocom/ctrl/ports.h> @@ -300,6 +302,13 @@ static const struct log_info gprs_log_info = { .num_cat = ARRAY_SIZE(gprs_categories), }; +/* Implement the extern asn_debug from libasn1c to indicate whether the ASN.1 + * binary code decoded and encoded during Iu communication should be logged to + * stderr. See osmocom's libasn1c, asn_internal.h, at "if (asn_debug)": + * http://git.osmocom.org/libasn1c/tree/include/asn1c/asn_internal.h */ +int asn_debug = 0; + +int sgsn_ranap_iu_event(struct ue_conn_ctx *ctx, enum iu_event_type type, void *data); int main(int argc, char **argv) { @@ -326,6 +335,9 @@ int main(int argc, char **argv) osmo_stats_vty_add_cmds(&gprs_log_info); sgsn_vty_init(); ctrl_vty_init(tall_bsc_ctx); +#ifdef BUILD_IU + iu_vty_init(&asn_debug); +#endif handle_options(argc, argv); @@ -417,6 +429,10 @@ int main(int argc, char **argv) } } +#ifdef BUILD_IU + iu_init(tall_bsc_ctx, "127.0.0.2", 14001, gsm0408_gprs_rcvmsg_iu, sgsn_ranap_iu_event); +#endif + if (daemonize) { rc = osmo_daemonize(); if (rc < 0) { |