summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/gsm/gsm0808_utils.h3
-rw-r--r--include/osmocom/gsm/gsm23003.h9
2 files changed, 12 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h
index 2b48be76..53f145c5 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -84,6 +84,9 @@ int gsm0808_cell_id_u_name(char *buf, size_t buflen,
bool gsm0808_cell_ids_match(const struct gsm0808_cell_id *id1, const struct gsm0808_cell_id *id2, bool exact_match);
int gsm0808_cell_id_matches_list(const struct gsm0808_cell_id *id, const struct gsm0808_cell_id_list2 *list,
unsigned int match_nr, bool exact_match);
+void gsm0808_cell_id_from_cgi(struct gsm0808_cell_id *cid, enum CELL_IDENT id_discr,
+ const struct osmo_cell_global_id *cgi);
+int gsm0808_cell_id_to_cgi(struct osmo_cell_global_id *cgi, const struct gsm0808_cell_id *cid);
uint8_t gsm0808_enc_cause(struct msgb *msg, uint16_t cause);
uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg,
diff --git a/include/osmocom/gsm/gsm23003.h b/include/osmocom/gsm/gsm23003.h
index b34a677b..cf622ce0 100644
--- a/include/osmocom/gsm/gsm23003.h
+++ b/include/osmocom/gsm/gsm23003.h
@@ -30,6 +30,15 @@ struct osmo_cell_global_id {
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 {