aboutsummaryrefslogtreecommitdiffstats
path: root/src/hnbgw.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-13 15:12:18 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-27 14:01:25 +0200
commit5ee050c1e7fde4e32e3334e7bf02c4f663474d55 (patch)
tree37d78c5ecd479ad0aa4293ba6db855453133b828 /src/hnbgw.c
parentc510fc29fcf4999de8ba4992dd305968909ed69b (diff)
hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds
Basically copy-paste the Iuh local-ip and local-port code to provide parameterization of the IuCS and IuPS remote addresses. Add IUCS and IUPS nodes, enhance go_parent_cb and config writing accordingly. Change-Id: I2c28977011009df4e1fa472290bbbc359e406971
Diffstat (limited to 'src/hnbgw.c')
-rw-r--r--src/hnbgw.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/hnbgw.c b/src/hnbgw.c
index 16a2e43..acca643 100644
--- a/src/hnbgw.c
+++ b/src/hnbgw.c
@@ -80,6 +80,14 @@ 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 = SUA_PORT;
+
+ gw->config.iups_remote_ip = talloc_strdup(gw,
+ HNBGW_IUPS_REMOTE_IP_DEFAULT);
+ gw->config.iups_remote_port = SUA_PORT;
+
gw->next_ue_ctx_id = 23;
INIT_LLIST_HEAD(&gw->hnb_list);
INIT_LLIST_HEAD(&gw->ue_list);
@@ -498,8 +506,16 @@ int main(int argc, char **argv)
osmo_sua_set_log_area(DSUA);
ranap_set_log_area(DRANAP);
- g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", SUA_PORT, 0);
- g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.2", SUA_PORT, 1);
+ OSMO_ASSERT(g_hnb_gw->config.iucs_remote_ip);
+ g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw,
+ g_hnb_gw->config.iucs_remote_ip,
+ g_hnb_gw->config.iucs_remote_port,
+ 0);
+ OSMO_ASSERT(g_hnb_gw->config.iups_remote_ip);
+ g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw,
+ g_hnb_gw->config.iups_remote_ip,
+ g_hnb_gw->config.iups_remote_port,
+ 1);
OSMO_ASSERT(g_hnb_gw->config.iuh_local_ip);
LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n",