aboutsummaryrefslogtreecommitdiffstats
path: root/src/hnbgw.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-31 13:13:24 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-08-09 15:30:14 +0200
commitecbdc5cb06ef7f61c6f4cdb4e1fd84a05ec0407d (patch)
treed37d0f16ebc34830066550a29afd1e3c62e6471e /src/hnbgw.c
parent5e0292a6412a04eeed9e0aff3f56bd8d4f353346 (diff)
make point codes configurable by SCCP address book
In the vty config, use the SCCP address book to configure the local and remote SCCP addresses. Add VTY commands to set the remote SCCP addresses by name, derive the ss7 instance from these addresses: cs7 instance 1 point-code 0.23.0 sccp-address msc point-code 0.0.1 sccp-address sgsn point-code 0.0.2 hnbgw iucs remote-addr msc iups remote-addr sgsn Enforce that both IuCS and IuPS use the same ss7 instance. In the future, we may add the feature to use two separate instances. Depends: libosmo-sccp I75c67d289693f1c2a049ac61cf2b2097d6e5687d, Ie1aedd7894acd69ddc887cd65a8a0df4b888838c, I85b46269dbe7909e52873ace3f720f6292a4516c Change-Id: I33a7ba11eb7c2d9a5dc74d10fb0cf04bf664477b
Diffstat (limited to 'src/hnbgw.c')
-rw-r--r--src/hnbgw.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/hnbgw.c b/src/hnbgw.c
index 5d9f87b..c9fdd53 100644
--- a/src/hnbgw.c
+++ b/src/hnbgw.c
@@ -79,14 +79,6 @@ static struct hnb_gw *hnb_gw_create(void *ctx)
gw->config.iuh_local_ip = talloc_strdup(gw, HNBGW_LOCAL_IP_DEFAULT);
gw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT;
- gw->config.iucs_remote_ip = talloc_strdup(gw,
- HNBGW_IUCS_REMOTE_IP_DEFAULT);
- gw->config.iucs_remote_port = M3UA_PORT;
-
- gw->config.iups_remote_ip = talloc_strdup(gw,
- HNBGW_IUPS_REMOTE_IP_DEFAULT);
- gw->config.iups_remote_port = M3UA_PORT;
-
gw->next_ue_ctx_id = 23;
INIT_LLIST_HEAD(&gw->hnb_list);
INIT_LLIST_HEAD(&gw->ue_list);
@@ -465,6 +457,7 @@ int main(int argc, char **argv)
vty_info.copyright = osmo_hnbgw_copyright;
vty_init(&vty_info);
+ osmo_ss7_vty_init_asp(tall_hnb_ctx);
hnbgw_vty_init(g_hnb_gw, tall_hnb_ctx);
logging_vty_add_cmds(&hnbgw_log_info);
@@ -501,24 +494,13 @@ int main(int argc, char **argv)
ranap_set_log_area(DRANAP);
- OSMO_ASSERT(g_hnb_gw->config.iucs_remote_ip);
rc = hnbgw_cnlink_init(g_hnb_gw,
- g_hnb_gw->config.iucs_remote_ip,
- g_hnb_gw->config.iucs_remote_port,
- "127.0.0.5" /* FIXME: configurable */,
- 23 /* FIXME: configurable */);
+ "127.0.0.1", M3UA_PORT, "127.0.0.5" /* FIXME: configurable */);
if (rc < 0) {
LOGP(DMAIN, LOGL_ERROR, "Failed to initialize SCCP link to CN\n");
exit(1);
}
- osmo_sccp_make_addr_pc_ssn(&g_hnb_gw->sccp.remote_addr_cs,
- 1 /* FIXME: configurable */,
- OSMO_SCCP_SSN_RANAP);
- osmo_sccp_make_addr_pc_ssn(&g_hnb_gw->sccp.remote_addr_ps,
- 2 /* FIXME: configurable */,
- OSMO_SCCP_SSN_RANAP);
-
OSMO_ASSERT(g_hnb_gw->config.iuh_local_ip);
LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n",
g_hnb_gw->config.iuh_local_ip,