aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty_interface.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-10-20 00:22:00 +0200
committerHarald Welte <laforge@netfilter.org>2009-10-20 00:22:00 +0200
commit8175e95222cf1c831e1fcfc1b8842aa331ef3b8d (patch)
tree89624086d7b6045a25eb8e4d7b4543ecd9681daf /openbsc/src/vty_interface.c
parent31a74906a3753dc69ae58d8af112f24100ee9675 (diff)
ip.access: Support multi-TRX / RSL stream ID
In order to support multi-TRX configurations, we need to be able to cope with multiple RSL streams (each with their own stream identifier) inside one ip.access TCP connection. Since this is very similar to using the TEI on a E1 line, we simply recycle the logic and data fields that are used for the TEI.
Diffstat (limited to 'openbsc/src/vty_interface.c')
-rw-r--r--openbsc/src/vty_interface.c49
1 files changed, 41 insertions, 8 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index d6f1bb54e..9aa970696 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -127,17 +127,19 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
if (bts->cell_barred)
vty_out(vty, " CELL IS BARRED%s", VTY_NEWLINE);
if (is_ipaccess_bts(bts))
- vty_out(vty, " Unit ID: %u/%u/0%s",
+ vty_out(vty, " Unit ID: %u/%u/0, OML Stream ID 0x%02x%s",
bts->ip_access.site_id, bts->ip_access.bts_id,
- VTY_NEWLINE);
+ bts->oml_tei, VTY_NEWLINE);
vty_out(vty, " NM State: ");
net_dump_nmstate(vty, &bts->nm_state);
vty_out(vty, " Site Mgr NM State: ");
net_dump_nmstate(vty, &bts->site_mgr.nm_state);
vty_out(vty, " Paging: FIXME pending requests, %u free slots%s",
bts->paging.available_slots, VTY_NEWLINE);
- vty_out(vty, " E1 Signalling Link:%s", VTY_NEWLINE);
- e1isl_dump_vty(vty, bts->oml_link);
+ if (!is_ipaccess_bts(bts)) {
+ vty_out(vty, " E1 Signalling Link:%s", VTY_NEWLINE);
+ e1isl_dump_vty(vty, bts->oml_link);
+ }
/* FIXME: oml_link, chan_desc */
}
@@ -238,10 +240,11 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
VTY_NEWLINE);
if (bts->cell_barred)
vty_out(vty, " cell barred 1%s", VTY_NEWLINE);
- if (is_ipaccess_bts(bts))
+ if (is_ipaccess_bts(bts)) {
vty_out(vty, " ip.access unit_id %u %u%s",
bts->ip_access.site_id, bts->ip_access.bts_id, VTY_NEWLINE);
- else {
+ vty_out(vty, " oml ip.access stream_id %u%s", bts->oml_tei, VTY_NEWLINE);
+ } else {
config_write_e1_link(vty, &bts->oml_e1_link, " oml ");
vty_out(vty, " oml e1 tei %u%s", bts->oml_tei, VTY_NEWLINE);
}
@@ -285,8 +288,13 @@ static void trx_dump_vty(struct vty *vty, struct gsm_bts_trx *trx)
net_dump_nmstate(vty, &trx->nm_state);
vty_out(vty, " Baseband Transceiver NM State: ");
net_dump_nmstate(vty, &trx->bb_transc.nm_state);
- vty_out(vty, " E1 Signalling Link:%s", VTY_NEWLINE);
- e1isl_dump_vty(vty, trx->rsl_link);
+ if (is_ipaccess_bts(trx->bts)) {
+ vty_out(vty, " ip.access stream ID: 0x%02x%s",
+ trx->rsl_tei, VTY_NEWLINE);
+ } else {
+ vty_out(vty, " E1 Signalling Link:%s", VTY_NEWLINE);
+ e1isl_dump_vty(vty, trx->rsl_link);
+ }
}
DEFUN(show_trx,
@@ -819,6 +827,11 @@ DEFUN(cfg_bts_type,
bts->type = parse_btstype(argv[0]);
+ if (is_ipaccess_bts(bts)) {
+ /* Set the default OML Stream ID to 0xff */
+ bts->oml_tei = 0xff;
+ }
+
return CMD_SUCCESS;
}
@@ -941,6 +954,25 @@ DEFUN(cfg_bts_unit_id,
return CMD_SUCCESS;
}
+DEFUN(cfg_bts_stream_id,
+ cfg_bts_stream_id_cmd,
+ "oml ip.access stream_id <0-255>",
+ "Set the ip.access Stream ID of the OML link of this BTS\n")
+{
+ struct gsm_bts *bts = vty->index;
+ int stream_id = atoi(argv[0]);
+
+ if (!is_ipaccess_bts(bts)) {
+ vty_out(vty, "%% BTS is not of ip.access type%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ bts->oml_tei = stream_id;
+
+ return CMD_SUCCESS;
+}
+
+
DEFUN(cfg_bts_oml_e1,
cfg_bts_oml_e1_cmd,
"oml e1 line E1_LINE timeslot <1-31> sub-slot (0|1|2|3|full)",
@@ -1207,6 +1239,7 @@ int bsc_vty_init(struct gsm_network *net)
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_stream_id_cmd);
install_element(BTS_NODE, &cfg_bts_oml_e1_cmd);
install_element(BTS_NODE, &cfg_bts_oml_e1_tei_cmd);
install_element(BTS_NODE, &cfg_bts_challoc_cmd);