diff options
Diffstat (limited to 'src/gprs')
-rw-r--r-- | src/gprs/Makefile.am | 2 | ||||
-rw-r--r-- | src/gprs/sgsn_main.c | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/gprs/Makefile.am b/src/gprs/Makefile.am index cb0997902..e05eb79ff 100644 --- a/src/gprs/Makefile.am +++ b/src/gprs/Makefile.am @@ -34,6 +34,7 @@ OSMO_LIBS = \ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBGTP_LIBS) \ + $(LIBOSMOSIGTRAN_LIBS) \ $(NULL) bin_PROGRAMS = \ @@ -128,5 +129,6 @@ osmo_gtphub_LDADD = \ $(LIBOSMOVTY_LIBS) \ $(LIBCARES_LIBS) \ $(LIBGTP_LIBS) \ + $(LIBOSMOSIGTRAN_LIBS) \ -lrt \ $(NULL) diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c index d5d43ad2a..d56af0ed4 100644 --- a/src/gprs/sgsn_main.c +++ b/src/gprs/sgsn_main.c @@ -63,6 +63,8 @@ #include <osmocom/ctrl/control_if.h> #include <osmocom/ctrl/ports.h> +#include <osmocom/sigtran/protocol/m3ua.h> + #include <gtp.h> #include "../../bscconfig.h" @@ -326,6 +328,7 @@ int main(int argc, char **argv) { struct ctrl_handle *ctrl; struct gsm_network dummy_network; + struct osmo_sccp_instance *sccp; int rc; srand(time(NULL)); @@ -348,6 +351,7 @@ int main(int argc, char **argv) osmo_stats_vty_add_cmds(&gprs_log_info); sgsn_vty_init(&sgsn_inst.cfg); ctrl_vty_init(tall_bsc_ctx); + osmo_ss7_init(); handle_options(argc, argv); @@ -436,7 +440,18 @@ 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); + sccp = osmo_sccp_simple_client(tall_bsc_ctx, "OsmoSGSN", + 2 /* FIXME: configurable */, + OSMO_SS7_ASP_PROT_M3UA, 0, + "127.0.0.4" /* FIXME: configurable */, + M3UA_PORT, + "127.0.0.1" /* FIXME: configurable */); + if (!sccp) { + printf("Setting up SCCP client failed.\n"); + return 8; + } + + iu_init(tall_bsc_ctx, sccp, gsm0408_gprs_rcvmsg_iu, sgsn_ranap_iu_event); #endif if (daemonize) { |