aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/sgsn_vty.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-12 01:39:25 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-11-12 16:06:47 +0100
commit5f3e337c8d545e6b4fe968b196d0fcf8c9d75c89 (patch)
tree534ea6323cd9a738f5dce3dea902443c0d18eb26 /openbsc/src/gprs/sgsn_vty.c
parent8afc916e360a1ae739bb9df6913317eb3990a1ab (diff)
IuCS and IuPS: add VTY config for RAB Assignment address kind
To accomodate the ip.access nano3G without having to recompile, make the RAB Assignment's Transport Layer Address IE's format configurable, in both osmo-cscn and osmo-sgsn. The long term perspective is to somehow detect which address encoding a given 3G cell prefers, but for the time being just configure it globally and set each ue_conn_ctx to the global setting upon creation. Add VTY command to iu_vty.c, with args passed to iu_vty_init() to insert at an arbitrary VTY node, so that it can be used both for osmo-cscn and osmo-sgsn. Add generic iu_vty_config_write() to write out the config. Call iu_vty_init() from cscn_vty_init(); cscn_vty_init() is in libmsc, hence linking of osmo-cscn now needs libiu to come after libmsc, so move that further down. Change-Id: I93728314742b327336f3fb6de98e6457f687e1f9
Diffstat (limited to 'openbsc/src/gprs/sgsn_vty.c')
-rw-r--r--openbsc/src/gprs/sgsn_vty.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index 421d17fbe..05310cbf5 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -44,6 +44,12 @@
#include <pdp.h>
+#include "../../bscconfig.h"
+
+#ifdef BUILD_IU
+#include <openbsc/iu.h>
+#endif
+
static struct sgsn_config *g_cfg = NULL;
const struct value_string sgsn_auth_pol_strs[] = {
@@ -297,6 +303,8 @@ static int config_write_sgsn(struct vty *vty)
} else
vty_out(vty, " no compression v42bis%s", VTY_NEWLINE);
+ iu_vty_config_write(vty, " ");
+
return CMD_SUCCESS;
}
@@ -1254,7 +1262,7 @@ int sgsn_vty_init(struct sgsn_config *cfg)
install_element(SGSN_NODE, &cfg_comp_v42bisp_cmd);
#ifdef BUILD_IU
- iu_vty_init();
+ iu_vty_init(SGSN_NODE, &g_cfg->iu.rab_assign_addr_enc);
#endif
return 0;
}