path: root/openbsc/src/libmsc/a_iface.c
diff options
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/libmsc/a_iface.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/libmsc/a_iface.c')
1 files changed, 2 insertions, 12 deletions
diff --git a/openbsc/src/libmsc/a_iface.c b/openbsc/src/libmsc/a_iface.c
index c6b446b14..ce38e20db 100644
--- a/openbsc/src/libmsc/a_iface.c
+++ b/openbsc/src/libmsc/a_iface.c
@@ -38,9 +38,6 @@
#include <osmocom/core/byteswap.h>
#include <osmocom/sccp/sccp_types.h>
-#define SSN_BSSAP 254 /* SCCP_SSN_BSSAP */
-#define SENDER_PC 1 /* Our local point code */
/* A pointer to the GSM network we work with. By the current paradigm,
* there can only be one gsm_network per MSC. The pointer is set once
* when calling a_init() */
@@ -383,22 +380,15 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu)
/* Initalize A interface connection between to MSC and BSC */
-int a_init(void *ctx, const char *name, uint32_t local_pc,
- const char *listen_addr, const char *remote_addr, uint16_t local_port, struct gsm_network *network)
+int a_init(void *ctx, struct osmo_sccp_instance *sccp, struct gsm_network *network)
/* FIXME: Remove hardcoded parameters, use parameters in parameter list */
- struct osmo_sccp_instance *sccp;
LOGP(DMSC, LOGL_NOTICE, "Initalizing SCCP connection to stp...\n");
gsm_network = network;
- osmo_ss7_init();
/* SCCP Protocol stack */
- sccp =
- osmo_sccp_simple_client(NULL, name, SENDER_PC, OSMO_SS7_ASP_PROT_M3UA, 0, NULL, M3UA_PORT,
- "");
- osmo_sccp_user_bind(sccp, name, sccp_sap_up, SSN_BSSAP);
+ osmo_sccp_user_bind(sccp, "OsmoMSC-A", sccp_sap_up, SCCP_SSN_BSSAP);
return 0;