diff options
author | Oliver Smith <osmith@sysmocom.de> | 2023-02-20 11:01:08 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2023-02-20 11:18:43 +0100 |
commit | 65957cf8771c4aa321b51ea4a7253d0a20b6b17e (patch) | |
tree | 531b9d12f3dcfdde8ec29ed6412f37aa06aabaa2 /src/host/layer23/include/osmocom/bb/common | |
parent | f6c1cec3b5c9a3d25dd2d993af279dbbda7fc5a0 (diff) |
Run struct_endianness.py
Ensure there is no diff to prepare to run this in CI.
Related: OS#5884
Change-Id: I617c967c5f34c0be2cf6fd43ceb1af17897f2bf1
Diffstat (limited to 'src/host/layer23/include/osmocom/bb/common')
-rw-r--r-- | src/host/layer23/include/osmocom/bb/common/sim.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/host/layer23/include/osmocom/bb/common/sim.h b/src/host/layer23/include/osmocom/bb/common/sim.h index 321baf49..35b48f47 100644 --- a/src/host/layer23/include/osmocom/bb/common/sim.h +++ b/src/host/layer23/include/osmocom/bb/common/sim.h @@ -18,6 +18,7 @@ #pragma once #include <osmocom/gsm/protocol/gsm_04_08.h> +#include <osmocom/core/endian.h> /* 9.2 commands */ #define GSM1111_CLASS_GSM 0xa0 @@ -211,6 +212,7 @@ struct gsm1111_response_mfdf { } __attribute__ ((packed)); struct gsm1111_response_mfdf_gsm { +#if OSMO_IS_LITTLE_ENDIAN uint8_t file_char; uint8_t num_df; uint8_t num_ef; @@ -229,10 +231,24 @@ struct gsm1111_response_mfdf_gsm { rfu5:3, unblk2_init:1; uint8_t more_data[0]; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */ + uint8_t file_char; + uint8_t num_df; + uint8_t num_ef; + uint8_t num_codes; + uint8_t rfu1; + uint8_t chv1_init:1, rfu2:3, chv1_remain:4; + uint8_t unblk1_init:1, rfu3:3, unblk1_remain:4; + uint8_t chv2_init:1, rfu4:3, chv2_remain:4; + uint8_t unblk2_init:1, rfu5:3, unblk2_remain:4; + uint8_t more_data[0]; +#endif } __attribute__ ((packed)); /* Section 9.2.1 (response to selecting EF) */ struct gsm1111_response_ef { +#if OSMO_IS_LITTLE_ENDIAN uint16_t rfu1; uint16_t file_size; uint16_t file_id; @@ -250,6 +266,20 @@ struct gsm1111_response_ef { rfu4:5; uint8_t length; uint8_t structure; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */ + uint16_t rfu1; + uint16_t file_size; + uint16_t file_id; + uint8_t tof; + uint8_t inc_allowed; + uint8_t acc_read:4, acc_update:4; + uint8_t acc_inc:4, rfu2:4; + uint8_t acc_reha:4, acc_inval:4; + uint8_t rfu4:5, ru_inval:1, rfu3:1, not_inval:1; + uint8_t length; + uint8_t structure; +#endif } __attribute__ ((packed)); /* Section 10.3.17 */ |