From ca33a71ca8eeaee98b1b53d5394b147a4ff0b429 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 5 Jan 2021 19:36:48 +0100 Subject: Intoduce Packet Switch CGI This structure is needed in order to identify a given cell within the BSS during RIM transactions. The naming was made up by myself since I couldn't find any naming reference for this kind of data (RAI + CI). Since LAI + CI = CGI, then RAI + CI = CGI-PS osmo_rai_name2 family of functions get a "2" suffix due to already existing functions handling struct struct gprs_ra_id in gsm48.h Change-Id: If48f412c32e8e5a3e604a78d12b74787a4786374 --- include/osmocom/gsm/gsm0808_utils.h | 1 + include/osmocom/gsm/gsm23003.h | 13 +++++++++++++ include/osmocom/gsm/protocol/gsm_08_08.h | 3 +++ 3 files changed, 17 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index 59db6edc..76e90645 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -44,6 +44,7 @@ union gsm0808_cell_id_u { uint16_t ci; struct osmo_location_area_id lai_and_lac; uint16_t lac; + struct osmo_cell_global_id_ps global_ps; }; /*! Parsed representation of Cell Identifier IE (3GPP TS 48.008 3.2.2.17) */ diff --git a/include/osmocom/gsm/gsm23003.h b/include/osmocom/gsm/gsm23003.h index 69f00f68..fbe0ca0f 100644 --- a/include/osmocom/gsm/gsm23003.h +++ b/include/osmocom/gsm/gsm23003.h @@ -30,6 +30,11 @@ struct osmo_cell_global_id { uint16_t cell_identity; }; +struct osmo_cell_global_id_ps { + struct osmo_routing_area_id rai; + uint16_t cell_identity; +}; + /*! Bitmask of items contained in a struct osmo_cell_global_id. * See also gsm0808_cell_id_to_cgi(). */ @@ -37,6 +42,7 @@ enum osmo_cgi_part { OSMO_CGI_PART_PLMN = 1, OSMO_CGI_PART_LAC = 2, OSMO_CGI_PART_CI = 4, + OSMO_CGI_PART_RAC = 8, }; /* Actually defined in 3GPP TS 48.008 3.2.2.27 Cell Identifier List, @@ -117,10 +123,17 @@ char *osmo_plmn_name_c(const void *ctx, const struct osmo_plmn_id *plmn); const char *osmo_lai_name(const struct osmo_location_area_id *lai); char *osmo_lai_name_buf(char *buf, size_t buf_len, const struct osmo_location_area_id *lai); char *osmo_lai_name_c(const void *ctx, const struct osmo_location_area_id *lai); +const char *osmo_rai_name2(const struct osmo_routing_area_id *rai); +char *osmo_rai_name2_buf(char *buf, size_t buf_len, const struct osmo_routing_area_id *rai); +char *osmo_rai_name2_c(const void *ctx, const struct osmo_routing_area_id *rai); const char *osmo_cgi_name(const struct osmo_cell_global_id *cgi); const char *osmo_cgi_name2(const struct osmo_cell_global_id *cgi); char *osmo_cgi_name_buf(char *buf, size_t buf_len, const struct osmo_cell_global_id *cgi); char *osmo_cgi_name_c(const void *ctx, const struct osmo_cell_global_id *cgi); +const char *osmo_cgi_ps_name(const struct osmo_cell_global_id_ps *cgi_ps); +const char *osmo_cgi_ps_name2(const struct osmo_cell_global_id_ps *cgi_ps); +char *osmo_cgi_ps_name_buf(char *buf, size_t buf_len, const struct osmo_cell_global_id_ps *cgi_ps); +char *osmo_cgi_ps_name_c(const void *ctx, const struct osmo_cell_global_id_ps *cgi_ps); const char *osmo_gummei_name(const struct osmo_gummei *gummei); char *osmo_gummei_name_buf(char *buf, size_t buf_len, const struct osmo_gummei *gummei); char *osmo_gummei_name_c(const void *ctx, const struct osmo_gummei *gummei); diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index 1390f0e8..fe7776b2 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -25,6 +25,9 @@ enum CELL_IDENT { CELL_IDENT_UTRAN_PLMN_LAC_RNC = 8, CELL_IDENT_UTRAN_RNC = 9, CELL_IDENT_UTRAN_LAC_RNC = 10, + + /* Not in 03.03 nor 08.08 */ + CELL_IDENT_WHOLE_GLOBAL_PS = 11, /* CGI with + RAC */ }; /* Keep this misnamed CELL_IDENT for API backwards compatibility (see OS#3124). */ #define CELL_IDENT_LAI_AND_LAC CELL_IDENT_LAI -- cgit v1.2.3