Change in libosmocore[master]: gsm_04_06.h: Remove repeated egprs header struct definitions

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Apr 28 10:14:57 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17964 )


Change subject: gsm_04_06.h: Remove repeated egprs header struct definitions
......................................................................

gsm_04_06.h: Remove repeated egprs header struct definitions

Each struct already contains different definition based on endianess, so
there's no reason to re-define all of them again based on endianess.
Probably at some point somebody run the script
./contrib/struct_endianess.py on those structures but forgot to remove
the old way of supporting differnet endianess.

Change-Id: Ibd002e52979950e09013767fa643b2a3c52dfea9
---
M include/osmocom/gprs/protocol/gsm_04_60.h
1 file changed, 0 insertions(+), 153 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/64/17964/1

diff --git a/include/osmocom/gprs/protocol/gsm_04_60.h b/include/osmocom/gprs/protocol/gsm_04_60.h
index f592b14..05728f4 100644
--- a/include/osmocom/gprs/protocol/gsm_04_60.h
+++ b/include/osmocom/gprs/protocol/gsm_04_60.h
@@ -9,7 +9,6 @@
 #include <stdint.h>
 #include <osmocom/core/endian.h>
 
-#if OSMO_IS_LITTLE_ENDIAN == 1
 /* TS 04.60  10.3a.4.1.1 */
 struct gprs_rlc_ul_header_egprs_1 {
 #if OSMO_IS_LITTLE_ENDIAN
@@ -160,158 +159,6 @@
 	uint8_t dummy:1, spb:2, cps:4, bsn1_lo:1;
 #endif
 } __attribute__ ((packed));
-#else
-/* TS 04.60  10.3a.4.1.1 */
-struct gprs_rlc_ul_header_egprs_1 {
-#if OSMO_IS_LITTLE_ENDIAN
-	uint8_t tfi_hi:2,
-		 cv:4,
-		 si:1,
-		 r:1;
-	uint8_t bsn1_hi:5,
-		tfi_lo:3;
-	uint8_t bsn2_hi:2,
-		bsn1_lo:6;
-	uint8_t bsn2_lo:8;
-	uint8_t spare_hi:1,
-		pi:1,
-		rsb:1,
-		cps:5;
-	uint8_t dummy:2,
-		spare_lo:6;
-#elif OSMO_IS_BIG_ENDIAN
-/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
-	uint8_t r:1, si:1, cv:4, tfi_hi:2;
-	uint8_t tfi_lo:3, bsn1_hi:5;
-	uint8_t bsn1_lo:6, bsn2_hi:2;
-	uint8_t bsn2_lo:8;
-	uint8_t cps:5, rsb:1, pi:1, spare_hi:1;
-	uint8_t spare_lo:6, dummy:2;
-#endif
-} __attribute__ ((packed));
-
-/* TS 04.60  10.3a.4.2.1 */
-struct gprs_rlc_ul_header_egprs_2 {
-#if OSMO_IS_LITTLE_ENDIAN
-	uint8_t tfi_hi:2,
-		 cv:4,
-		 si:1,
-		 r:1;
-	uint8_t bsn1_hi:5,
-		 tfi_lo:3;
-	uint8_t cps_hi:2,
-		 bsn1_lo:6;
-	uint8_t spare_hi:5,
-		 pi:1,
-		 rsb:1,
-		 cps_lo:1;
-	uint8_t dummy:3,
-		 spare_lo:5;
-#elif OSMO_IS_BIG_ENDIAN
-/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
-	uint8_t r:1, si:1, cv:4, tfi_hi:2;
-	uint8_t tfi_lo:3, bsn1_hi:5;
-	uint8_t bsn1_lo:6, cps_hi:2;
-	uint8_t cps_lo:1, rsb:1, pi:1, spare_hi:5;
-	uint8_t spare_lo:5, dummy:3;
-#endif
-} __attribute__ ((packed));
-
-/* TS 04.60  10.3a.4.3.1 */
-struct gprs_rlc_ul_header_egprs_3 {
-#if OSMO_IS_LITTLE_ENDIAN
-	uint8_t tfi_hi:2,
-		 cv:4,
-		 si:1,
-		 r:1;
-	uint8_t bsn1_hi:5,
-		 tfi_lo:3;
-	uint8_t cps_hi:2,
-		 bsn1_lo:6;
-	uint8_t dummy:1,
-		 spare:1,
-		 pi:1,
-		 rsb:1,
-		 spb:2,
-		 cps_lo:2;
-#elif OSMO_IS_BIG_ENDIAN
-/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
-	uint8_t r:1, si:1, cv:4, tfi_hi:2;
-	uint8_t tfi_lo:3, bsn1_hi:5;
-	uint8_t bsn1_lo:6, cps_hi:2;
-	uint8_t cps_lo:2, spb:2, rsb:1, pi:1, spare:1, dummy:1;
-#endif
-} __attribute__ ((packed));
-
-struct gprs_rlc_dl_header_egprs_1 {
-#if OSMO_IS_LITTLE_ENDIAN
-	uint8_t tfi_hi:1,
-		 rrbp:2,
-		 es_p:2,
-		 usf:3;
-	uint8_t bsn1_hi:2,
-		 pr:2,
-		 tfi_lo:4;
-	uint8_t bsn1_mid:8;
-	uint8_t bsn2_hi:7,
-		 bsn1_lo:1;
-	uint8_t cps:5,
-		 bsn2_lo:3;
-#elif OSMO_IS_BIG_ENDIAN
-/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
-	uint8_t usf:3, es_p:2, rrbp:2, tfi_hi:1;
-	uint8_t tfi_lo:4, pr:2, bsn1_hi:2;
-	uint8_t bsn1_mid:8;
-	uint8_t bsn1_lo:1, bsn2_hi:7;
-	uint8_t bsn2_lo:3, cps:5;
-#endif
-} __attribute__ ((packed));
-
-struct gprs_rlc_dl_header_egprs_2 {
-#if OSMO_IS_LITTLE_ENDIAN
-	uint8_t tfi_hi:1,
-		 rrbp:2,
-		 es_p:2,
-		 usf:3;
-	uint8_t bsn1_hi:2,
-		 pr:2,
-		 tfi_lo:4;
-	uint8_t bsn1_mid:8;
-	uint8_t dummy:4,
-		 cps:3,
-		 bsn1_lo:1;
-#elif OSMO_IS_BIG_ENDIAN
-/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
-	uint8_t usf:3, es_p:2, rrbp:2, tfi_hi:1;
-	uint8_t tfi_lo:4, pr:2, bsn1_hi:2;
-	uint8_t bsn1_mid:8;
-	uint8_t bsn1_lo:1, cps:3, dummy:4;
-#endif
-} __attribute__ ((packed));
-
-struct gprs_rlc_dl_header_egprs_3 {
-#if OSMO_IS_LITTLE_ENDIAN
-	uint8_t tfi_hi:1,
-		 rrbp:2,
-		 es_p:2,
-		 usf:3;
-	uint8_t bsn1_hi:2,
-		 pr:2,
-		 tfi_lo:4;
-	uint8_t bsn1_mid:8;
-	uint8_t dummy:1,
-		 spb:2,
-		 cps:4,
-		 bsn1_lo:1;
-#elif OSMO_IS_BIG_ENDIAN
-/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
-	uint8_t usf:3, es_p:2, rrbp:2, tfi_hi:1;
-	uint8_t tfi_lo:4, pr:2, bsn1_hi:2;
-	uint8_t bsn1_mid:8;
-	uint8_t bsn1_lo:1, cps:4, spb:2, dummy:1;
-#endif
-} __attribute__ ((packed));
-#endif
 
 /* TS 03.60 Chapter 6.3.3.1: Network Mode of Operation */
 enum osmo_gprs_nmo {

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17964
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibd002e52979950e09013767fa643b2a3c52dfea9
Gerrit-Change-Number: 17964
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200428/e76bb801/attachment.htm>


More information about the gerrit-log mailing list