add gsm0808_cell_id_from_cgi(), gsm0808_cell_id_to_cgi()

CGI to Cell ID: for example, for Paging, osmo-msc has a CGI for a subscriber
and needs to send out a Cell Identifier IE. Makes sense to add this conversion
here.

Cell ID to CGI: for a Layer 3 Complete, a subscriber sends the current cell in
the form of a Cell Identifier, which we store as a CGI, if necessary enriched
with the local PLMN.

Add enum with bitmask values to identify parts of a CGI, for the return value
of gsm0808_cell_id_to_cgi(). Can't use enum CELL_IDENT for that, because it
doesn't have a value for just a PLMN (and is not a bitmask).

Change-Id: Ib9af67b100c4583342a2103669732dab2e577b04
diff --git a/include/osmocom/gsm/gsm23003.h b/include/osmocom/gsm/gsm23003.h
index b34a677..cf622ce 100644
--- a/include/osmocom/gsm/gsm23003.h
+++ b/include/osmocom/gsm/gsm23003.h
@@ -30,6 +30,15 @@
 	uint16_t cell_identity;
 };
 
+/*! Bitmask of items contained in a struct osmo_cell_global_id.
+ * See also gsm0808_cell_id_to_cgi().
+ */
+enum osmo_cgi_part {
+	OSMO_CGI_PART_PLMN = 1,
+	OSMO_CGI_PART_LAC = 2,
+	OSMO_CGI_PART_CI = 4,
+};
+
 /* Actually defined in 3GPP TS 48.008 3.2.2.27 Cell Identifier List,
  * but conceptually belongs with the above structures. */
 struct osmo_lac_and_ci_id {