gsm: [ABI BREAK] Support CellId SAI, change CellId CGI-PS id number

Those are available in 3GPP TS 48.008 version 16.0.0 Release 16, section
3.2.2.17 Cell Identifier. It can be seen that we have a collision
between the osmocom non-standard format and the SAI standard one.

This is because CGI-PS is not really a TS 48.008 Cell Identifier, but only
specified in TS 48.018 and has no ID number assigned. The CGI-PS was
added there because the whole osmo-bsc neighbour configuration works
with CellIds to manage neighbours, so it felt natural to extend the APIs
to also provide means to use CGI-PS format (TS 48.018 even refers 48.008
existance and mentions there's no explicit ID).

At the time this Cell Identifier was added, the firstly available number
(11) was taken, which was of course a really bad idea since newer
versions of the spec can at some point use it, which is the case if one
checks for instance TS 48.008 Release 16 SAI Cell Id.

There no perfect way to fix this bad decision at the time, but the
CGI-PS is only used in osmo-bsc and only for RIM related purposes, so by
changing the ID of CELL_IDENT_WHOLE_GLOBAL_PS, we only break RIM under
some specific CIs being used, and when an osmo-bsc is built against
older libosmocore and then used at runtime against a newer libosmocore
(which should be rare).
Hence, the downside is acceptable, and by moving the new ID number to be
ouside of the spec proto TS 48.008 range (4 bits), we make sure we don't
have the same problem again in the future.

Related: SYS#5838
Fixes: ca33a71ca8eeaee98b1b53d5394b147a4ff0b429
Change-Id: Id25e563febdb7640174540136225f399515a0089
diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h
index 60e665b..6abfeec 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -44,6 +44,8 @@
 	uint16_t				ci;
 	struct osmo_location_area_id		lai_and_lac;
 	uint16_t				lac;
+	struct osmo_service_area_id		sai;
+	/* osmocom specific: */
 	struct osmo_cell_global_id_ps		global_ps;
 };
 
diff --git a/include/osmocom/gsm/gsm23003.h b/include/osmocom/gsm/gsm23003.h
index 487379a..4070581 100644
--- a/include/osmocom/gsm/gsm23003.h
+++ b/include/osmocom/gsm/gsm23003.h
@@ -30,6 +30,9 @@
 	uint16_t cell_identity;
 };
 
+/* 3GPP TS 48.018:
+ * 8c.1.4.1.1 GERAN BSS identification (RIM)
+ * sec 11.3.9 Cell Identifier */
 struct osmo_cell_global_id_ps {
 	struct osmo_routing_area_id rai;
 	uint16_t cell_identity;
@@ -134,6 +137,10 @@
 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_sai_name(const struct osmo_service_area_id *sai);
+const char *osmo_sai_name2(const struct osmo_service_area_id *sai);
+char *osmo_sai_name_buf(char *buf, size_t buf_len, const struct osmo_service_area_id *sai);
+char *osmo_sai_name_c(const void *ctx, const struct osmo_service_area_id *sai);
 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 983783e..2162c2a 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -25,9 +25,10 @@
 	CELL_IDENT_UTRAN_PLMN_LAC_RNC	= 8,
 	CELL_IDENT_UTRAN_RNC		= 9,
 	CELL_IDENT_UTRAN_LAC_RNC	= 10,
+	CELL_IDENT_SAI	= 11,
 
-	/* Not in 03.03 nor 08.08 */
-	CELL_IDENT_WHOLE_GLOBAL_PS	= 11, /* CGI with + RAC */
+	/* Not in 03.03 nor 08.08. Place them > 0x0f (discr_id is 4 bits) */
+	CELL_IDENT_WHOLE_GLOBAL_PS	= 128, /* CGI + RAC, TS 48.018 8c.1.4.1.1 */
 };
 /* Keep this misnamed CELL_IDENT for API backwards compatibility (see OS#3124). */
 #define CELL_IDENT_LAI_AND_LAC CELL_IDENT_LAI