Change in osmo-ttcn3-hacks[master]: library/GSM_RR_Types.ttcn: fix: apply BYTEORDER(last) globally

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 11:18:50 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17958 )

Change subject: library/GSM_RR_Types.ttcn: fix: apply BYTEORDER(last) globally
......................................................................

library/GSM_RR_Types.ttcn: fix: apply BYTEORDER(last) globally

By default, the BYTEORDER for BIT1..N sub-types is set to 'first'.
This may result in incorrect decoding of bit-fields located on the
boundary of two octets. For example:

  IA Rest Octets
    L... .... = First Discriminator Bit: Low
    .H.. .... = Second Discriminator Bit: High
    ..0. .... = Discriminator bit: EGPRS Packet Uplink Assignment
    ...0 .... = Downlink/Uplink: EGPRS Packet Uplink Assignment
    EGPRS Packet Uplink Assignment
      .... 0001  1... .... = Extended_RA: 3  // <------------ (!)
      .0.. .... = Access Technologies Request: Not Present
      ..1. .... = TFI/Multiblock: TFI Assignment Present
      ...0 0000 = TFI_Assignment: 0

As can be seen, the field 'Extended_RA' in this particular case
occupies 4 LSBs of the first octet and 1 MSB of the second. So
instead of '00011'B, TITAN's RAW codec decodes '10001'B.

For more details, see:

https://www.eclipse.org/forums/index.php/m/1826511/
https://bugs.eclipse.org/bugs/show_bug.cgi?id=562488

Change-Id: I481a40daef3eed4a3daa687ad87c4128a13181b4
---
M library/GSM_RR_Types.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index 9d71f80..a7d927a 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -1029,4 +1029,4 @@
 		}
 	};
 
-} with { encode "RAW" ; variant "FIELDORDER(msb)" }
+} with { encode "RAW" ; variant "FIELDORDER(msb)" variant "BYTEORDER(last)" }

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I481a40daef3eed4a3daa687ad87c4128a13181b4
Gerrit-Change-Number: 17958
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200428/77a1b709/attachment.htm>


More information about the gerrit-log mailing list