aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm/gsm0808_utils.h
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-02-10 22:28:27 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2019-03-08 05:25:07 +0100
commit3a5045302f51faf104e64783977f710d36e06e3f (patch)
tree70ec869e4843a8330df1133ee617b1a7d740bd21 /include/osmocom/gsm/gsm0808_utils.h
parentd4b79c877291e58bf7fafcfd3c771c9e66fa3f5b (diff)
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
Diffstat (limited to 'include/osmocom/gsm/gsm0808_utils.h')
-rw-r--r--include/osmocom/gsm/gsm0808_utils.h3
1 files changed, 3 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,