Hello Ruben Undheim,

I'd like you to do a code review. Please visit

    https://gerrit.osmocom.org/c/osmo-pcu/+/14802

to review the following change.


Change subject: Add structs for big-endian
......................................................................

Add structs for big-endian

Change-Id: I6af6d5ef05a8b240acfd9da747d9657bb6aa0ef8
---
M src/rlc.h
1 file changed, 35 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/02/14802/1

diff --git a/src/rlc.h b/src/rlc.h
index 5b6a0dd..7881256 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -409,7 +409,41 @@
                 li:7;
 } __attribute__ ((packed));
 #else
-#  error "Only little endian headers are supported yet. TODO: add missing 
structs"
+struct rlc_ul_header {
+       uint8_t  pt:2,
+                cv:4,
+                si:1,
+                r:1;
+       uint8_t  spare:1,
+                pi:1,
+                tfi:5,
+                ti:1;
+       uint8_t bsn:7,
+                e:1;
+} __attribute__ ((packed));
+
+struct rlc_dl_header {
+       uint8_t pt:2,
+                rrbp:2,
+                s_p:1,
+                usf:3;
+       uint8_t pr:2,
+                tfi:5,
+                fbi:1;
+       uint8_t bsn:7,
+                e:1;
+} __attribute__ ((packed));
+
+struct rlc_li_field {
+       uint8_t li:6,
+                m:1,
+                e:1;
+} __attribute__ ((packed));
+
+struct rlc_li_field_egprs {
+       uint8_t li:7,
+                e:1;
+} __attribute__ ((packed));
 #endif
 }


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I6af6d5ef05a8b240acfd9da747d9657bb6aa0ef8
Gerrit-Change-Number: 14802
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <[email protected]>
Gerrit-Reviewer: Ruben Undheim <[email protected]>
Gerrit-MessageType: newchange

Reply via email to