aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-06-23 17:36:01 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-07-25 15:14:14 +0200
commit104548372c8d993a2b2cc0d347d6f5de2ae5eec3 (patch)
treee61013e7de4e1c565fb7bd605f54b89daea64a97 /src/gprs
parent79b2387c0b0d27573f1ece42537173bd029713e3 (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: I963a94e1a0bfc455992d22940dcc9c67c44570b9
Diffstat (limited to 'src/gprs')
-rw-r--r--src/gprs/sgsn_main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c
index cb07e92fd..95b81bf2c 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"
@@ -325,6 +327,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));
@@ -435,7 +438,18 @@ int main(int argc, char **argv)
}
#ifdef BUILD_IU
- iu_init(tall_bsc_ctx, "OsmoSGSN", 2, "127.0.0.4", "127.0.0.1", 0, 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) {