IPA: Allow RSL connection to different IP address as OML

This patch adds a new VTY command "ip.access rsl-ip A.B.C.D" at the
BTS level.  If you set this IP address, the BTS will be instructed to
establish the RSL link to the indiciated IP address, rather than using
the same as for the OML link (default).

Use "ip.access rsl-ip 0" to disable the feature.
This commit is contained in:
Harald Welte 2013-03-12 13:57:05 +01:00
parent 1af682adb9
commit 8b29180cad
3 changed files with 32 additions and 1 deletions

View File

@ -602,6 +602,7 @@ struct gsm_bts {
uint16_t site_id;
uint16_t bts_id;
uint32_t flags;
uint32_t rsl_ip;
} ip_access;
struct {
struct {

View File

@ -540,6 +540,12 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
case GSM_BTS_TYPE_OSMO_SYSMO:
vty_out(vty, " ip.access unit_id %u %u%s",
bts->ip_access.site_id, bts->ip_access.bts_id, VTY_NEWLINE);
if (bts->ip_access.rsl_ip) {
struct in_addr ia;
ia.s_addr = htonl(bts->ip_access.rsl_ip);
vty_out(vty, " ip.access rsl-ip %s%s", inet_ntoa(ia),
VTY_NEWLINE);
}
vty_out(vty, " oml ip.access stream_id %u line %u%s",
bts->oml_tei, bts->oml_e1_link.e1_nr, VTY_NEWLINE);
break;
@ -1626,6 +1632,28 @@ DEFUN(cfg_bts_unit_id,
return CMD_SUCCESS;
}
DEFUN(cfg_bts_rsl_ip,
cfg_bts_rsl_ip_cmd,
"ip.access rsl-ip A.B.C.D",
"Abis/IP specific options\n"
"Set the IPA RSL IP Address of the BSC\n"
"Destination IP address for RSL connection\n")
{
struct gsm_bts *bts = vty->index;
struct in_addr ia;
if (!is_ipaccess_bts(bts)) {
vty_out(vty, "%% BTS is not of ip.access type%s", VTY_NEWLINE);
return CMD_WARNING;
}
inet_aton(argv[0], &ia);
bts->ip_access.rsl_ip = ntohl(ia.s_addr);
return CMD_SUCCESS;
}
DEFUN(cfg_bts_serno,
cfg_bts_serno_cmd,
"hsl serial-number STRING",
@ -3022,6 +3050,7 @@ int bsc_vty_init(const struct log_info *cat)
install_element(BTS_NODE, &cfg_bts_tsc_cmd);
install_element(BTS_NODE, &cfg_bts_bsic_cmd);
install_element(BTS_NODE, &cfg_bts_unit_id_cmd);
install_element(BTS_NODE, &cfg_bts_rsl_ip_cmd);
install_element(BTS_NODE, &cfg_bts_timezone_cmd);
install_element(BTS_NODE, &cfg_bts_no_timezone_cmd);
install_element(BTS_NODE, &cfg_bts_serno_cmd);

View File

@ -407,7 +407,8 @@ static int sw_activ_rep(struct msgb *mb)
abis_nm_opstart(trx->bts, foh->obj_class,
trx->bts->bts_nr, trx->nr, 0xff);
/* TRX software is active, tell it to initiate RSL Link */
abis_nm_ipaccess_rsl_connect(trx, 0, 3003, trx->rsl_tei);
abis_nm_ipaccess_rsl_connect(trx, trx->bts->ip_access.rsl_ip,
3003, trx->rsl_tei);
break;
case NM_OC_RADIO_CARRIER: {
/*