Add missing definition for the <Multiple Blocks Packet Downlink
Assignment> structure. It's not 100% complete, but should serve
a good starting point if we ever need to support this.
Change-Id: I544245f690fdd14a94f858a5f3cd8f8d39d17611
Related: OS#5500
Use a self-explanatory name instead of the one with magic numbers.
It's safe to rename it because this API is not used anywhere yet.
Change-Id: I884cba359bfda21cf45fa846e5b7ff20d129bdf7
Related: OS#5500
Thanks to the unit tests, it was found that decoding of the LH part,
specifically the EGPRS Packet Uplink Assignment structure, is done
incorrectly. This patch fixes incorrect decoding.
Double usage of the UnionType element in the IA_EGPRS_t has a side
effect: the M_UINT actually consumes one bit, so the remaining bit
stream is shifted and decoded incorrectly.
Replace a combination of M_UINT and M_CHOICE with two M_UNIONs.
Remove struct IA_EGPRS_t, which is not used anywhere yet.
For reference, see 3GPP TS 44.018, table 10.5.2.16.1.
Change-Id: I7fedbad1ac4d744d1d3941553e573d4202e9d24a
Fixes: I39a29dc9b5b22ce4374ae33336696014e326d012
Related: OS#5500
This new API is needed for the MS side GPRS implementation in order
to be able to establish an Uplink TBF. Both wireshark and osmo-pcu
rely on hand-written code for parsing and generating the IA Rest
Octets IE, making no use of the CSN.1 codec.
We already have some (mostly commented out) CSN.1 definitions needed
for decoding the IA Rest Octets IE, inherited as-is from wireshark.
Ths patch adds the missing bits and a few unit test vectors.
Note that decoding of the LH part, specifically the EGPRS Packet
Uplink Assignment structure, is currently done incorrectly because
there is a problem in the IA_EGPRS_t definition. This will be
fixed in a follow-up patch.
For reference, see 3GPP TS 44.018, table 10.5.2.16.1.
Change-Id: I39a29dc9b5b22ce4374ae33336696014e326d012
Related: OS#5500
Most of the existing (and added) data structures are kept private, since
most of those don't really need to be used outside internal code in the
library.
Most if not all the interaction from upper and lower layers towards LLC
is now done through the new llc_prim pubic interface. This interface is
based on 3GPP TS 44.064 section 7.1.2.
This commit also implements some of the code paths of the public API by
means on importing LLC code from osmo-sgsn.git commit
57b63875c762a784127a13becd1c2549ca6c5454.
The import of code cannot be done in a separate commit since existing code
in osmo-sgsn.git is low quality and has tons of layer violations in all
directions.
Hence, this commit aims at being an initial point of having some working
LLC stack by means of a few unit tests, but by no means aims to be a
total working implementation. Some code paths are missing; bugs are
expected at this point.
Related: OS#5502
Change-Id: I588eb576b2703262f4ab9566ec362920d8390cfd
libosmogsm is needed for the follow-up patch [1].
Change-Id: Iee45fb87905ea29df02a48003396bde27e6c550c
Related: [1] I588eb576b2703262f4ab9566ec362920d8390cfd
Related: OS#5502
This is needed for the follow-up patch [1].
Change-Id: Ie8ba61b124585e55accdaf2713b72e3ace78772f
Related: [1] I588eb576b2703262f4ab9566ec362920d8390cfd
Related: OS#5502
Header file <osmocom/gsm/protocol/gsm_04_08.h> belongs to libosmogsm.
However, file 'contrib/libosmo-gprs.spec.in' does not list this lib
as a build dependency. So building the RPM package currently fails.
We could have listed libosmogsm as 'BuildRequires', but given that
the only thing we use from this lib is the GSM_MACBLOCK_LEN macro,
there is no real need to depend on it.
Change-Id: Ieac350e7a05965c64e8ccf8dd17a569f0afd9514
Similar to Icfef6de126304da81120f1d7b212992ead3409aa, let's add
osmo_gprs_llc_set_log_cat() allowing the API users to change
logging category for libosmo-gprs-llc (DLGLOBAL is default).
Change-Id: I9deb794db1c80257ba81523f815232208381bc27
Using static inline functions allows for type checking at compile-time.
Change-Id: I1b3245f62f5182aa91dbad7958d89220f7107337
Fixes: I6d0e1a878fb80c57a901da08798620a6ea4471a4
The libosmocore's prim API offers 'enum osmo_prim_operation', which
contains all required primitive operations: Req/Ind/Rsp/Cnf. Having
LLC primitive types discriminated by operation is redundant.
Change-Id: Ifa7512d0f6c7d3577358fd1449707315ba55894d
According to table 10.5.2.37b.1, SI 13 Rest Octets IE does contain
spare padding. Adding M_PADDING_BITS fixes decoder warnings about
unhandled remaining bits.
Change-Id: I44fb7e2a60da022ee99f1a6cd4f2635bef2bfe1e