Commit Graph

51 Commits

Author SHA1 Message Date
Pau Espin b0c2f75665 jenkins: Validate gsm 08.58 IEs are added to tlv_definition
It was recently found that several IEs which were added in the header
file were not actually added to the tlv_definition, and hence the tlv
parser failed to decode them. Let's make sure we don't foget to add new
IEs in the future.

Related: SYS#5915

Change-Id: Id8a679ca43eb0fcc4882780e9a95ec21c7f51972
2022-04-05 17:38:25 +02:00
Pau Espin 28c438845f include/: Adapt some headers to match contrib/struct_endianess.py format
This way the related files are not changed when running the script to
generate struct fields for big endian systems.

Change-Id: I830e0961331a73f8dceb1a5a1c879798541752fd
2021-12-22 13:57:48 +01:00
Oliver Smith 04bfb7165b treewide: remove FSF address
Remove the paragraph about writing to the Free Software Foundation's
mailing address. The FSF has changed addresses in the past, and may do
so again. In 2021 this is not useful, let's rather have a bit less
boilerplate at the start of source files.

Change-Id: I5050285e75cf120407a1d883e99b3c4bcae8ffd7
2021-12-14 12:44:03 +01:00
Vadim Yanitskiy 8db64ee810 gsm_08_58: extend struct abis_rsl_osmo_temp_ovp_acch_cap
This change adds new [bit-]fields in order to allow:

  * selectively enabling SACCH and/or FACCH,
  * setting the RxQual (BER) threshold.

Change-Id: Ia28293a12de0af71f55e701fb65c46e905dae217
Related: SYS#5319
2021-10-21 21:11:28 +03:00
Pau Espin 51933840ff gsm_08_58.h: Extend IPA Power Control Params IEs to pass C/I params
This commit adds new Osmocom specific IEs required to pass C/I related
Power Control Parameters osmo-bsc => osmo-bts to be used by the MS Power
Control Loop being implemented.

Related: SYS#4917
Change-Id: Iffef0611430ad6c90606149c398d80158633bbca
2021-09-03 15:32:50 +00:00
Philipp Maier e67edfdec2 gsm_08_58: fix sourcecode formatting
Change-Id: Ia58c25441911d6f872a8ec5664c71e56ad895f97
2021-08-31 19:54:28 +00:00
Philipp Maier 55ce87da69 gsm_08_58: fix sourcecode formatting
struct abis_rsl_osmo_rep_acch_cap has an indentation level that is too
deep.

Change-Id: Ie15feac75d1aa4fe5e5e237b14119addf09e5d77
2021-08-31 19:54:28 +00:00
Philipp Maier 0e44a7203c rsl: add new RSL IE to signal temporary overpower
To transfer the temporary overpower value from the BSC to the BTS, a new
RSL IE (RSL_IE_OSMO_TOP_ACCH_CAP) is added.

Change-Id: I31c5be4bceb9140d63ab8e2f197f0acc68699426
Related: SYS#5319
2021-08-31 19:54:28 +00:00
Pau Espin 9da16b5bbc cosmetic: Fix missing space in comment
Change-Id: If0940a2e1c66c3498f5e3d6ac641029290955175
2021-08-26 15:25:16 +02:00
Vadim Yanitskiy 442ff64ad4 gsm_08_58.h: add mask for Osmocom specific VAMOS C-bits
Applying and reverting this mask allows one to quickly convert
between VAMOS and non-VAMOS variants of Bm/Lm C-bits.

Change-Id: Ia0bd8695a3f12331b696fe69117189cdd48b584d
Related: SYS#4895, OS#4941, SYS#5315, OS#4940
2021-06-03 03:33:27 +00:00
Vadim Yanitskiy fc02ff459a gsm_08_58.h: add Osmocom specific Bm/Lm CBITs for VAMOS
Change-Id: If33c1695922d110c0d2c60d5c0136caf2587194e
Related: SYS#4895, OS#4941, SYS#5315, OS#4940
2021-05-26 21:18:11 +02:00
Neels Hofmeyr fef61cd2dd add RSL_CMOD_CRT_OSMO_TCH_VAMOS_Bm, RSL_CMOD_CRT_OSMO_TCH_VAMOS_Lm
These indicate VAMOS mode to osmo-bts during channel activation and
channel mode modification.

Change-Id: Ib4ea11c870683a58f0bbc8c9cd942faceba8c4d9
2021-05-19 18:36:12 +02:00
Neels Hofmeyr dd6f13636e add RSL_IE_OSMO_TRAINING_SEQUENCE
This IE is explained in the Abis manual in osmo-bts commit
Ie583bd5969fdb45f772af198033e58d7c4077306
http://git.osmocom.org/osmo-bts/commit/?id=823cd529649b667af20bfa4e383255a8ed5931f1

Change-Id: I573c26b1431ee789e42f6fa620947b003c384dc0
2021-05-19 18:34:33 +02:00
Vadim Yanitskiy e731a7da05 protocol/gsm_08_58.h: add asymmetric CSD data rates
The new values are present in 3GPP TS 48.058, V16.0.0 (2020-09).

Change-Id: Icf4c83fa443b8410f4362c119b0a85419036b9cd
2021-04-19 05:02:37 +02:00
Vadim Yanitskiy 307b201e8e protocol/gsm_08_58.h: add more 'Channel rate and type' values
The new values are present in 3GPP TS 48.058, V16.0.0 (2020-09).

Change-Id: I0aaea1549e6de01c374d6b46353312e6246078e0
2021-04-19 04:43:30 +02:00
Vadim Yanitskiy 99f6cd5f54 protocol/gsm_08_58.h: add RSL_CMOD_SP_{GSM4,GSM5,GSM6}
The new values are present in 3GPP TS 48.058, V16.0.0 (2020-09):

 * RSL_CMOD_SP_GSM4 - OFR AMR-WB or OHR AMR-WB,
 * RSL_CMOD_SP_GSM5 - FR AMR-WB,
 * RSL_CMOD_SP_GSM6 - OHR AMR.

Change-Id: I40eca759380c8895d7923b2b4259d37a50978160
2021-04-19 04:27:53 +02:00
Philipp Maier ca770ae77e gsm_08_58, gsm_44_004: add struct for l1 information
Libosmocore currently does not offer any structs to encode and decode
the l1 information on RSL level and the sacch l1 header on the air
interface level. Both structs are identical but the field order in the
first octet is reversed.

Change-Id: I23c1890b89d5a0574eb05dace9f64cc59d6f6df7
2021-02-16 21:42:04 +01:00
Vadim Yanitskiy 8f5844ed01 gsm_08_58: add flexible array member to 'struct ipac_preproc_ave_cfg'
Some averaging methods may have additional parameters, so let's
make it easier to access them for the API user.

Change-Id: I2f4ed56837dd479dbbd10c0a7df0ed7565d3946a
Related: SYS#4918
2021-01-03 22:23:11 +00:00
Vadim Yanitskiy 2060bbb4c1 gsm_08_58: fix wrong field order in 'struct ipac_preproc_pc_thresh'
Thanks to the CLI of nanoBTS, I noticed that upper and lower RxQual
thresholds are sent in wrong order.  Only the little-endian variant
needs to be fixed, the big-endian one looks good.

Change-Id: If6ab2377bae6742f871589b529a349498775552f
Related: SYS#4918
2020-12-19 17:33:52 +01:00
Vadim Yanitskiy c8158ecfc4 protocol/gsm_08_58.h: add Osmocom specific EWMA AVG algo
Change-Id: Ib436fd8b81afdb06c6d936f6839f847a705d00e2
Related: SYS#4918
2020-12-15 09:52:42 +00:00
Vadim Yanitskiy a346c45ceb protocol/gsm_08_58.h: add ip.access Power Control structures
Change-Id: I9430bcb79c269efb4f9527f565cf4e12e4444940
Related: SYS#4918
2020-12-15 09:52:42 +00:00
Philipp Maier 595908aab1 gsm_08_58: add rxqual field to RSL_IE_OSMO_REP_ACCH_CAP
In order to transfer an RXQUAL threshold to the BTS as well, the struct
that defines the contents of RSL_IE_OSMO_REP_ACCH_CAP needs to be
updated with a 3 bit field to contain the RXQUAL value.

Change-Id: I6dda239e9cd7033297bed1deb5eb1d9f87b8433f
Related: SYS#5114 OS#4796 OS#4794 OS#4795
2020-11-20 20:21:43 +00:00
Philipp Maier 439ddbe7a1 gsm_08_58: add struct for RSL_IE_OSMO_REP_ACCH_CAP
The recently added IE is used to transfer a bitfield, lets add a struct
that describes the bitfield. This makes the IE easier to use.

Change-Id: I326e66dae25acfab0b3fddc7278b39a8cbf7d385
Related: SYS#5114, OS#4796, OS#4794, OS#4795
2020-11-17 09:45:42 +00:00
Philipp Maier a15967ba98 gsm_08_58: add proprietary IE to signal Repeated ACCH Capability
3GPP TS 24.008, section 10.5.1.7 specifies a Repeated ACCH Capability
bit in the Classmark 3 IE. Unfortunately, there is no way specified how
the Repeated ACCH feature should be controlled on RSL level. Since it is
not unusual that BTS/BSC vendors occassionally add proprietary IEs to
different RSL messages we may pick this as a solution as well and add a
propritary RSL_IE_OSMO_REP_ACCH_CAP IE, so that we can enable repeated
FACCH/SACCH on the BTS side when we send RSL CHAN ACT or RSL CHAN MODE MODIFY
messages.

Change-Id: I61ea6bf54ea90bd69b73ea0f0f3dc19a4214207b
Related: OS#4796 SYS#5114
2020-11-09 23:41:10 +01:00
Philipp Maier 6d21448911 gsm_08_58: add missing RSL error cause codes
The define constants for the cause codes "BTS not equipped",
"remote transcoder failure" and "notification overflow" are missing.
Lets add them including value strings.

Change-Id: Ic3e936da00bd256bae03867887851f1a4e30e218
2020-07-31 21:23:49 +00:00
Harald Welte f945689cd9 gsm_08_58: Add vendor-specific Message Type for ETWS Primary Warning
Change-Id: I36fc2ffc22728887d1cb8768c7fcd9739a8ec0fc
Related: OS#4046, OS#4047
2019-09-05 11:16:56 +00:00
Harald Welte a8d7ebb6fb rsl: Add osmocom-specific extensions to RSL channel numbers for CBCH
We don't really *need* it in libosmocore as such, but the lack of
having all osmocom extensions listed here lead to using overlapping
definitions: 0x18 was used for dynamic PDCH on the Abis side, but also
for CBCH on the L1SAP side.  Let's list them all here to increase
visibility in case anyone wants to extend this further...

Related: OS#4027
Change-Id: I93e557358cf1c1b622f77f906959df7ca6d5cb12
2019-05-27 17:20:38 +02:00
Neels Hofmeyr b26003963e add/clean big-endian packed structs (struct_endianess.py)
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
2018-12-19 18:40:03 +00:00
Martin Hauke e63b887358 gsm/protocol/gsm_08_58.h: Fix typo
Fix a typo that prevents building on ppc64 (Power8, Big Endian).
Tested with gcc version: 8.2.1+r265487

/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include -I../include  -DBUILDING_LIBOSMOCORE -Wall -Wall  -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -DBUILDING_LIBOSMOCORE -Wall -c -o panic.lo panic.c
 In file included from ../include/osmocom/gsm/rsl.h:6,
                  from gsmtap_util.c:37:
 ../include/osmocom/gsm/protocol/gsm_08_58.h:60:4: error: expected specifier-qualifier-list before 'sapi'
     sapi:3;
    ^~~~

Change-Id: I4a40fc68cb6dfdfadfcc34213c4ecdabbbc356f2
2018-11-15 14:53:13 +01:00
Pau Espin fb97e72e52 gsm_08_58.h: Introduce struct abis_rsl_chan_nr
It will allow to make code handling chan_nr values more easier to read
and less prone to errors.
union is used to be able to get the full octet in
case we need to pass it somewhere else or encode it.

An extra union is used in struct abis_rsl_common_hdr and others to allow
using fields directly while keeping API compatibility.

Change-Id: Icd6822021207270a00106c50f8ca6b93c1250df9
2018-10-21 12:25:13 +00:00
Pau Espin 4290803d89 gsm_08_58.h: Introduce struct abis_rsl_link_id
It will allow to make code handling link_id values more easier to read
and less prone to errors.
union is used to be able to get the full octet in
case we need to pass it somewhere else or encode it.

An extra union is used in struct abis_rsl_common_hdr to allow using fields
directly while keeping API compatibility.

Change-Id: Ibd75a493bcfdf46c028ea466867d0c0d83d46343
2018-10-10 20:43:25 +00:00
Alexander Couzens 9f39d89c31 gsm_08_58.h: introduce RSL_IE_ERIC_PAGING_GROUP
Ericsson supports a RSL command to page and immediate assign
as single command. For paging a MS the BTS must know the
paging group.

Change-Id: I9194500e307ad69f8da07510bc965a7a5cd82a2a
2018-04-23 08:38:34 +00:00
Pau Espin 95959a8a86 gsm_08_58.h: Add Ericsson vendor-specific RSL message types
We are alredy doing the same way for ip.access and siemens ones, and
this way we avoid using the hardcoded value in osmo-bsc.

Change-Id: I7cb65f3ff1cfdbe4eee97b7545bcd13a38c72e25
2018-04-21 22:48:00 +02:00
Minh-Quang Nguyen adc28dc7da LC15: Add IPAC Directed Retry Enquiry data structure
Change-Id: I8d2746eefe1f22dba5b19636ebc9444e458fc802
2017-07-14 16:04:59 +02:00
Minh-Quang Nguyen 17a8748324 IPAC manufacture-defined measurement pre-processing definitions
Change-Id: Ie1853697f4cff5ff98654fa1cae6c68e28a0076b
2017-07-14 15:54:50 +02:00
Neels Hofmeyr 17518fe393 doxygen: unify use of \file across the board
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-23 00:18:23 +00:00
Neels Hofmeyr 87e4550585 doxygen: enable AUTOBRIEF, drop \brief
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-06-23 00:18:22 +00:00
Harald Welte 6e363e7e31 gsm_08_58.h: Add more Ericsson specific RSL IE Identifiers
Change-Id: Ib43948da956f23609b1b0995ecac0c796cc7c629
2016-11-16 16:58:52 +01:00
Philipp Maier 00b1539007 RSL: Add defines for ericsson systinfo SI13
Ericsson uses non standard information element tags when setting
up the SI13 system information configuration. This applies to
RSL_SYSTEM_INFO_13, which is normally 0x28, instead Ericsson
uses RSL_ERIC_SYSTEM_INFO_13, which is set to 0x0C. Furthermore,
Ericsson adds a propritary field called BCCH-Mapping, which is
tagged as 0xf2 (RSL_IE_ERIC_BCCH_MAPPING)

This patch addes these two information element tags in
gsm_08_58.h

Change-Id: Idc27352e286b9b8bbcbf0b31bdb676c3d13487a9
2016-11-16 10:08:54 +00:00
Neels Hofmeyr fd80f5a042 dyn TS: add definitions for dynamic TCH/F_TCH/H_PDCH
Add:
* GSM_PCHAN_TCH_F_TCH_H_PDCH
* NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH
* RSL_CHAN_OSMO_PDCH
* RSL_ACT_OSMO_PDCH

Related: OS#1776
Change-Id: Ib1a8b11f37af4686d00ac88beba38557aa29edc2
2016-07-23 15:32:55 +02:00
Neels Hofmeyr 15b96ff70c gsm_08_58.h: introduce RSL_CHAN_NR_1 constant
Using the RSL_CHAN_* constants, we sometimes need to add 1 to the chan bits
to indicate e.g. the second TCH/H channel.

RSL_CHAN_NR_1 marks this lowest channel bit that needs to be added.

The name is analogous to RSL_CHAN_NR_MASK.

Change-Id: Iea06432039d1cd23cc6b5acec308bb829b596d47
2016-07-23 15:25:18 +02:00
Neels Hofmeyr 9e57a5a697 some comments / fixed typos 2015-12-21 11:25:05 +01:00
Harald Welte fad5752ab5 RSL: Add enum + TLV definitions for ip.access style embedded IEs 2015-12-13 21:57:29 +01:00
Sylvain Munaut 12ba778afd include: Switch to #pragma once pattern
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-16 10:17:27 +02:00
Holger Hans Peter Freyther 0357e9b375 rsl: Add the 9.3.20 release mode enum to be used in OpenBSC 2012-12-06 11:58:33 +01:00
Harald Welte eed26116c9 GSM 08.58: Add channel modes for transparent data services 2012-08-24 15:36:12 +02:00
Sylvain Munaut dca7d2caaa doc: Fix the Doxygen section endings
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-04-18 21:53:23 +02:00
Harald Welte be145198df doxygen: document some more structure members for RSL 2011-08-18 11:45:18 +02:00
Harald Welte 8f2c7e5b2b RSL: add doxygen documentation 2011-08-17 18:52:21 +02:00
Harald Welte 3d73227b61 RSL: Fix typo 2011-06-25 21:39:01 +02:00