aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/osmo-bsc/neighbor_ident_vty.c15
-rw-r--r--tests/neighbor_ident.vty5
2 files changed, 18 insertions, 2 deletions
diff --git a/src/osmo-bsc/neighbor_ident_vty.c b/src/osmo-bsc/neighbor_ident_vty.c
index 70240acfb..d0c23a8c5 100644
--- a/src/osmo-bsc/neighbor_ident_vty.c
+++ b/src/osmo-bsc/neighbor_ident_vty.c
@@ -80,6 +80,9 @@ bool neighbor_ident_bts_parse_key_params(struct vty *vty, struct gsm_bts *bts, c
#define LAC_CI_PARAMS "lac-ci <0-65535> <0-65535>"
#define LAC_CI_DOC "Neighbor cell by LAC and CI\n" "LAC\n" "CI\n"
+#define CGI_PARAMS "cgi <0-999> <0-999> <0-65535> <0-65535>"
+#define CGI_DOC "Neighbor cell by cgi\n" "MCC\n" "MNC\n" "LAC\n" "CI\n"
+
#define LOCAL_BTS_PARAMS "bts <0-255>"
#define LOCAL_BTS_DOC "Neighbor cell by local BTS number\n" "BTS number\n"
@@ -235,6 +238,13 @@ DEFUN(cfg_neighbor_add_lac_ci, cfg_neighbor_add_lac_ci_cmd,
return add_local_bts(vty, bts_by_cell_id(vty, neighbor_ident_vty_parse_lac_ci(vty, argv)));
}
+DEFUN(cfg_neighbor_add_cgi, cfg_neighbor_add_cgi_cmd,
+ NEIGHBOR_ADD_CMD CGI_PARAMS,
+ NEIGHBOR_ADD_DOC CGI_DOC)
+{
+ return add_local_bts(vty, bts_by_cell_id(vty, neighbor_ident_vty_parse_cgi(vty, argv)));
+}
+
bool neighbor_ident_key_matches_bts(const struct neighbor_ident_key *key, struct gsm_bts *bts)
{
if (!bts || !key)
@@ -379,8 +389,8 @@ DEFUN(cfg_neighbor_add_lac_ci_arfcn_bsic, cfg_neighbor_add_lac_ci_arfcn_bsic_cmd
}
DEFUN(cfg_neighbor_add_cgi_arfcn_bsic, cfg_neighbor_add_cgi_arfcn_bsic_cmd,
- NEIGHBOR_ADD_CMD "cgi <0-999> <0-999> <0-65535> <0-65535> " NEIGHBOR_IDENT_VTY_KEY_PARAMS,
- NEIGHBOR_ADD_DOC "Neighbor cell by cgi\n" "MCC\n" "MNC\n" "LAC\n" "CI\n" NEIGHBOR_IDENT_VTY_KEY_DOC)
+ NEIGHBOR_ADD_CMD CGI_PARAMS " " NEIGHBOR_IDENT_VTY_KEY_PARAMS,
+ NEIGHBOR_ADD_DOC CGI_DOC NEIGHBOR_IDENT_VTY_KEY_DOC)
{
struct neighbor_ident_key nik;
struct gsm0808_cell_id *cell_id = neighbor_ident_vty_parse_cgi(vty, argv);
@@ -552,6 +562,7 @@ void neighbor_ident_vty_init(struct gsm_network *net, struct neighbor_ident_list
install_element(BTS_NODE, &cfg_neighbor_add_bts_nr_cmd);
install_element(BTS_NODE, &cfg_neighbor_add_lac_cmd);
install_element(BTS_NODE, &cfg_neighbor_add_lac_ci_cmd);
+ install_element(BTS_NODE, &cfg_neighbor_add_cgi_cmd);
install_element(BTS_NODE, &cfg_neighbor_add_lac_arfcn_bsic_cmd);
install_element(BTS_NODE, &cfg_neighbor_add_lac_ci_arfcn_bsic_cmd);
install_element(BTS_NODE, &cfg_neighbor_add_cgi_arfcn_bsic_cmd);
diff --git a/tests/neighbor_ident.vty b/tests/neighbor_ident.vty
index 8de34d61b..02b0f5004 100644
--- a/tests/neighbor_ident.vty
+++ b/tests/neighbor_ident.vty
@@ -83,6 +83,7 @@ OsmoBSC(config-net-bts)# list
neighbor bts <0-255>
neighbor lac <0-65535>
neighbor lac-ci <0-65535> <0-65535>
+ neighbor cgi <0-999> <0-999> <0-65535> <0-65535>
neighbor lac <0-65535> arfcn <0-1023> bsic (<0-63>|any)
neighbor lac-ci <0-65535> <0-65535> arfcn <0-1023> bsic (<0-63>|any)
neighbor cgi <0-999> <0-999> <0-65535> <0-65535> arfcn <0-1023> bsic (<0-63>|any)
@@ -146,6 +147,7 @@ OsmoBSC(config-net-bts)# neighbor cgi 0 0 0 ?
<0-65535> CI
OsmoBSC(config-net-bts)# neighbor cgi 0 0 0 0 ?
arfcn ARFCN of neighbor cell
+ <cr>
OsmoBSC(config-net-bts)# neighbor cgi 0 0 0 0 arfcn ?
<0-1023> ARFCN value
OsmoBSC(config-net-bts)# neighbor cgi 0 0 0 0 arfcn 0 ?
@@ -196,6 +198,9 @@ OsmoBSC(config-net-bts)# neighbor bts 1
OsmoBSC(config-net-bts)# neighbor lac 22
% BTS 0 now has local neighbor BTS 2 with LAC 22 CI 65535 and ARFCN 42 BSIC 12
+OsmoBSC(config-net-bts)# no neighbor bts 2
+OsmoBSC(config-net-bts)# neighbor cgi 901 70 22 65535
+% BTS 0 now has local neighbor BTS 2 with LAC 22 CI 65535 and ARFCN 42 BSIC 12
OsmoBSC(config-net-bts)# neighbor cgi 23 42 423 5 arfcn 23 bsic 42
% BTS 0 to ARFCN 23 BSIC 42 now has 1 remote BSS Cell Identifier List entry