summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/gsm/gsm0808.h7
-rw-r--r--include/osmocom/gsm/gsm0808_utils.h29
-rw-r--r--include/osmocom/gsm/gsm23003.h7
-rw-r--r--include/osmocom/gsm/protocol/gsm_08_08.h7
4 files changed, 46 insertions, 4 deletions
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index 8c276f58..9153d99f 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -30,6 +30,7 @@
struct sockaddr_storage;
struct msgb;
+struct gsm0808_cell_id_list2;
struct msgb *gsm0808_create_layer3(struct msgb *msg_l3, uint16_t nc,
uint16_t cc, int lac, uint16_t _ci);
@@ -70,9 +71,13 @@ struct msgb *gsm0808_create_ass_fail(uint8_t cause, const uint8_t *rr_cause,
*scl);
struct msgb *gsm0808_create_assignment_failure(uint8_t cause, uint8_t *rr_cause);
struct msgb *gsm0808_create_clear_rqst(uint8_t cause);
+struct msgb *gsm0808_create_paging2(const char *imsi, const uint32_t *tmsi,
+ const struct gsm0808_cell_id_list2 *cil,
+ const uint8_t *chan_needed);
struct msgb *gsm0808_create_paging(const char *imsi, const uint32_t *tmsi,
const struct gsm0808_cell_id_list *cil,
- const uint8_t *chan_needed);
+ const uint8_t *chan_needed)
+ OSMO_DEPRECATED("use gsm0808_create_paging2 instead");
struct msgb *gsm0808_create_dtap(struct msgb *msg, uint8_t link_id);
void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id);
diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h
index 7432164d..363fc390 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -26,6 +26,27 @@
struct sockaddr_storage;
#include <osmocom/gsm/protocol/gsm_08_08.h>
+#include <osmocom/gsm/gsm23003.h>
+
+ /*! (225-1)/2 is the maximum number of elements in a cell identifier list. */
+#define GSM0808_CELL_ID_LIST2_MAXLEN 127
+
+/*! Parsed representation of a cell identifier list IE. */
+struct gsm0808_cell_id_list2 {
+ enum CELL_IDENT id_discr;
+ union {
+ /*!
+ * All elements of these arrays contain parsed representations of the
+ * data in the corresponding IE, in host-byte order.
+ */
+ struct osmo_cell_global_id global;
+ struct osmo_lac_and_ci_id lac_and_ci;
+ uint16_t ci;
+ struct osmo_location_area_id lai_and_lac;
+ uint16_t lac;
+ } id_list[GSM0808_CELL_ID_LIST2_MAXLEN];
+ unsigned int id_list_len;
+};
uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg,
const struct sockaddr_storage *ss);
@@ -48,10 +69,14 @@ uint8_t gsm0808_enc_encrypt_info(struct msgb *msg,
const struct gsm0808_encrypt_info *ei);
int gsm0808_dec_encrypt_info(struct gsm0808_encrypt_info *ei,
const uint8_t *elem, uint8_t len);
+uint8_t gsm0808_enc_cell_id_list2(struct msgb *msg, const struct gsm0808_cell_id_list2 *cil);
uint8_t gsm0808_enc_cell_id_list(struct msgb *msg,
- const struct gsm0808_cell_id_list *cil);
+ const struct gsm0808_cell_id_list *cil)
+ OSMO_DEPRECATED("use gsm0808_enc_cell_id_list2 instead");
+int gsm0808_dec_cell_id_list2(struct gsm0808_cell_id_list2 *cil, const uint8_t *elem, uint8_t len);
int gsm0808_dec_cell_id_list(struct gsm0808_cell_id_list *cil,
- const uint8_t *elem, uint8_t len);
+ const uint8_t *elem, uint8_t len)
+ OSMO_DEPRECATED("use gsm0808_dec_cell_id_list2 instead");
int gsm0808_chan_type_to_speech_codec(uint8_t perm_spch);
int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc,
uint8_t perm_spch);
diff --git a/include/osmocom/gsm/gsm23003.h b/include/osmocom/gsm/gsm23003.h
index 5d1fbd7f..02e79714 100644
--- a/include/osmocom/gsm/gsm23003.h
+++ b/include/osmocom/gsm/gsm23003.h
@@ -30,6 +30,13 @@ struct osmo_cell_global_id {
uint16_t cell_identity;
};
+/* 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 {
+ uint16_t lac;
+ uint16_t ci;
+};
+
/* 12.5 */
struct osmo_service_area_id {
struct osmo_location_area_id lai;
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h
index ba347eff..947f90f2 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -501,8 +501,13 @@ struct gsm0808_encrypt_info {
unsigned int key_len;
};
-/* 3GPP TS 48.008 3.2.2.27 Cell Identifier List */
#define CELL_ID_LIST_LAC_MAXLEN 127
+/*!
+ * DEPRECATED: This definition of the cell identifier list is
+ * insufficient. It cannot support all types of cell identifiers.
+ * Use struct gsm0808_cell_id_list2 in gsm0808_utils.h instead.
+ *
+ * 3GPP TS 48.008 3.2.2.27 Cell Identifier List */
struct gsm0808_cell_id_list {
uint8_t id_discr;
uint16_t id_list_lac[CELL_ID_LIST_LAC_MAXLEN];