From d01ef75ab876d79c9a0a73cdefb4ccfc60bb47f8 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 21 Sep 2018 15:57:26 +0200 Subject: gsm0808: add BSSMAP Cell Identifier matching API Add * osmo_lai_cmp() (to use in gsm0808_cell_id_u_matches()) * osmo_cgi_cmp() (to use in gsm0808_cell_id_u_matches()) * gsm0808_cell_id_u_match() (to re-use for single IDs and lists) * gsm0808_cell_ids_match() * gsm0808_cell_id_matches_list() * Unit tests in gsm0808_test.c Rationale: For inter-BSC handover, it is interesting to find matches between *differing* Cell Identity kinds. For example, if a cell as CGI 23-42-3-5, and a HO for LAC-CI 3-5 should be handled, we need to see the match. This is most interesting for osmo-msc, i.e. to direct the BSSMAP Handover Request towards the correct BSC or MSC. It is also interesting for osmo-bsc's VTY interface, to be able to manage cells' neighbors and to trigger manual handovers by various Cell Identity handles, as the user would expect them. Change-Id: I5535f0d149c2173294538df75764dd181b023312 --- include/osmocom/gsm/gsm23003.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/osmocom/gsm/gsm23003.h') diff --git a/include/osmocom/gsm/gsm23003.h b/include/osmocom/gsm/gsm23003.h index b5c8dcd4..b34a677b 100644 --- a/include/osmocom/gsm/gsm23003.h +++ b/include/osmocom/gsm/gsm23003.h @@ -122,6 +122,8 @@ static inline int osmo_mcc_from_str(const char *mcc_str, uint16_t *mcc) int osmo_mnc_cmp(uint16_t a_mnc, bool a_mnc_3_digits, uint16_t b_mnc, bool b_mnc_3_digits); int osmo_plmn_cmp(const struct osmo_plmn_id *a, const struct osmo_plmn_id *b); +int osmo_lai_cmp(const struct osmo_location_area_id *a, const struct osmo_location_area_id *b); +int osmo_cgi_cmp(const struct osmo_cell_global_id *a, const struct osmo_cell_global_id *b); int osmo_gen_home_network_domain(char *out, const struct osmo_plmn_id *plmn); int osmo_parse_home_network_domain(struct osmo_plmn_id *out, const char *in); -- cgit v1.2.3