An initial header structure and LOG defines is created in a similar way
to those already existing for libosmo-gprs-llc and sndcp.
Related: OS#5500
Change-Id: Ic9ba207cafeada1b174f1b085e0d1d9a38c66b0a
This allows forwarding GRR-UNITDATA.ind/req up & down the stack, to be
on pair with the BSSGP LLC SAP.
Change-Id: I6a4454b4aa2c96e1f4ce7e2a5d5aba8ec1cf3f60
It is already present in libosmo-gprs-sndcp.pc.in Libs.private, but it
was forgotten at compile time.
That makes it fail under some systems when linking against it (like jenkins):
/build/deps/install/stow/libosmo-gprs/lib/libosmo-gprs-sndcp.so: undefined reference to `ceil'
Change-Id: Iba9629b323b50b28cc4c54cf35b2e39ee89bc192
This way the app can, for instance, simply forward the primtiive pointer
from LLC callback to SNDCP layer, which will in the end take the
ownership of the primitive and free it.
Change-Id: I6ea91b8f190a399c4bcf6c7cba9a65809aaf3ddb
Before this patch, the response was being crafted synchronously through
a direct function call. This patch provides initial support to trigger
the primitives so that the application using the SNDCP layer can handle
the indication and submit a response.
The different XID L3 params are still not being passed to the app, that
will be done in a subsequent patch.
Change-Id: I0a5069fd3dc0d6c3dd28aeae09b51c49dd8be92d
This commit follows a similar approach to Change-Id
I588eb576b2703262f4ab9566ec362920d8390cfd, this time targeting the SNDCP
layer, creating a new library for it.
This new library depends on headers from libosmo-gprs-llc since the
SNDCP spec takes the interface towards lower interfaces from same
llc_prim. It doesn't really call any API from the libosmo-gprs-llc
library to dispatch the primitive, that's left for the application, so
that it can be reused against other implementations.
Most of the SNDCP data structures and APIs are kept private and used
only internally. The Higher/lower layers are expected to interact with
it through the sndcp_prim API.
This commit also implements some of the code paths of the public API by
means on importing SNDCP 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
SNDCP 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.
Change-Id: Ie05b5d721cf0a6147ed45c1feb75ad829865252b
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