aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty_interface.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-05-23 16:56:52 +0000
committerHarald Welte <laforge@gnumonks.org>2009-05-23 16:56:52 +0000
commit78f2f508e6d4560ccf52e2cd0a7d4b779aa34c2a (patch)
tree46655e8f6a58d1e6f8427e0e71477b9c18e25915 /src/vty_interface.c
parent110c0ab6c5d71375562f78caec2e565c25774b5a (diff)
Add user-configurable BSIC setting
Diffstat (limited to 'src/vty_interface.c')
-rw-r--r--src/vty_interface.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/vty_interface.c b/src/vty_interface.c
index 6ff3b0cdf..b63c77474 100644
--- a/src/vty_interface.c
+++ b/src/vty_interface.c
@@ -105,9 +105,9 @@ static void e1isl_dump_vty(struct vty *vty, struct e1inp_sign_link *e1l)
static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
{
- vty_out(vty, "BTS %u is of %s type, has LAC %u, TSC %u and %u TRX%s",
+ vty_out(vty, "BTS %u is of %s type, has LAC %u, BSIC %u, TSC %u and %u TRX%s",
bts->nr, btstype2str(bts->type), bts->location_area_code,
- bts->tsc, bts->num_trx, VTY_NEWLINE);
+ bts->bsic, bts->tsc, bts->num_trx, VTY_NEWLINE);
if (is_ipaccess_bts(bts))
vty_out(vty, " Unit ID: %u/%u/0%s",
bts->ip_access.site_id, bts->ip_access.bts_id,
@@ -633,6 +633,25 @@ DEFUN(cfg_bts_tsc,
return CMD_SUCCESS;
}
+DEFUN(cfg_bts_bsic,
+ cfg_bts_bsic_cmd,
+ "base_station_id_code <0-63>",
+ "Set the Base Station Identity Code (BSIC) of this BTS\n")
+{
+ struct gsm_bts *bts = vty->index;
+ int bsic = atoi(argv[0]);
+
+ if (bsic < 0 || bsic > 0x3f) {
+ vty_out(vty, "%% TSC %d is not in the valid range (0-255)%s",
+ bsic, VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+ bts->bsic = bsic;
+
+ return CMD_SUCCESS;
+}
+
+
DEFUN(cfg_bts_unit_id,
cfg_bts_unit_id_cmd,
"unit_id <0-65534> <0-255>",