diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-09-21 03:01:00 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-10-31 00:23:39 +0100 |
commit | d77bd741c1c0e3dd83c95419a2a8c34703457bd9 (patch) | |
tree | b530e978047c1c31176ed85a9e0b4be7a77ad8c4 /include/osmocom/bsc/gsm_data.h | |
parent | 8d8d710a281f5e284ce17c531e85ab5b2f1e5bce (diff) |
neighbor vty: identify neighbors by gsm0808 cell idneels/neighbor
For deleting neighbor entries and for triggering manual handovers, it is useful
to identify neighbors by the gsm0808_cell_id, instead of just by ARFCN+BSIC.
This is not a hard requirement, since BTS+ARFCN+BSIC fully identifies a
neighbor. But consider these contrived examples of the situation before this
patch:
# bts 0
# neighbor cgi 001 01 23 42
# no neighbor cgi 001 01 23 42
% No such command
# no neighbor bts 5
(manually looked up that BTS 5 has above CGI)
# neighbor lac 42 arfcn 23 bsic 5
# do handover any to lac 42
% No such command
# do handover any to arfcn 23 bsic 5
(if multiple cells have the same ARFCN+BSIC, the identification is not unique)
So this fills a gap, if only to help debugging / analyzing handover operations.
Change-Id: I198fe7055d1e09b128693eb51276e3d8cde1c0ba
Diffstat (limited to 'include/osmocom/bsc/gsm_data.h')
-rw-r--r-- | include/osmocom/bsc/gsm_data.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 7897fea86..4ab2e59a9 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1152,6 +1152,21 @@ struct gsm_bts *gsm_bts_by_cell_id(const struct gsm_network *net, int gsm_bts_local_neighbor_add(struct gsm_bts *bts, struct gsm_bts *neighbor); int gsm_bts_local_neighbor_del(struct gsm_bts *bts, const struct gsm_bts *neighbor); +typedef bool (*neighbors_find_by_cell_id_cb_t)(struct gsm_bts *from_bts, + struct gsm_bts *neighbor_bts, + const struct neighbor_ident_key *key, + const struct gsm0808_cell_id_list2 *val, + int val_idx, + void *cb_data); +int neighbors_find_by_cell_id(struct gsm_network *net, + struct gsm_bts *for_bts, + struct neighbor_ident_list *neighbor_bss_cells, + const struct gsm0808_cell_id *id, + bool remote_neighbors_exact_match, + bool remote_neighbors_all_matches, + neighbors_find_by_cell_id_cb_t cb, + void *cb_data); + struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts); struct gsm_bts_trx *gsm_bts_trx_num(const struct gsm_bts *bts, int num); |