aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-msc/msc_main.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-06-23 17:36:01 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-06-23 18:23:44 +0200
commit628cf3d0db67ecdd688a14f66439d746cd681b6f (patch)
tree7a36b0bac4559061566d8dd40fd6e17084120ce8 /openbsc/src/osmo-msc/msc_main.c
parent5600a21a6502230ef2e08ebb9b3ba9b7fc869397 (diff)
AoIP+3G: use one common SCCP client for A and IuCS
Move osmo_sccp_simple_client() setup out of iu_init() and a_init(). In msc_main.c and sgsn_main.c, initialize the STP connection first and then pass to iu_init() and a_init(). This allows serving 3G (IuCS) and 2G (A) from one and the same MSC instance. Since both OsmoHNBGW and OsmoBSC are using PC 23 by default now, move BSC to PC 42 (because OsmoBSC typically has vty port 4242, bla). Also: a_iface.c: remove now unused defines a_init(): remove osmo_ss7_init() call that duplicated msc_main.c Change-Id: Ib1fb13ea756655f7e9d43636d497a54e6ae9c032
Diffstat (limited to 'openbsc/src/osmo-msc/msc_main.c')
-rw-r--r--openbsc/src/osmo-msc/msc_main.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/openbsc/src/osmo-msc/msc_main.c b/openbsc/src/osmo-msc/msc_main.c
index 3a8e31722..5b4acd2bc 100644
--- a/openbsc/src/osmo-msc/msc_main.c
+++ b/openbsc/src/osmo-msc/msc_main.c
@@ -496,14 +496,22 @@ TODO: we probably want some of the _net_ ctrl commands from bsc_base_ctrl_cmds_i
return 7;
}
- /* Set up A-Interface */
- /* TODO: implement A-Interface and remove above legacy stuff. */
+ /* Set up STP link to receive connections from BSC and HNBGW */
+ msc_network->sccp = osmo_sccp_simple_client(tall_msc_ctx, "OsmoMSC",
+ 1 /* FIXME: configurable */,
+ OSMO_SS7_ASP_PROT_M3UA, 0,
+ "127.0.0.3" /* FIXME: configurable */,
+ M3UA_PORT, "127.0.0.1" /* FIXME: configurable */);
+ if (!msc_network->sccp) {
+ printf("Setting up SCCP client failed.\n");
+ return 8;
+ }
/* Set up IuCS */
- iu_init(tall_msc_ctx, "OsmoMSC_Iu", 1, "127.0.0.3", "127.0.0.1", 0, rcvmsg_iu_cs, rx_iu_event);
+ iu_init(tall_msc_ctx, msc_network->sccp, rcvmsg_iu_cs, rx_iu_event);
/* Set up A interface */
- a_init(tall_msc_ctx, "OsmoMSC_A", 254, "127.0.0.3", "127.0.0.1", 0, msc_network);
+ a_init(tall_msc_ctx, msc_network->sccp, msc_network);
if (msc_cmdline_config.daemonize) {
rc = osmo_daemonize();