Commit Graph

13 Commits

Author SHA1 Message Date
Vadim Yanitskiy cb478ec0ab library/GSM_SystemInformation: add dec_SystemInformationSafe()
Some types of System Information (mostly the Rest Octets) are not
fully implemented, so calling the generic dec_SystemInformation()
may result in a DTE.  Let's add dec_SystemInformationSafeBT() with
"prototype(backtrack)", so it would return a non-zero integer if
decoding fails.  Let's add a wrapper dec_SystemInformationSafe()
that would additionally check the RR Protocol Discriminator.

Change-Id: Id4d73e0f3347e1d4c4c77aec75b767311d662292
Related: OS#4662
2020-07-12 12:34:49 +00:00
Neels Hofmeyr bb2777451a GSM_SystemInformation: add SI2quater
Change-Id: I879c37eb51ece55d79346c6bf1a4951c3f11c77e
2020-07-08 15:27:50 +00:00
Neels Hofmeyr a5f0ed2ba4 GSM_SystemInformation: use GSM_RestOctets for SI3 and SI4 rest_octets
Change-Id: I3f00dd0b4863582fc5edf08149103150b8b5e97b
2020-07-06 16:49:52 +00:00
Vadim Yanitskiy 0217b05050 library: fix enc_SystemInformation(): properly pad messages
Due to a buggy nature of TITAN's padding attributes [1], we cannot
apply them to individual fields of the records that are embedded
into other structured types, like records and unions.

Ensure that encoded System Information messages are padded to
either 23 or 19 octets, depending on their type. In order to
achieve this, rename and wrap the external encoding function.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=562849

Change-Id: I3368df52985e576ad180c9a74d4925dd9c952b55
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06 02:25:10 +07:00
Vadim Yanitskiy b7bc2e6746 library: relax length constraints applied to SI Rest Octets
As it turned out, the length constraints introduced in [1] were
too strict. In particular, the use of FIELDLENGTH attribute made
it impossible to assign an octetstring of a smaller size and then
pad the remaining octets with '2B'O. TITAN would just use '00'O
instead, ignoring all my attempts to talk some sense into it.

[1] I183d3ba9000e3ced8ecce74a4390b80075ddf25d

Change-Id: Ie1b6d4100c064b6ae08ed55cd797b9416c6faf14
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-05 00:16:38 +07:00
Vadim Yanitskiy 2b98bda8dc library: clarify length restrictions for SI4 Rest Octets
Change-Id: I54bfe5710f744cdd61752f3e46b1b00e9f2f3e43
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-03 22:54:08 +07:00
Vadim Yanitskiy edae16aaa3 library: System Information: use RestOctets where possible
The 'RestOctets' is a sub-type of the 'octetstring' with additional
padding attributes. Let's use it for SI2bis, SI2ter, and SI6 too.

Change-Id: I183d3ba9000e3ced8ecce74a4390b80075ddf25d
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-03 22:48:23 +07:00
Vadim Yanitskiy 3c74a1113a library: get rid of Si1RestOctets and Si3RestOctets
Both are basically sub-types of GSM_RR_Types.RestOctets with length
constraints. We don't really need to have them as separate symbols,
especially since we have SI3RestOctets and SI4RestOctets now, so
let's apply these constraints within the corresponding records.

Change-Id: I2b126348ae5c5425fea4267ab2b77ea0192795ac
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-03 22:20:13 +07:00
Harald Welte 34b5a95d09 cosmetic: Update copyright statement, license notice and SPDX
Some of our files didn't have a copyright notice at all, let's add
it.  Also, update the notices in other files and ensure a SPDX
identifier is present in all but the most trivial files.

Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd
2019-05-27 10:00:06 +00:00
Harald Welte 82ccef7c18 Merge duplicate SI3 in GSM_RR_Types and GSM_SystemInformation
Let's have one SI3 definition rather than multiple...

Change-Id: I3c4754c9a69cb2fa51d88ef6358d5399dbb29860
2018-02-25 16:17:33 +01:00
Harald Welte f97649269a sysinfo: Fix compilation 2017-08-20 22:47:44 +02:00
Harald Welte 484160bf21 library: Initial work on GPRS RLC/MAC encoder/decoder
For Downlink and Uplink RLC/MAC Control blocks this is already working
quite nicely.  Data blocks is not working, as their encoding cannot be
expressed in TTCN-3 RAW syntax, and a mixture of C++/native and
RAW-generated coder will be required.
2017-07-28 13:30:24 +02:00
Harald Welte 3b8bdd6358 Introduce 'library' directory for modules shared by multiple test cases 2017-07-19 19:57:26 +02:00