include/: Adapt some headers to match contrib/struct_endianess.py format
This way the related files are not changed when running the script to
generate struct fields for big endian systems.
Change-Id: I830e0961331a73f8dceb1a5a1c879798541752fd
diff --git a/include/osmocom/gprs/protocol/gsm_08_18.h b/include/osmocom/gprs/protocol/gsm_08_18.h
index 0d002b5..d6f0fe6 100644
--- a/include/osmocom/gprs/protocol/gsm_08_18.h
+++ b/include/osmocom/gprs/protocol/gsm_08_18.h
@@ -362,13 +362,12 @@
/* RIM PDU Indications
* 3GPP TS 48.018, section 11.3.65.0 */
struct bssgp_rim_pdu_ind {
-#if OSMO_IS_BIG_ENDIAN
- uint8_t reserved:4,
- pdu_type_ext:3,
- ack_requested:1;
-#elif OSMO_IS_LITTLE_ENDIAN
+#if OSMO_IS_LITTLE_ENDIAN
uint8_t ack_requested:1,
pdu_type_ext:3,
reserved:4;
+#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
+ uint8_t reserved:4, pdu_type_ext:3, ack_requested:1;
#endif
} __attribute__ ((packed));
diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h
index 4937f08..7a527ff 100644
--- a/include/osmocom/gsm/protocol/gsm_08_58.h
+++ b/include/osmocom/gsm/protocol/gsm_08_58.h
@@ -118,35 +118,29 @@
/* Osmocom specific IE to negotiate repeated ACCH capabilities */
struct abis_rsl_osmo_rep_acch_cap {
-#if OSMO_IS_BIG_ENDIAN
- uint8_t reserved:1,
- rxqual:3,
- ul_sacch:1,
- dl_sacch:1,
- dl_facch_all:1,
- dl_facch_cmd:1;
-#elif OSMO_IS_LITTLE_ENDIAN
+#if OSMO_IS_LITTLE_ENDIAN
uint8_t dl_facch_cmd:1,
dl_facch_all:1,
dl_sacch:1,
ul_sacch:1,
rxqual:3,
reserved:1;
+#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
+ uint8_t reserved:1, rxqual:3, ul_sacch:1, dl_sacch:1, dl_facch_all:1, dl_facch_cmd:1;
#endif
} __attribute__ ((packed));
/* Osmocom specific IE to negotiate temporary overpower of ACCH channels */
struct abis_rsl_osmo_temp_ovp_acch_cap {
-#if OSMO_IS_BIG_ENDIAN
- uint8_t sacch_enable:1,
- facch_enable:1,
- rxqual:3,
- overpower_db:3;
-#elif OSMO_IS_LITTLE_ENDIAN
+#if OSMO_IS_LITTLE_ENDIAN
uint8_t overpower_db:3,
rxqual:3,
facch_enable:1,
sacch_enable:1;
+#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
+ uint8_t sacch_enable:1, facch_enable:1, rxqual:3, overpower_db:3;
#endif
} __attribute__ ((packed));
@@ -862,10 +856,10 @@
uint8_t u_rxqual:3, reserved_u_rxqual:1,
l_rxqual:3, reserved_l_rxqual:1;
#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
uint8_t reserved_l_rxlev:2, l_rxlev:6;
uint8_t reserved_u_rxlev:2, u_rxlev:6;
- uint8_t reserved_l_rxqual:1, l_rxqual:3,
- reserved_u_rxqual:1, u_rxqual:3;
+ uint8_t reserved_l_rxqual:1, l_rxqual:3, reserved_u_rxqual:1, u_rxqual:3;
#endif
}__attribute__ ((packed));
@@ -922,6 +916,7 @@
uint8_t pc_interval:5, reserved_pc:3;
uint8_t red_step_size:4, inc_step_size:4;
#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
uint8_t reserved_p1:3, p1:5;
uint8_t reserved_n1:3, n1:5;
uint8_t reserved_p2:3, p2:5;
@@ -943,11 +938,12 @@
uint8_t upper_p:5, reserved_upper_p:3;
uint8_t upper_n:5, reserved_upper_n:3;
#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
uint8_t reserved_lower_p:3, lower_p:5;
uint8_t reserved_lower_n:3, lower_n:5;
uint8_t reserved_upper_p:3, upper_p:5;
uint8_t reserved_upper_n:3, upper_n:5;
- #endif
+#endif
}__attribute__ ((packed));
struct osmo_preproc_pc_comp {
/* Used for Carrier-to-Interference (C/I), in dB: */
@@ -1051,18 +1047,16 @@
};
struct rsl_l1_info {
-#if OSMO_IS_BIG_ENDIAN
- uint8_t ms_pwr:5,
- fpc_epc:1,
- srr_sro:1,
- reserved:1;
- uint8_t ta;
-#elif OSMO_IS_LITTLE_ENDIAN
+#if OSMO_IS_LITTLE_ENDIAN
uint8_t reserved:1,
srr_sro:1,
fpc_epc:1,
ms_pwr:5;
uint8_t ta;
+#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
+ uint8_t ms_pwr:5, fpc_epc:1, srr_sro:1, reserved:1;
+ uint8_t ta;
#endif
} __attribute__ ((packed));
diff --git a/include/osmocom/gsm/protocol/gsm_44_004.h b/include/osmocom/gsm/protocol/gsm_44_004.h
index 32ef24e..616e436 100644
--- a/include/osmocom/gsm/protocol/gsm_44_004.h
+++ b/include/osmocom/gsm/protocol/gsm_44_004.h
@@ -5,17 +5,15 @@
/* TS 44.004 Section 7.1 */
struct gsm_sacch_l1_hdr {
-#if OSMO_IS_BIG_ENDIAN
- uint8_t reserved:1,
- srr_sro:1,
- fpc_epc:1,
- ms_pwr:5;
- uint8_t ta;
-#elif OSMO_IS_LITTLE_ENDIAN
+#if OSMO_IS_LITTLE_ENDIAN
uint8_t ms_pwr:5,
fpc_epc:1,
srr_sro:1,
reserved:1;
uint8_t ta;
+#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
+ uint8_t reserved:1, srr_sro:1, fpc_epc:1, ms_pwr:5;
+ uint8_t ta;
#endif
} __attribute__ ((packed));