summaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/gsm/gsm0808_utils.h11
-rw-r--r--include/osmocom/gsm/protocol/gsm_08_08.h3
2 files changed, 13 insertions, 1 deletions
diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h
index 8e71b43c..8cdb74bb 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -55,6 +55,17 @@ struct gsm0808_cell_id_list2 {
unsigned int id_list_len;
};
+extern const struct value_string gsm0808_cell_id_discr_names[];
+static inline const char *gsm0808_cell_id_discr_name(enum CELL_IDENT id_discr)
+{ return get_value_string(gsm0808_cell_id_discr_names, id_discr); }
+
+const char *gsm0808_cell_id_name(const struct gsm0808_cell_id *cid);
+const char *gsm0808_cell_id_name2(const struct gsm0808_cell_id *cid);
+const char *gsm0808_cell_id_list_name(const struct gsm0808_cell_id_list2 *cil);
+int gsm0808_cell_id_list_name_buf(char *buf, size_t buflen, const struct gsm0808_cell_id_list2 *cil);
+int gsm0808_cell_id_u_name(char *buf, size_t buflen,
+ enum CELL_IDENT id_discr, const union gsm0808_cell_id_u *u);
+
uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg,
const struct sockaddr_storage *ss);
int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss,
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h
index 4539b960..5d2864ff 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -10,7 +10,8 @@
/*
* this is from GSM 03.03 CGI but is copied in GSM 08.08
- * in § 3.2.2.27 for Cell Identifier List
+ * in § 3.2.2.27 for Cell Identifier List.
+ * See gsm0808_cell_id_discr_name() for a human readable representation.
*/
enum CELL_IDENT {
CELL_IDENT_WHOLE_GLOBAL = 0,