aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gprs/protocol
AgeCommit message (Collapse)AuthorFilesLines
2023-02-20Move libosmogsm TS 44.060 declarations under include/osmocom/gsm/Pau Espin Pedrol1-200/+2
Currently there's a big mess where include dir osmocom/gprs/ is used by both libosmogsm and libosmogb. Most of the header files under osmocom/gprs/ are actually all the headers of libosmogb (there's no osmocom/gb/ dir). But a couple files are actually RLC/MAC (TS 44.060) related are are also stored in there. Those files have no relation/use in Gb, and are actually interused with GSM (eg System Information 13 Rest Octets). Hence, it makes sense to have the RLC/MAC related parts inside osmocom/gsm/ as they should be in libosmogsm (and they actually are, see gprs_rlc.h function implemented in src/gsm/gsm48_rest_octets.c). The fact that some libosmogsm headers were placed in osmocom/gprs instead of osmocom/gsm already created some issues, like libosmocore.spec.in putting "%_includedir/%name/osmocom/gprs/" under libosmogb, which is wrong. As a first step to fix the mess, we move the 2 RLC/MAC headers currently under osmocom/gprs/{gprs_rlc,protocol/gsm_04_60}.h under a single header gsm/protocol/gsm_44_060.h The two old headers are left existing for backward compatibility and now simply include the new libosmogsm header, plus a warning asking users to switch to the new header so we can eventually get rid of them. This means libosmogb depends on libosmogsm, which is fine and was already the case beforehand (libosmogb using functions like gsm48_encode_ra() and linking against it in src/gb/Makefile.am). Change-Id: I70cc21bf25a7081070738abacb409ed19094c3b2
2023-02-20gsm_04_60.h: Better describe origin of enum osmo_gprs_nmoPau Espin Pedrol1-1/+2
Change-Id: Ied6c11aa92ea5a2e18a6045cefddfd4e40108174
2023-02-17Fix typo endianess -> endiannessOliver Smith2-7/+7
Rename contrib/struct_endianess.py to contrib/struct_endianness.py, and fix the typo everywhere. This is in preparation to call the script in CI on all repositories. Related: OS#5884 Change-Id: Idc4af9098ba1de26243464c772d6ea8be330646a
2023-01-18Split include/Makefile.am content into subdirsPau Espin Pedrol1-0/+8
When someone is modifying a given library there's no need to be looking at a common file contains tons of lines from different libraries. Furthermore, this removes the need of "nobase" autofoo prefix, hence following the usual directive of having one Makefile per directory. Change-Id: I785891c2f89114bf8303c799094b637d3d25ac71
2021-12-22include/: Adapt some headers to match contrib/struct_endianess.py formatPau Espin Pedrol1-5/+4
This way the related files are not changed when running the script to generate struct fields for big endian systems. Change-Id: I830e0961331a73f8dceb1a5a1c879798541752fd
2021-02-08Fix struct bitfields on big endian systemsPau Espin Pedrol1-0/+1
Changes done by contrib/struct_endianess.py. Change-Id: Ia9cb1ef2ba2bfff9ef713c7d1cf388931dae1c46
2021-01-06gsm_08_18: add struct to parse RIM PDU IndicationsPhilipp Maier1-0/+22
3GPP TS 48.018, section 11.3.65 describes an IE to transfer some control flags via a RIM container. The IE is essentially just a bitfield, so it can be parsed by overlaying it with a C-struct. Lets add an appropiate struct to protocol/gsm_08_18.h Change-Id: I781ab838bd02ac1b13d384ce3f4259e26cedb61e Related: SYS#5103
2020-12-17GPRS Cell Options (SI13): Add REL-4 CCN_ACTIVE bitPau Espin Pedrol1-1/+2
This is required in order to tell MS that osmo-pcu now supports Network Assisted Cell Change (NACC). Related: SYS#4909 Change-Id: I2aaa8c1107c977f711c2d7530034f57e36e3a237
2020-12-16gprs_bssgp: add IE parser/generator for RIM Routing InformationPhilipp Maier1-0/+11
The RIM Routing Information IE (see also 3GPP TS 48.018, section 11.3.70) is used to control the flow of BSSGP rim messages at the SGSN. Change-Id: I6f88a9aeeb50a612d32e9efd23040c9740bc4f11 Related: SYS#5103
2020-12-09bssgp2: Encoding + Decoding functions for BVC and MS flow controlHarald Welte1-0/+8
Change-Id: I9c89bb1c03550930c07aad7ff8f67129ee7a6320 Related: OS#4891
2020-12-08gsm_08_18.h: Add #defines for [extended] feature bitsHarald Welte1-0/+20
Change-Id: I7743cb901988c8fddd91127cfdca6e54b3d44ea8
2020-12-06gsm_08_18.h: Add some PDU definitions still missingHarald Welte1-0/+19
In I7da8b25c9a89a7e3ae6c1680ba838e136d7d5293 I seem to have failed to realize that 3GPP TS 48.018 v15.0.0.0 Table 11.3.26 continues on yet another page. Let's add those missing PDU types definitions. Change-Id: I9173c35240ff78048b2b76a1155d90467ef16b2d
2020-12-04bssgp: Fix typo in BSSGP Message Type enumHarald Welte1-1/+4
Change-Id: I63941f8b38485e569f56ba5065c2c00232703028
2020-12-02gsm_08_18.h: Update enums for message types and IEs with Release 15Harald Welte1-2/+123
Lots of newly introduced message types and information elements. Change-Id: I7da8b25c9a89a7e3ae6c1680ba838e136d7d5293
2020-09-21gsm_08_16.h: Add missing headerDaniel Willmann1-0/+1
utils.h is needed for struct value_string This probably never caused a problem because every file including gsm_08_16.h also included utils.h, but we should still include the file here. Change-Id: Iae09b4e8e42be6c371fb34279b7981db2af8cf4c
2020-09-15Gb: add a second NS implementationAlexander Couzens1-0/+9
Reimplement NS with FSM. Change-Id: I3525beef205588dfab9d3880a34115f1a2676e48
2020-04-28gsm_04_06.h: Remove repeated egprs header struct definitionsPau Espin Pedrol1-153/+0
Each struct already contains different definition based on endianess, so there's no reason to re-define all of them again based on endianess. Probably at some point somebody run the script ./contrib/struct_endianess.py on those structures but forgot to remove the old way of supporting differnet endianess. Change-Id: Ibd002e52979950e09013767fa643b2a3c52dfea9
2019-02-26NS: Add support for GPRS NS IP Sub-Network-Service (SNS)Harald Welte1-0/+1
The NS implementation part of the Gb implementation libosmogb so far implemented a rather classic dialect of Gb, with lots of heritage to FR (Frame Relay) transports. At least since Release 6 of the NS specification, there's an IP Sub-Network Service (SNS), which * permits for dynamic configuration of IP endpoints and their NS-VCs * abandons the concept of a NSVCI on IP transport * forbids the use of RESET/BLOCK/UNBLOCK procedures on IP transport This commit introduces BSS-side IP-SNS support to libosmogb in a minimally invasive way. It adds a corresponding SNS FSM to each NS instance, and implements the new SIZE/CONFIG/ADD/DELETE/CHANGE_WEIGHT procedures very closely aligned with the spec. In order to use the SNS flavor (rather than the classic one), a BSS implementation should use gprs_ns_nsip_connect_sns() instead of the existing gprs_ns_nsip_connect(). This implementation comes with a set of TTCN-3 tests in PCU_Tests_RAW_SNS.ttcn, see Change-ID I0fe3d4579960bab0494c294ec7ab8032feed4fb2 of osmo-ttcn3-hacks.git Closes: OS#3372 Closes: OS#3617 Change-Id: I84786c3b43a8ae34ef3b3ba84b33c90042d234ea
2019-02-26gprs_ns: Add code for SNS-SIZE and SNS-CONFIG encodingHarald Welte1-0/+9
Modern NS specifications contain a SNS (Sub Network Service) for negotiating IP/port/weight parameters of NS-over-IP links dynamically. This patch adds message encoding routines for SNS-CONFIG, SNS-SIZE and their respective acknowledgements. Related: OS#3372 Change-Id: I5c47e1c3c10deb89a7470ee2c03adfc174accc93
2019-01-12port rest octets encoding code from osmo-bscStefan Sperling1-0/+39
As part of fixing issue OS#3075, we want to migrate support for encoding system information from osmo-bsc to libosmocore. This change ports osmo-bsc code for encoding SI rest octets. The conversion was a bit tricky in some places because some functions receive a 'struct gsm_bts' parameter in osmo-bsc. In this libosmocore version, such functions expect parameters which correspond to the individual fields of 'struct gsm_bts' which are used by these functions. Several structs from osmo-bsc's system_information.h are now also declared in libosmocore headers, with an added osmo_ prefix to avoid collisions with existing definitions in osmo-bsc. Some helpers were ported from osmo-bsc's system_information.c to libosmocore's gsm48_rest_octets.c. Contrary to osmo-bsc's implementation they are now only visible within this file. Unfortunately, this code ported from osmo-bsc lacks unit tests. Change-Id: I47888965ab11bba1186c21987f1365c9270abeab Related: OS#3075
2018-12-19add/clean big-endian packed structs (struct_endianess.py)Neels Hofmeyr1-0/+105
This is 1:1 the result of doing cd libosmocore ./contrib/struct_endianess.py git commit -a Running struct_endianess.py again should result in no changes. That means we could include such a check in the gerrit verification job now. Change-Id: Ia0b99d76932aeb03e93bd0c62d3bf025dec5f9d2
2017-07-01Add missing BSSGP cause valuesMax1-20/+57
Add values from 3GPP TS 48.018 Change-Id: Ie39a6c91a46d179392d861805a106743a07c6fb0
2017-06-23doxygen: unify use of \file across the boardNeels Hofmeyr3-9/+11
Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
2017-06-23doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr2-10/+10
Especially for short descriptions, it is annoying to have to type \brief for every single API doc. Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes the first sentence of an API doc as the brief description. Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
2017-05-09gprs: add value strings for NS PDU typeMax1-0/+2
Add value strings for Service Control PDUs according to 3GPP TS 48.016 §9 and use them for logging. Change-Id: I0ea3a45f35d68619d4cfa9735ef77abd9f9f0d58 Related: SYS#3610
2016-07-12Add EGPRS RLC/MAC headers from 3GPP TS 04.60Tom Tsou1-0/+208
For shared use by osmo-pcu and osmo-bts-trx. Change-Id: I500cdc87cd30faf36c8cd92d234642f809c8f2aa
2014-06-16include: Switch to #pragma once patternSylvain Munaut2-8/+2
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-06-30build: simplify headers management and remove recursionDiego Elio Pettenò1-3/+0
There is no real reason to keep the include directory a multi-level recursion, so instead declare everything within include (so that we can use proper nobase_ declarations) and be it. Please note that since we removed the sub-Makefile.am, ./configure will not create the directory structure for us on out-of-tree builds, so we have to make sure the directory we're generating to exists first. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
2012-06-17libosmogb: move files to proper location and fix build0.5.0Harald Welte3-0/+232