summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm/protocol
Commit message (Collapse)AuthorAgeFilesLines
* SGsAP protocol definitions (header + C file)Harald Welte2018-10-211-0/+169
| | | | Change-Id: Idddfc9b851eb4c2fa7dd661a9ce1b03a04883109
* gsm_08_58.h: Introduce struct abis_rsl_chan_nrPau Espin Pedrol2018-10-211-3/+32
| | | | | | | | | | | | 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
* gsm_08_58.h: Introduce struct abis_rsl_link_idPau Espin Pedrol2018-10-101-1/+24
| | | | | | | | | | | | 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
* gsm0808: add function to convert amr gsm0408 setings to gsm0808Philipp Maier2018-09-191-0/+14
| | | | | | | | | | | | | | | | Add a function to convert struct gsm48_multi_rate_conf, which holds the codec settings for AMR, to S0-S15 bit representation as defined in 3GPP TS 48.008 3.2.2.49 This resurrects change-id I4e656731b16621736c7a2f4e64d9ce63b1064e98 which was reverted in I9e0d405e303ed86d23703ca6362e958dddb2f861 due to gsm0808_test failing. The test failure is fixed by properly clearing the struct gsm48_multirate_cfg prior to running tests (add memset(0)). Change-Id: Ia782e21c206c15e840226d79b4209d13658ee916 Related: OS#3548
* Revert "gsm0808: add function to convert amr gsm0408 setings to gsm0808"Neels Hofmeyr2018-09-161-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2fd4fe6aa109c8df50baac465f0393a303a64dd2. As shown in https://jenkins.osmocom.org/jenkins/view/master/job/master-libosmocore/475/a2=default,a3=default,arch=amd64,label=osmocom-master-debian9/console This commit breaks gsm0808_test with: stderr: --- expout 2018-09-16 22:37:31.382280438 +0200 +++ /n/s/dev/make/libosmocore/tests/testsuite.dir/at-groups/21/stdout 2018-09-16 22:37:31.426281372 +0200 @@ -78,9 +78,9 @@ Input: m4_75= 0 smod= 0 m5_15= 0 spare= 0 - m5_90= 0 icmi= 0 + m5_90= 0 icmi= 1 m6_70= 0 nscb= 0 - m7_40= 0 ver= 0 + m7_40= 0 ver= 6 m7_95= 0 m10_2= 0 m12_2= 0 @@ -92,9 +92,9 @@ Input: m4_75= 1 smod= 0 m5_15= 0 spare= 0 - m5_90= 0 icmi= 0 + m5_90= 0 icmi= 1 m6_70= 0 nscb= 0 - m7_40= 0 ver= 0 + m7_40= 0 ver= 6 m7_95= 0 m10_2= 0 m12_2= 0 @@ -106,9 +106,9 @@ Input: m4_75= 0 smod= 0 m5_15= 1 spare= 0 - m5_90= 0 icmi= 0 + m5_90= 0 icmi= 1 [...] Change-Id: I9e0d405e303ed86d23703ca6362e958dddb2f861
* gsm0808: add function to convert amr gsm0408 setings to gsm0808Philipp Maier2018-09-141-0/+14
| | | | | | | | | Add a function to convert struct gsm48_multi_rate_conf, which holds the codec settings for AMR, to S0-S15 bit representation as defined in 3GPP TS 48.008 3.2.2.49 Change-Id: I4e656731b16621736c7a2f4e64d9ce63b1064e98 Related: OS#3548
* gsm0808: fix wrong codec defaults for OFR_AMR_WBPhilipp Maier2018-09-141-1/+1
| | | | | | | | | | | | | 3GPP TS 48.008 chapter 3.2.2.103 states that the configuration bits of OFR_AMR_WB are coded as follows: "S0, S2, S4 indicates the supported Codec Configurations. S1, S3, S5, S6, S7 are reserved and coded with zeroes." The current default setting of 0x3F violates this requirement. Lets set the "forbidden" settings zu zero and keep only the allowed ones. Change-Id: I4a481def59e9c98cfdcafc2b80c0ac7df0c14130
* Add RSPRO support to IPA and logging definitionsHarald Welte2018-09-031-0/+1
| | | | Change-Id: Iee79f5273f32cb9ce4bd7a984e7f0625542e776f
* Add CC_CAUSE value_string arrayKeith2018-09-021-0/+4
| | | | | | | Adds a value_string array for GSM 04.08 Call Control cause values Change-Id: I296f208581ce2550805f9d96e20f7319e1199023
* gsm0808: Add value_string for encryption algorithmsPau Espin Pedrol2018-07-121-0/+1
| | | | Change-Id: Iadf6460c438d02c53c2eaa9e42d51844ad28859a
* gsm_08_08: gsm0808_permitted_speech does not have value stringsPhilipp Maier2018-07-121-0/+4
| | | | | | | enum gsm0808_permitted_speech does not have any value strings. Lets add value strings to make debugging easier. Change-Id: I5b5612a5df2758b0137a34c17f7c8c2b3f07c806
* gsm_04_08: add function to get value stringPhilipp Maier2018-07-121-0/+2
| | | | | | | The value string table gsm48_chan_mode_names[] lacks a function to get the value string by a value. Lets add one. Change-Id: I0757bcc278c140e18249e35864338e19cdaa3cf7
* gsm_08_08.h: Add enum for LCLS config, control and statusHarald Welte2018-05-301-0/+28
| | | | Change-Id: I775aba59942fb6f34fb31b71d2f0f2ac5c3ae831
* Add enum gsm48_progress_descKeith2018-05-281-0/+12
| | | | | | | From GSM 04.08 Section 10.5.4.21 / Table 10.5.127 Change-Id: I6574e8808aaf39fad8026290aa2cc657734e18b5
* add support for gsm0808 HANDOVER REQUIRED messageNeels Hofmeyr2018-05-271-0/+22
| | | | | Related: OS#2283 (inter-BSC Handover, BSC side, MO) Change-Id: Idb6dc3eab0282158a17091d97ed77c1e2e3eb3c2
* Add enum gsm48_cause_coding from GSM 04.08 Section 10.5.4.11Keith2018-05-261-0/+8
| | | | Change-Id: I3d9c8e117ad19f70a3273650d7c0f8280d7bdb9a
* fix spellingThorsten Alteholz2018-05-151-2/+2
| | | | Change-Id: I3ac92217f83279d5f987ab34eb18b2e6cb1c7812
* gsm_08_58.h: introduce RSL_IE_ERIC_PAGING_GROUPAlexander Couzens2018-04-231-0/+1
| | | | | | | | 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
* gsm_08_58.h: Add Ericsson vendor-specific RSL message typesPau Espin Pedrol2018-04-211-0/+5
| | | | | | | 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
* add gsm0808_cell_{id,id_list}_name() and friendsNeels Hofmeyr2018-04-181-1/+2
| | | | | | | | | | | | | | | | | | | | Provide comprehensive API to obtain string representations of Cell Identifiers and -Lists. Change gsm0808_test.c to use the new functions (which simplifies the output a bit), so that we don't duplicate printing code in gsm0808_test.c, and so that the not-so-trivial printing code is also tested. In gsm0808_test, also test gsm0808_cell_id_list_name_buf()'s return value and truncation behavior. The rationale for gsm0808_cell_id_list_name(), i.e. printing an entire list of cell identifiers, is that even though the maximum is 127 elements, a list of more than a few elements is hardly ever expected in practice (even more than one element isn't actually expected: either "entire BSS" or a single LAC). It is thus useful to log the entire list when it shows up in Paging and Handover. Change-Id: I9b2106805422f96c5cc96ebb9178451355582df3
* protocol/gsm_04_08.h: drop incorrect GSM48_PDISC_USSDVadim Yanitskiy2018-04-171-1/+0
| | | | | | | | | | | | According to the GSM TS 04.07, section 11.2.3.1.1 "Protocol discriminator", bits 1 to 4 of the first octet of a standard L3 message contain the protocol discriminator IE. Meanwhile, the GSM48_PDISC_USSD represents value 0x11, i.e. 0b10001, that requires 5 bits, and moreover it is not documented anywhere. Let's drop it. Change-Id: Ic4eb8a6db4ff1dfd535bd0c84e7acf1908422f64
* add gsm48_reject_value_namesNeels Hofmeyr2018-04-091-0/+4
| | | | | | | | | | | | | | There seems to be quite some confusion / overlap between enum gsm48_reject_value, gsm48_gsm_cause and gsm48_gmm_cause. I tried to go with gsm48_gsm_cause_names[], but e.g. GSM48_REJECT_CONGESTION is not represented. Instead of attempting to mix/merge those enums, provide a separate value string array for enum gsm48_reject_value. This will be used by osmo-msc's libvlr (refactoring of FSM result handling), I27bf8d68737ff1f8dc6d11fb1eac3d391aab0cb1. Change-Id: I6661f139e68a498fb1bef10c266c2f064b72774a
* gsm_08_08: correct speech codec defaultsPhilipp Maier2018-03-231-4/+4
| | | | | | | | | | | | The speech codec defaults are not correct. The defaults recommended in 3GPP TS 28.062, Table 7.11.3.1.3-2 are limited by 3GPP TS 48.008, Section 3.2.2.103. Some defaults are actually reserved for future use. Also the endianess of the 16 bit values is reversed. - correct values so that they match the specification - transmit bytes in the correct endianess Change-Id: I6c3a34d39a375d71c4128fd38f06629e8b98b100
* support for more cell ID list types in libosmocoreStefan Sperling2018-03-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Introduce gsm0808_dec_cell_id_list2() with supports additional types of cell identifier lists. The new parsing routines are based on similar routines used by the paging code in osmo-bsc's osmo_bsc_bssap.c. Likewise, introduce gsm0808_enc_cell_id_list2() with support for the same additional types of cell identifier lists. The old API using struct gsm0808_cell_id_list is deprecated. The previous definition was insufficient because it assumed that all decoded cell ID types could be represented with a single uint16_t. It was declared in a GSM protocol header (gsm/protocol/gsm_08_08.h) despite being a host-side representation of data in an IE. The only user I am aware of is in osmo-msc, where this struct is used for one local variable. osmo-msc releases >= 1.1.0 make use of this API. While here, fix a small bug in a test: test_gsm0808_enc_dec_cell_id_list_bss() set the cell ID type to 'LAC' but obviously wants to use type 'BSS'. Change-Id: Ib7e754f538df0c83298a3c958b4e15a32fcb8abb Related: OS#2847
* Add helper functions for ACC bit flags in rach control IE.Stefan Sperling2018-02-131-2/+43
| | | | | | | | | | Add inline functions to manipulate and query ACC flag bits in the rach_control.t2 and rach_control.t3 octets. These function definitions also serve as documentation of the purpose of rach_control.t2/t3. Change-Id: I8f0a65c2980f86eb5c43f3bebe727f4d4d973163 Related: OS#2591
* Add GSM 04.08 type-of-number / numbering-plan-id definitionsHarald Welte2018-02-091-0/+22
| | | | Change-Id: Idd8d8a7a1c7f0b6cb9318e4f19ebadb415df2ed1
* gsm48_hdr_msg_type(): SS is in the same group as MM/CCHarald Welte2018-02-031-1/+1
| | | | Change-Id: I1ddadeacced9650885f454b81f3f0df531ea1e5d
* gsm48_hdr_msg_type[_r99]: Fix bit-masksHarald Welte2018-02-031-2/+2
| | | | | | | | | | TS 24.007 is quite clear: The upper two bits of the message type octet are *not* part of the message type in any of the L3 protocols which implement sequence numbers. it doesn't matter if it's R98 or R99, or whether the sequence number is 1bit or 2bits wide. Related: OS#2908 Change-Id: Iec875a77f5458322dfbef174f5abfc0e8c09d464
* gsm_04_08.h: Reduce T310 default to 30s.Harald Welte2018-01-271-1/+1
| | | | | | | | | 3GPP doesn't specify a network-side T310 default, but waiting for 180s (3 minutes!) for the next message after CALL CONFIRMED is clearly way too long and will just use radio resources for no good reason. Change-Id: Ia52f9358bc86b23c72af9c80e2fff5cb0004b57a Related: OS#2884
* gsm_04_08.h: Clearly annotate timers that don't have a 3GPP Default valueHarald Welte2018-01-271-7/+7
| | | | Change-Id: I44fffaec1f7c0d819aa2ebc85e97f19581fc689c
* gsm: add gsm0808_speech_codec_type_namesNeels Hofmeyr2018-01-121-0/+5
| | | | | | | Used for logging Speech Codec List entries in osmo-bsc, during handover decision. Change-Id: Ie6418d16db333188e9bcd2b32b7216f277ae8832
* Fix incorrect spec referenceMax2018-01-041-1/+1
| | | | | | RAI is defined in 3GPP TS 24.008 § 10.5.5.15 Change-Id: I484485d8c4c56b58dfecc1193bcdd48e61957422
* add osmo_imsi_str_valid() and osmo_msisdn_str_valid()Neels Hofmeyr2017-10-051-0/+1
| | | | | | | | | Add GSM23003_IMSI_MIN_DIGITS definition. Add regression test gsm23003_test.c to test the two new functions. Will be used by OsmoHLR to validate VTY and CTRL input. Change-Id: I1e94f5b0717b947d2a7a7d36bacdf04a75cb3522
* LC15: Add IPAC Directed Retry Enquiry data structureMinh-Quang Nguyen2017-07-141-0/+7
| | | | Change-Id: I8d2746eefe1f22dba5b19636ebc9444e458fc802
* IPAC manufacture-defined measurement pre-processing definitionsMinh-Quang Nguyen2017-07-141-0/+122
| | | | Change-Id: Ie1853697f4cff5ff98654fa1cae6c68e28a0076b
* gsm_04_08.h: Add struct for 9.1.13b GPRS suspension requestHarald Welte2017-07-101-0/+8
| | | | Change-Id: I90113044460a6c511ced14f588876c4280d1cac7
* gsm_04_08/sgsn: Add another IE for internal usage in the sgsnHolger Hans Peter Freyther2017-07-091-0/+1
| | | | | | | | | The PDP charging characteristics will be returned from the PDP selection code and be used in the SGSN. It is following the same approach as the QoS and PDP addr. It is a bit of a pity that we have to define this in a different project. Change-Id: I7815c5dfd7b7fb0ea78d816ebfb3abfbf0090afe
* doxygen: unify use of \file across the boardNeels Hofmeyr2017-06-2315-31/+46
| | | | | | | | | | | | | | | | | 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
* doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr2017-06-234-91/+91
| | | | | | | | | | 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
* gsm0808: add default speech codec configurationPhilipp Maier2017-06-221-0/+21
| | | | | | | | | In an AoIP scenario, the speech codec list field specifies the codecs used in the RTP interface. This patch adds a table with default codec configurations that match the codec configurations that are also used on the air interface. Change-Id: I9dc0165d76a022b2c1b7418bc3133407e61b7261
* gsm0808: fix AoIP speech codec element parser/generatorPhilipp Maier2017-06-221-2/+0
| | | | | | | | | | The implementation of the parser/generator for the speech codec information element slightly wrong, making it impossible to use it properly. (See also: 3GPP TS 48.008, 3.2.2.103) Change-Id: Idabb0f9620659557672e1c6b90c75481192e5c89
* gsm0808: add speech codec type constantsPhilipp Maier2017-06-211-0/+18
| | | | | | | | The codec type to be set in member type in struct gsm0808_speech_codec has its own coding scheme to reference the used codec types. This patch declares an enum with valid speech codec types. Change-Id: Icaa768071d4364e671bc7e6d48b82d1f07f93f93
* cosmetic: Add info about coresponding codecs to permitted speech constsPhilipp Maier2017-06-211-7/+8
| | | | | | | The constants in enum gsm0808_permitted_speech are not very expressive. Add comments indicating each constant's corresponding codec. Change-Id: I9734f7c261becffe38ffd41c304d006d08530c1a
* gsm0408: update bearer capability speech versionPhilipp Maier2017-06-211-1/+6
| | | | | | | | 3GPP TS 24.008 specifies two new speech versions for half rate and two new speech modes for full rate. This patch adds the relevant constants to enum gsm48_bcap_speech_ver in gsm_04_08.h Change-Id: Id2835384c855f924332d38f01c73bd1cfdb62549
* cosmetic: Add codec references to Speech Version IndicationPhilipp Maier2017-06-211-6/+6
| | | | | | | Add the information which GSM Speech codec version coresponds to which bearer capability speech version. Change-Id: Ic9493fea139420a52c32b17d00ac7d0b2bf86967
* Add header file with definitions for GSM TS 04.14 / 3GPP TS 44.014Harald Welte2017-06-121-0/+101
| | | | Change-Id: I1f4fc2761b55a4f83544c1c3793ab67fec9fc120
* Update L3 protocol discriminator definitionsHarald Welte2017-06-091-3/+5
| | | | Change-Id: Ia699d3494b93b7f88c36338e4960b35c42a29b9c
* gsm_04_08: Add missing GSM cause valueDaniel Willmann2017-05-121-0/+3
| | | | | | | | | | | | Table 10.5.157 in 10.5.6.6 of 3GPP TS 04.08 is badly formatted. The first value 0x19 "LLC or SNDCP failure" is in the same line as the heading and has not been included in the struct_value so far. Table 10.5.157 in 10.5.6.6 of 3GPP TS 24.008 fixes this formatting issue and also defines two more values 0x08 and 0x18 which are now added to the struct value_string. Change-Id: I5bcc52f739ff0677011d024448afcc2a54869638
* Add SW Description (de)marshallingMax2017-04-281-0/+16
| | | | | | | | | | | | | | | | * data structure representing 3GPP TS 52.021 §9.4.62 SW Description * function to serialize it into msgb * function to deserialize it from buffer * functions to extract/estimate buffer size for SW Description * test harness (partially taken from OpenBSC) There are several similar functions to deal with SW Description in OpenBSC, there's also need to use similar functionality in OsmoBTS. Hence it's better to put the code into common library with proper tests and documentation. Change-Id: Ib63b6b5e83b8914864fc7edd789f8958cdc993cd Related: OS#1614
* gsm0808: Add utils for Cell Identifier ListPhilipp Maier2017-04-081-0/+8
| | | | | | | | | | The planned support for true A over IP requires the encoding of the a Cell Identifier List element (see also BSS_MAP_MSG_PAGING). This commt adds encoding/decoding functionality and tests for the element mentioned above, however, it is not yet actively used. Change-Id: I625245dd1dd396fc2bc189e8cd2c444a33042528