diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-06-23 17:36:01 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-06-23 18:23:44 +0200 |
commit | 628cf3d0db67ecdd688a14f66439d746cd681b6f (patch) | |
tree | 7a36b0bac4559061566d8dd40fd6e17084120ce8 /openbsc/src/libiu | |
parent | 5600a21a6502230ef2e08ebb9b3ba9b7fc869397 (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/libiu')
-rw-r--r-- | openbsc/src/libiu/iu.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/openbsc/src/libiu/iu.c b/openbsc/src/libiu/iu.c index 32891f9ed..1bb530584 100644 --- a/openbsc/src/libiu/iu.c +++ b/openbsc/src/libiu/iu.c @@ -752,8 +752,7 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu) return rc; } -int iu_init(void *ctx, const char *name, uint32_t local_pc, const char *listen_addr, - const char *remote_addr, uint16_t local_port, +int iu_init(void *ctx, struct osmo_sccp_instance *sccp, iu_recv_cb_t iu_recv_cb, iu_event_cb_t iu_event_cb) { talloc_iu_ctx = talloc_named_const(ctx, 1, "iu"); @@ -761,9 +760,8 @@ int iu_init(void *ctx, const char *name, uint32_t local_pc, const char *listen_a global_iu_recv_cb = iu_recv_cb; global_iu_event_cb = iu_event_cb; - g_sccp = osmo_sccp_simple_client(talloc_iu_ctx, name, local_pc, OSMO_SS7_ASP_PROT_M3UA, - local_port, listen_addr, M3UA_PORT, remote_addr); - g_scu = osmo_sccp_user_bind(g_sccp, name, sccp_sap_up, OSMO_SCCP_SSN_RANAP); + g_sccp = sccp; + g_scu = osmo_sccp_user_bind(g_sccp, "OsmoMSC-Iu", sccp_sap_up, OSMO_SCCP_SSN_RANAP); return 0; } |