aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm/protocol/gsm_04_08.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmocom/gsm/protocol/gsm_04_08.h')
-rw-r--r--include/osmocom/gsm/protocol/gsm_04_08.h43
1 files changed, 34 insertions, 9 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h
index 2be6ed34..8370eca1 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -9,6 +9,8 @@
#include <osmocom/core/utils.h>
#include <osmocom/core/endian.h>
+#include <osmocom/gsm/gsm_utils.h>
+
struct gsm_lchan;
/* Chapter 10.5.1.5 */
@@ -73,7 +75,7 @@ const char *osmo_gsm48_classmark_a5_name(const struct osmo_gsm48_classmark *cm);
char *osmo_gsm48_classmark_a5_name_buf(char *buf, size_t buf_len, const struct osmo_gsm48_classmark *cm);
char *osmo_gsm48_classmark_a5_name_c(const void *ctx, const struct osmo_gsm48_classmark *cm);
void osmo_gsm48_classmark_update(struct osmo_gsm48_classmark *dst, const struct osmo_gsm48_classmark *src);
-
+int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap);
/* Chapter 10.5.2.1b.3 */
#if OSMO_IS_LITTLE_ENDIAN == 1
struct gsm48_range_1024 {
@@ -887,13 +889,25 @@ struct gsm48_pag_resp {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t spare:4,
key_seq:4;
- uint32_t classmark2;
+ union {
+ uint32_t classmark2; /* Backward compatibility */
+ struct {
+ uint8_t cm2_len;
+ struct gsm48_classmark2 cm2;
+ };
+ };
uint8_t mi_len;
uint8_t mi[0];
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
uint8_t key_seq:4, spare:4;
- uint32_t classmark2;
+ union {
+ uint32_t classmark2; /* Backward compatibility */
+ struct {
+ uint8_t cm2_len;
+ struct gsm48_classmark2 cm2;
+ };
+ };
uint8_t mi_len;
uint8_t mi[0];
#endif
@@ -954,7 +968,7 @@ struct gsm48_system_information_type_header {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t l2_plen;
uint8_t rr_protocol_discriminator :4,
- skip_indicator:4;
+ skip_indicator:4;
uint8_t system_information;
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
@@ -1025,15 +1039,26 @@ struct gsm48_service_request {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t cm_service_type : 4,
cipher_key_seq : 4;
- /* length + 3 bytes */
- uint32_t classmark;
+ union {
+ uint32_t classmark; /* Backward compatibility */
+ struct {
+ uint8_t cm2_len;
+ struct gsm48_classmark2 classmark2;
+ };
+ };
uint8_t mi_len;
uint8_t mi[0];
/* optional priority level */
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
uint8_t cipher_key_seq:4, cm_service_type:4;
- uint32_t classmark;
+ union {
+ uint32_t classmark; /* Backward compatibility */
+ struct {
+ uint8_t cm2_len;
+ struct gsm48_classmark2 classmark2;
+ };
+ };
uint8_t mi_len;
uint8_t mi[0];
#endif
@@ -1104,7 +1129,7 @@ struct gsm48_system_information_type_4 {
struct gsm48_system_information_type_5 {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t rr_protocol_discriminator :4,
- skip_indicator:4;
+ skip_indicator:4;
uint8_t system_information;
uint8_t bcch_frequency_list[16];
#elif OSMO_IS_BIG_ENDIAN
@@ -1149,7 +1174,7 @@ struct gsm48_system_information_type_5ter {
struct gsm48_system_information_type_6 {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t rr_protocol_discriminator :4,
- skip_indicator:4;
+ skip_indicator:4;
uint8_t system_information;
uint16_t cell_identity;
struct gsm48_loc_area_id lai;