aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm/protocol
AgeCommit message (Collapse)AuthorFilesLines
2021-04-20RR: add missing Extended TSC Set IENeels Hofmeyr1-0/+1
Defined in 48.018 10.5.2.82. This will be used by Channel Mode Modify for VAMOS. Related: SYS#4895 SYS#5315 Change-Id: I9bad6e7121af43dfa9706635e58279ce672a4e14
2021-04-20RR: add VAMOS channel modesNeels Hofmeyr1-0/+4
Also add functions to convert between VAMOS and non-VAMOS speech modes. Related: SYS#4895 SYS#5315 Change-Id: Ie0ea592da5610ae70290106d004e549cf3212a89
2021-04-19protocol/gsm_08_58.h: add asymmetric CSD data ratesVadim Yanitskiy1-0/+7
The new values are present in 3GPP TS 48.058, V16.0.0 (2020-09). Change-Id: Icf4c83fa443b8410f4362c119b0a85419036b9cd
2021-04-19protocol/gsm_08_58.h: add more 'Channel rate and type' valuesVadim Yanitskiy1-4/+9
The new values are present in 3GPP TS 48.058, V16.0.0 (2020-09). Change-Id: I0aaea1549e6de01c374d6b46353312e6246078e0
2021-04-19protocol/gsm_08_58.h: add RSL_CMOD_SP_{GSM4,GSM5,GSM6}Vadim Yanitskiy1-0/+3
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-14gsm_08_08.h: Add extra field elements defined in other sectionsPau Espin Pedrol1-1/+4
The Signalling Field Element Coding list defined in 3.2.3 is used in "Old BSS to New BSS Information" and "New BSS to old BSS Information" IEs. However, the former IE (Old->New Info) defines 2 extra Field Elements in 3.2.2.58 (3GPP TS 48.008 version 16.0.0 Release 16) not present in 3.2.3. Related: SYS#5337 Change-Id: I4db3f7974887e4c798a30c5b51a19472ceeee27d
2021-02-16gsm_08_58, gsm_44_004: add struct for l1 informationPhilipp Maier2-0/+35
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-13gsm: Fix bitfield order in dtap_headerPau Espin Pedrol1-3/+3
This bitfield was added later and all osmocom code still uses the old field contain 1 byte "link_id". There's only one known user of the new bitfield which only uses it to log the SAPI name in osmocom, so no logical breakage is expected with this change (other than fixing a log line). While at it, fix a typo in comment describing related enum. Related: SYS#4909 Fixes: 392f607f2d42eb2839ccfc4c1b9e2c7cfaf3bcc2 Change-Id: I84866f03ee642aa7f1da273c93a16a38234cfa67
2021-02-08Fix struct bitfields on big endian systemsPau Espin Pedrol1-0/+80
Changes done by contrib/struct_endianess.py. Change-Id: Ia9cb1ef2ba2bfff9ef713c7d1cf388931dae1c46
2021-01-11Intoduce Packet Switch CGIPau Espin Pedrol1-0/+3
This structure is needed in order to identify a given cell within the BSS during RIM transactions. The naming was made up by myself since I couldn't find any naming reference for this kind of data (RAI + CI). Since LAI + CI = CGI, then RAI + CI = CGI-PS osmo_rai_name2 family of functions get a "2" suffix due to already existing functions handling struct struct gprs_ra_id in gsm48.h Change-Id: If48f412c32e8e5a3e604a78d12b74787a4786374
2021-01-03gsm_08_58: add flexible array member to 'struct ipac_preproc_ave_cfg'Vadim Yanitskiy1-0/+2
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
2020-12-19gsm_08_58: fix wrong field order in 'struct ipac_preproc_pc_thresh'Vadim Yanitskiy1-2/+2
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-15protocol/gsm_08_58.h: add Osmocom specific EWMA AVG algoVadim Yanitskiy1-1/+3
Change-Id: Ib436fd8b81afdb06c6d936f6839f847a705d00e2 Related: SYS#4918
2020-12-15protocol/gsm_08_58.h: add ip.access Power Control structuresVadim Yanitskiy1-0/+44
Change-Id: I9430bcb79c269efb4f9527f565cf4e12e4444940 Related: SYS#4918
2020-12-01gsm: Add enum for Network Feature Support IEPau Espin Pedrol1-0/+1
Change-Id: Ie409fd163b612bc3e2d7b8bf22d720705f0f6af1
2020-11-20gsm_08_58: add rxqual field to RSL_IE_OSMO_REP_ACCH_CAPPhilipp Maier1-2/+4
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-17gsm_08_58: add struct for RSL_IE_OSMO_REP_ACCH_CAPPhilipp Maier1-0/+16
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-12gsm_04_08: add parser for Mobile Station Classmark 3Philipp Maier1-0/+169
3GPP TS 24.008 section 10.5.1.7 describes a Mobile Station Classmark 3 IE, which is encoded as CSN.1 struct. This means that it can not be parsed by just casting a memory location to a struct pointer, so lets add a parser to parse the CM3 IE. This is fixed version of Ic8b2bfd00330235f5bed00771e421588abfaac1f, which got reverted because it used the keyword "class" as struct member, which lead into problems with c++ builds. This is now fixed. Change-Id: Id8732551b33616227609cd6fcf6c3133751a89eb Related: OS#4796 SYS#5114
2020-11-11Revert "gsm_04_08: add parser for Mobile Station Classmark 3"Harald Welte1-169/+0
This reverts commit a4939dc8461c0a2d8e67aa3bb95bfb73ad9225b7, which caused massive build failures in C++ programs like osmo-pcu - unsurprisingly, as it calls a struct member "class", which is a reserved keyword in C++. Change-Id: Ia43e56385e7b580f492c560aee8ff8b1e8a0e1d8
2020-11-10gsm_04_08: add parser for Mobile Station Classmark 3Philipp Maier1-0/+169
3GPP TS 24.008 section 10.5.1.7 describes a Mobile Station Classmark 3 IE, which is encoded as CSN.1 struct. This means that it can not be parsed by just casting a memory location to a struct pointer, so lets add a parser to parse the CM3 IE. Change-Id: Ic8b2bfd00330235f5bed00771e421588abfaac1f Related: OS#4796 SYS#5114
2020-11-09gsm_08_58: add proprietary IE to signal Repeated ACCH CapabilityPhilipp Maier1-0/+3
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-10-29gsm48: add missing RR cause value definitionsVadim Yanitskiy1-0/+3
3GPP TS 44.018 version 15.4.0 Release 15 (2019-04). Change-Id: If7187e005d65fd2bf067d258148281c5df0526ff
2020-10-07add BSSMAP-LE coding for Location ServicesNeels Hofmeyr1-0/+151
BSSMAP-LE: add Lb-interface messages between BSC and SMLC: - Reset - Reset Acknowledge - Perform Location Request, possibly containing BSSLAP TA Layer3 - Perform Location Response - Perform Location Abort - Connection Oriented Information containing any BSSLAP APDU Add encoding and decoding tests. Change-Id: I271e59b794bafc0a7ae0eabbf58918f6d7df431d
2020-10-07add BSSLAP coding for Location ServicesNeels Hofmeyr2-0/+183
BSSLAP: there are APDUs transferred in BSSMAP-LE Connection Oriented Information messages on Lb between BSC and SMLC. Add BSSLAP coding for these APDU messages: - TA Layer3 - TA Request - TA Response, possibly containing Location Estimate coded in GAD - Reject - Reset (for intra-BSS handover during TA Request) - Abort (for inter-BSS handover) Add encoding and decoding tests. Change-Id: I6409c4bcac402dc7626a3afce9081c59cd715fe8
2020-10-07add GAD coding for Location ServicesNeels Hofmeyr1-0/+172
GAD, Universal Geographical Area Description: - raw coding for all GAD elements. - SI-units encoding and decoding for Ellipsoid point with uncertainty circle, which I presume is the typical "at most N meters away from cell tower located at X,Y", which corresponds to the TA positioning currently being implemented. - other SI-units GAD element encodings are so far not implemented. Add encoding and decoding tests. In gsm/protocol/gsm_23_032.h are the raw coding structs as defined in 3GPP TS 23.032. In gsm/gad.h are structs carrying consistent units based on meters and degrees, for convenient / less error prone handling of GAD data, and for human readable representations of the GAD data. The separation of the two is desirable because OsmoBSC will receive GAD data from OsmoSMLC on the Lb interface, and pass on this data to the MSC via the A interface. It is better to pass the GAD data as-is without de/encoding. Change-Id: I7a9dd805a91b1ebb6353bde0cd169218acbf223c
2020-09-30gsm_12_21: add osmo_oml_nsvc_address_type for OML NM_ATT_OSMO_NS_LINK_CFGAlexander Couzens1-0/+7
The NM_ATT_OSMO_NS_LINK_CFG is used for NSVC configuration of osmocom based BTS to support IPv6 NSVCs. Change-Id: I9e279bb20940c66eea5196f281184cb4f8a5cc5f
2020-09-18ipaccess.h: Add more enum values and 'official' namesHarald Welte1-14/+23
Originally we only learned about the protocol from looking at hexdumps without any specification or the like. Due to a GPL request to ip.acecss, we actually do have an 'official' resource: The packet-ipa.c from their wireshark-1.0.6ipa27.tar.gz Let's use its contents to complete our definitions here. Change-Id: Ic1f2b32c72d162f31b422293d2a361d528443f01
2020-08-06gsm 12.21: add osmocom specific NM_ATT_OSMO_NS_LINK_CFGAlexander Couzens1-0/+1
The sysmobts uses the same OML attributes as IP.access. Because the IP.access attribute only supports IPv4 as NSVC configuration, add an own attribute. Change-Id: Ic261bc43a07fa741b97a9c6ec5a9ed6f5ecae588
2020-07-31gsm_08_58: add missing RSL error cause codesPhilipp Maier1-0/+3
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-05-17gsm0808: Implement helper functions for CONFUSION BSSMAP message decoding.Alexander Chemeris1-0/+13
Also add a test for an actual CONFUSION message parsing. Change-Id: If8afd2d096fb66c6c2f255a08fc1129de3d09cec
2020-05-15cosmetic: apply changes to match struct_endianess.py outputNeels Hofmeyr3-14/+8
gsm48_pag_resp and gsm48_service_request: omit comments in big endian part. dtap_header: better segment the substruct. gsm23041_msg_param_gsm: match up whitespace / comments. Rationale: the script is a good way to avoid bugs from manually composing the big endian parts (for example, it detected the missing endian.h include, fixed in I593cc5e8272469b570559206bb02b6e79797340b). However, it becomes cumbersome if it creates numerous edits in the source tree, which cause more time spent for whoever wanted to rather save time with it. So let's keep the code tree matching that struct's output. Change-Id: I7432f5337d6589262c31f5186dfd0ac32221c467
2020-05-15add missing endian.h in gsm_23_041.hNeels Hofmeyr1-0/+2
Change-Id: I593cc5e8272469b570559206bb02b6e79797340b
2020-05-12gsm_04_08.h: fix big endian structsNeels Hofmeyr1-238/+0
Affected: - struct gsm48_range_1024 - struct gsm48_range_512 - struct gsm48_range_256 - struct gsm48_range_128 In commit [1], the automatic little-to-big-endian compatibility by struct_endianness.py introduced doubled little/big endian struct listings by accident, resulting in a wrong big endian structure (due to double reversal in the original big endian part). Remove the old conditionals around the new automatic ones to fix the structs for big endian. [1] Ia0b99d76932aeb03e93bd0c62d3bf025dec5f9d2 Change-Id: Iaccdd4a204841209f5eb50f336b30962ff00da0b
2020-05-02gsm_29_118.h: Fix compilation with gcc-10Harald Welte1-1/+1
this causes problems when compiling user applications /usr/bin/ld: ../../src/libvlr/libvlr.a(vlr_lu_fsm.o):/usr/local/include/osmocom/gsm/protocol/gsm_29_118.h:184: multiple definition of `sgsap_ie_tlvdef'; msc_main.o:/usr/local/include/osmocom/gsm/protocol/gsm_29_118.h:184: first defined here Change-Id: Iaa1d36c7a9bb64aa84ee85fa3e40f6b3560fe693
2019-11-27Introduce fields related to DTAP DLCIPau Espin Pedrol1-1/+28
Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561
2019-11-04gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uint32_tPau Espin Pedrol1-5/+28
New fields are put inside a union to keep backward compatibility with potential older users of the struct. Change-Id: I235635800c0de47b1e2b9ec9c7191418f6003554
2019-11-04gsm: Fix compilation error under some compilersPau Espin Pedrol1-1/+2
Some compilers don't like declaration of enums in header files like we do sometimes for structs: enum gsm_band; void foobar(enum gsm_band band); triggers: error: use of enum 'gsm_band' without previous declaration Fixes: b99f4ca2d8517d99cdf8aa183dbfda7b233bb781 Related: OS#4244 Change-Id: I6c2102c763f565bbe3c8dd7e5b4e04c4a45fff67
2019-11-03gsm_04_08.h: Introduce API osmo_gsm48_rfpowercap2powerclass()Pau Espin Pedrol1-1/+2
Related: OS#4244 Change-Id: I32e9cc1c2397b44f0d48db2acdf782a821365b63
2019-11-01cosmetic: gsm_04_08.h: Fix trailing whitespacePau Espin Pedrol1-3/+3
Change-Id: I4b34dbd5f0176d1d8aa8cc96f642ed35d4214b7e
2019-10-04API doc tweaks (mncc.h, gsm_08_08.h)Neels Hofmeyr1-1/+3
Change-Id: I9b4c7e737c83c65e358496e4540c14be5abc5474
2019-09-05gsm_08_58: Add vendor-specific Message Type for ETWS Primary WarningHarald Welte1-0/+2
Change-Id: I36fc2ffc22728887d1cb8768c7fcd9739a8ec0fc Related: OS#4046, OS#4047
2019-07-20Add Cell Broadcast related definitions from 3GPP TS 23.041Harald Welte1-0/+89
Change-Id: I1e2c62cb9047648907c91b99f764f6caba8f4493
2019-07-20CBSP (Cell Broadcast Service Protocol; 3GPP TS 48.049) supportHarald Welte1-0/+128
This introduces definitions as well as a parser+encoder for the Cell Broadcast Service Protocol (CBSP) as specified in 3GPP TS 48.049. CBSP is used on the interface between CBC and BSC. Related: OS#3537 Change-Id: I5b7ae08f67e415967b60ac4b824db9e22ca00935
2019-06-17add define for magic tmsi constantEric Wild1-0/+1
Change-Id: I52b9f6b5f3e96d85a390ba2af21d7814df8aaeec
2019-06-12protocol/gsm_04_08.h: do not check if unsigned is positiveVadim Yanitskiy1-3/+3
Change-Id: I6b486b52a3733d5fd5e8ba18acbc9374e2e8bd7e
2019-05-27rsl: Add osmocom-specific extensions to RSL channel numbers for CBCHHarald Welte1-0/+4
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-24protocol/gsm_12_21.h: fix copy-pasted struct descriptionVadim Yanitskiy1-1/+1
Change-Id: Ic6d32c886f6f8f859e382d48f9e1b509000db9ba
2019-05-18Revert "Change GSM48_PDISC_* to enum type"Harald Welte1-20/+18
This reverts commit ece1d8509d5c5af7a60ab5e1a5dddade1b181dc9 which causes build failures due to compile warnings everywhere. Change-Id: Ic131439ea206a0b0f57968ef701667da73711b51
2019-05-17Change GSM48_PDISC_* to enum typeMax1-18/+20
An enum is more clear than an int and #defines for passing around, also in case you have a switch () statement, the compiler will issue warnings for unhandled cases. Change-Id: Icbbe8786a776081d7643193f154e6270224399e6
2019-05-15gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITSOliver Smith1-0/+3
Add the constant, so it can be used in create-subscriber-on-demand related patches. ITU-T Rec. E.164 6.1 states that maximum international number length should be 15. I did not find a source for a minimum length, but I've added the constant and set it to 1 for consistency (based on the existing osmo_msisdn_str_valid() function). Related: OS#2542 Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1