Commit Graph

62 Commits

Author SHA1 Message Date
Vadim Yanitskiy ea26c243fc .gitignore: add missing debian/libosmo-gprs-llc*
Change-Id: I31ad48b75a5e2dfdce05731ab90146d66c776581
2022-09-26 17:12:34 +07:00
Vadim Yanitskiy 0b5a816356 llc: make logging category configurable
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
2022-09-22 01:54:07 +07:00
Vadim Yanitskiy 22189e7329 llc: add definitions of service primitive parameters
Change-Id: Iaa520a818b05c962e0d3be9607d3a8c5991f539e
2022-09-22 01:02:21 +07:00
Vadim Yanitskiy f981c629d5 llc: rename enum osmo_gprs_llc_{primitive->prim_type}
Change-Id: Ie0f9cd174934c54940217b89e46568a7c1b76b96
2022-09-22 01:02:21 +07:00
Vadim Yanitskiy 4a108f3a89 llc: separate enum osmo_gprs_llc_primitive to llc_prim.h
Change-Id: Ida9ce56f48474313064d798ea7b9a72e9b99bb8d
2022-09-22 01:02:21 +07:00
Vadim Yanitskiy 19799d106e tests: reorganize llc/rlcmac specific dirs and files
Change-Id: I8592cea020dbbf64940266cd6af14b14d34be3a6
2022-09-22 01:02:21 +07:00
Vadim Yanitskiy 76ac335541 llc: osmo_gprs_llc_hdr_dump[_buf](): also print SAPI name
Change-Id: I95763e622bb3c3678c06901ddaecfc200d359d8d
2022-09-22 01:02:21 +07:00
Vadim Yanitskiy 0963447322 llc: add struct value_string osmo_gprs_llc_sapi_names[]
Change-Id: I8ae048ab9e6b63697951fa3f74ce671c88328f5f
2022-09-22 01:02:21 +07:00
Vadim Yanitskiy c892acda1f llc: re-define value-string API as static inline functions
Using static inline functions allows for type checking at compile-time.

Change-Id: I1b3245f62f5182aa91dbad7958d89220f7107337
Fixes: I6d0e1a878fb80c57a901da08798620a6ea4471a4
2022-09-22 01:00:37 +07:00
Vadim Yanitskiy c1ca5406bc llc: implement LLC PDU codec based on code from osmo-sgsn.git
osmo-sgsn.git 13ccbc1e6120fe78f6f9f950d7242090920ca41b

Change-Id: I61d7e2e6d0a8f2cdfc2113e637e447dc428cc70d
2022-09-22 00:56:15 +07:00
Vadim Yanitskiy bae1ec285b llc: add -export-symbols-regex '^osmo_' to CFLAGS
Change-Id: I7fac3ef730ea4b2719002dd61289b22c424f43f4
2022-09-18 20:45:44 +07:00
Vadim Yanitskiy 4762fcc885 llc: import FCS (CRC24) calculation API from osmo-sgsn.git
osmo-sgsn.git fb6cf3221ef4989441c09a650011e4a334c37d12

Changes made:

* Add 'osmo_' prefix to gprs_llc_fcs(),
* osmo_gprs_llc_fcs() takes size_t and returns uint32_t,
* crc24_calc() takes size_t.

Change-Id: Ib4465c289d9ef2a1b8ef5730c559bc799bb1f012
2022-09-18 20:45:44 +07:00
Vadim Yanitskiy fcd76ba2d1 llc: add definitions from 3GPP TS 44.064 section 6.4
Change-Id: I6d0e1a878fb80c57a901da08798620a6ea4471a4
2022-09-18 20:45:44 +07:00
Vadim Yanitskiy 8ab2897836 llc: add missing LLE <-> (RLC/MAC,BSSGP) primitives
3GPP TS 44.064, section 7.1.2, Table 7: "LLC layer service primitives".

Change-Id: I10bb63220585424584185ce2bde2d9f8fd0d8342
2022-09-18 20:45:44 +07:00
Vadim Yanitskiy d622de8362 llc: add missing LLGMM primitive types
From 3GPP TS 44.064 version 16.0.0 (2020-08) Release 16.

Change-Id: I85d3403f26ed1d80453affb7e01803402ccd7937
2022-09-18 20:45:44 +07:00
Vadim Yanitskiy 4566897df8 llc: enum osmo_gprs_llc_primitive: drop Req/Ind/Rsp/Cnf
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
2022-09-18 20:45:44 +07:00
Vadim Yanitskiy 2f1755face llc: enum osmo_gprs_llc_sapi: fix spec reference
The actual SAPI values are given in section 6.2.3, table 2.

Change-Id: I84de7718e12b6b55a1735da148d7f8b0dacb72df
2022-09-18 20:45:44 +07:00
Vadim Yanitskiy 609e7b4cd4 llc: ensure all symbols have 'osmo_gprs_llc_' prefix
Change-Id: I569d8023d701bd14ee78baa9394b6983d9cafca8
2022-09-18 20:45:42 +07:00
Vadim Yanitskiy efef180c86 llc: check-in basic LLC definitions from osmo-sgsn.git
osmo-sgsn.git fb6cf3221ef4989441c09a650011e4a334c37d12

Change-Id: I6ed0f4820b3a12a00be71ce63757765551743101
2022-09-18 20:25:36 +07:00
Vadim Yanitskiy 2639b78795 Initial libosmo-gprs-llc library skeleton
Change-Id: Ia537acc6f4e6ab576dc7959d427b80f62c474296
2022-09-02 00:58:05 +07:00
Vadim Yanitskiy 4e50861ea0 rlcmac/ts_44_018: add missing M_PADDING_BITS to SI_13_t
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
2022-08-24 21:15:56 +07:00
Vadim Yanitskiy 74ec6d9cb6 rlcmac: add osmo_gprs_rlcmac_decode_si13ro()
Change-Id: Ic8446509ef474b8496e5557aab3d2a9e94e11897
2022-08-24 21:15:56 +07:00
Vadim Yanitskiy 4a04f1d5ab rlcmac: split ts_24_008.c out of ts_44_060.c
Change-Id: Idedf52423fef18b929e8096fbe4e130b5a6c7d2c
2022-08-24 21:15:53 +07:00
Vadim Yanitskiy 931b64ee79 rlcmac: split gprs_rlcmac.c onto ts_44_{060,018}.c
Change-Id: I2b941f06a70a25e92ba3fd2638f87360a5aa5435
2022-08-24 21:03:51 +07:00
Vadim Yanitskiy 8e3f0fd84a rlcmac: make logging category configurable
Change-Id: Icfef6de126304da81120f1d7b212992ead3409aa
2022-08-24 20:56:17 +07:00
Vadim Yanitskiy 1014ac4b18 libosmo-{csn1,gprs-rlcmac}.pc.in: add missing Requires
Change-Id: I673a51fbf8ee339b20baca4998ef79e96170f21e
2022-08-24 20:32:40 +07:00
Vadim Yanitskiy 5e93c7d048 Add .checkpatch.conf with project specific linter config
Change-Id: Ifc1de9ca7ec792029d271fde40976a2420a0df54
2022-08-24 06:59:48 +07:00
Vadim Yanitskiy 6f5f26d4f1 rlcmac: fix using incomplete type 'struct value_string'
Change-Id: I6f261c0e57a8d341f6e613a2845a6f2cb52d3830
2022-08-22 20:57:01 +07:00
Vadim Yanitskiy c831aa477a csn1: add CSN_DESCR_EXTERN for extern declarations
Change-Id: Ieb721c97c8e9acee5057bb04be73f27b2871687b
2022-08-22 20:56:57 +07:00
Vadim Yanitskiy 8f7941e5e5 csn1: cosmetic: coding style improvements for #defines
Change-Id: Ia00809aa95b91006149d62abbeda9493b5a64728
2022-08-22 06:00:47 +07:00
Vadim Yanitskiy 56a2d28f59 csn1: #include <stddef.h> in csn1.h for offsetof()
Do not require the API user to include <stddef.h>:

  note: 'offsetof' is defined in header '<stddef.h>';
        did you forget to '#include <stddef.h>'?

Change-Id: I2a144c9967b90d78d95db103eebce83822d8c64d
2022-08-22 06:00:28 +07:00
Vadim Yanitskiy 52566c837a contrib/libosmo-gprs.spec.in: properly define RPM packages
Co-Authored-By: Oliver Smith <osmith@sysmocom.de>
Change-Id: I9be45c43ba3e342e1dba4b60561880c00841f549
2022-08-18 09:16:18 +00:00
Vadim Yanitskiy 3653ef2d50 configure: generate libosmo-gprs.spec from libosmo-gprs.spec.in
Change-Id: Ie15c136d9f1919da0217b17d1afa9268f7ceaab1
2022-08-18 09:16:18 +00:00
Vadim Yanitskiy 5715dd5d7c configure.ac: do require unused dlopen
Change-Id: Iaf9729156ace5f8dc9134094ab3c0a185c7184d5
2022-08-18 08:36:31 +00:00
Vadim Yanitskiy e679faad68 debian: clarify license/copyright for CSN.1 codec by ST-Ericsson
Change-Id: Ia76edccdfc14b06297fe7a306bc19ca52c7db3bd
2022-08-18 08:33:40 +00:00
Vadim Yanitskiy 147c95f09f tests/testsuite.at: remove $OSMO_QEMU, it's not used
Change-Id: If7332b347c0f08252b130ca7f6e7ec4fe6d78b59
2022-08-16 17:40:14 +00:00
Vadim Yanitskiy fd63d50bb0 tests/rlcmac: fix incorrect RLCMACTest.{ok,err} paths in EXTRA_DIST
Change-Id: I175bd6494e2a7a6f6977388d760e790b7dd2c1ae
2022-08-16 17:39:42 +00:00
Vadim Yanitskiy 11cbba9d9d update git URLs (git -> https; gitea)
Change-Id: Icb87ee511ceb9e65d7a801eeb8d4314b66e9f20a
2022-08-10 19:35:26 +07:00
Vadim Yanitskiy 4e1fbdd74e debian/compat: bump debhelper compatibility level: 9 -> 10
Change-Id: Ia3c8c4a61615c70c791dd01d02a16341e78dfb33
2022-08-10 02:58:59 +07:00
Vadim Yanitskiy e5e85388fb debian/control: fix missing/misplaced commas in dependencies
Change-Id: I4bf3d90bb57638e01c165c35c3d48c180f01bb68
2022-08-10 02:58:59 +07:00
Vadim Yanitskiy d8cd59014e debian: fix empty changelog: generate using Debian's dch tool
Otherwise debuild would refuse to build packages.

Change-Id: I70b84f3ae080ab9712e83732a103340d774038a7
2022-08-10 02:58:59 +07:00
Vadim Yanitskiy 7046aea353 gitignore: ignore build products of dpkg-buildpackage
Change-Id: I816533cd1361aa22e8d608fb336a69c7927b4901
2022-08-10 02:58:59 +07:00
Vadim Yanitskiy 96a7e42977 Makefile.am: add 'debian' to EXTRA_DIST
Change-Id: Idbadc505b4149ea16f86cb4afcf6c9d291a8524c
2022-08-07 19:33:03 +07:00
Vadim Yanitskiy ac4e2d54d7 debian: fix a typo in 'rules': s/csn10/csn1-0/
Change-Id: Ic28ed41f076b460e3f89d0754c1c70ff239642f8
2022-08-07 19:22:26 +07:00
Vadim Yanitskiy a1751f7b17 debian: add initial package manifest
Change-Id: I253d92b3a1820d8e33ed67e73a43c90351158337
2022-08-07 17:51:26 +07:00
Vadim Yanitskiy ddfa936889 contrib: add jenkins.sh and libosmo-gprs.spec.in
Change-Id: I5b97df8dcd9e1f43d5f569f27d885e24f4ad7d0c
2022-08-07 17:51:26 +07:00
Vadim Yanitskiy ee498834d0 README.md: add a brief overview of the libraries we provide
Change-Id: I7db0d95dc368e7ed21b05a89a9426f98e49a3595
2022-08-07 17:51:26 +07:00
Vadim Yanitskiy 03c0a14c7a tests: adopt RLC/MAC tests from osmo-pcu.git
Change-Id: I8cb5364b7311e004c2afc9438cbfac8d43c86cf7
2022-08-07 17:51:26 +07:00
Vadim Yanitskiy 00498acb16 rlcmac: add -export-symbols-regex '^osmo_' to LDFLAGS
Change-Id: I17c0f1d7b7f3ec07eb880e4db46e316a5753edd3
2022-08-07 17:51:26 +07:00
Vadim Yanitskiy 2b4c0972b8 rlcmac: expose [osmo_gprs_rlcmac_]egprs_pkt_ch_req_type_names[]
Change-Id: Ieb8046b16e1b992dc20055539988af6c3a9a7a4e
2022-08-07 17:51:26 +07:00