summaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_bssgp_bss.c
Commit message (Collapse)AuthorAgeFilesLines
* Use existing function for TLLI encodingMax2018-01-081-3/+1
| | | | | | Use bssgp_msgb_tlli_put() instead of copy-pasted code. Change-Id: I06d60566a19dcae701f8648c19fbd8db6d586f77
* Add function to properly encode RAIMax2018-01-081-8/+10
| | | | | | | | | | | | | Add gsm48_encode_ra() which takes appropriate struct as [out] parameter instead of generic buffer. Using uint8_t buffer instead of proper struct type prooved to be error-prone - see Coverity CID57877, CID57876. Old gsm48_construct_ra() is made into tiny wrapper around new function. The test output is adjusted because of the change in function return value which was constant and hence ignored anyway. Related: OS#1640 Change-Id: I31f9605277f4945f207c2c44ff82e62399f8db74
* Fix/Update copyright notices; Add SPDX annotationHarald Welte2017-11-131-0/+2
| | | | | | | | Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
* doxygen: unify use of \file across the boardNeels Hofmeyr2017-06-231-3/+4
| | | | | | | | | | | | | | | | | 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-231-14/+14
| | | | | | | | | | 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
* libosmogb: Convert to use new endian conversion helpersHarald Welte2017-05-151-23/+21
| | | | Change-Id: I5ed17702cd9487e1cab6bae39802aa11fb6a37b0
* bssgp_rx_paging(): Fix parsing of P-TMSI IE in Paging messageHarald Welte2016-11-111-1/+2
| | | | | | | | | | | | | | | | | | | | | This was actually discovered by the following compiler warning in gcc-6.2.0: CC gprs_bssgp_bss.lo gprs_bssgp_bss.c: In function ‘bssgp_rx_paging’: gprs_bssgp_bss.c:544:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (TLVP_PRESENT(&tp, BSSGP_IE_TMSI) && ^~ gprs_bssgp_bss.c:548:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ *(pinfo->ptmsi) = ntohl(*(uint32_t *) ^ This is an actual bug. If we recevied a BSSGP Paging Request without P-TMSI, we might crash or report some random memory as P-TMSI to the caller in the output data structure. Change-Id: Ib4f307827cd7cccc91c1415a6fb5428d7cf8416d
* Improve BSSGP debug outputMax2016-03-171-3/+3
| | | | | Print string representation of Cause IE and PDU type instead of numerical value.
* bssgp: Fix IMSI buffer size (Coverity)Jacob Erlbeck2015-06-191-2/+4
| | | | | | | | | | | | | Currently the size of the IMSI pointer is used instead of the size of the talloc'ed buffer. This commit changes the call to gsm48_mi_to_string to use the same value that has been used with talloc_zero_size(). The length is changed to 17 since that value is used for GSM_IMSI_LENGTH in openbsc. Fixes: Coverity CID 1040663 Sponsored-by: On-Waves ehf
* bssgp: Fix bssgp_tx_fc_bvc parameter typeJacob Erlbeck2015-05-061-1/+1
| | | | | | | | | | | | Currently large values for Bmax default MS get sliced since a uint16_t is used as the type of the corresponding parameter of bssgp_tx_fc_bvc. GSM 48.018, 11.3.2 which in turn refers to 11.3.5 specifies a maximum of 6MB (0xffff * 100). This commit changes the type to uint32_t to cover the full value range. Sponsored-by: On-Waves ehf
* bssgp: Fix encoding of BVC_FLOW_CONTROLJacob Erlbeck2015-04-291-5/+5
| | | | | | | | | Currently all 2 byte IE of the message are transmitted in the little endian byte ordering. This commit adds htons to the encoding expressions. Sponsored-by: On-Waves ehf
* Change license of libosmogb from AGPLv3+ to GPLv2+Harald Welte2014-10-261-4/+4
| | | | | | | | | | | The copyright holders Harald Welte, Holger Freyther, Andreas Eversberg and sysmocom - s.f.m.c. GmbH (represented by Holger and Harald) agree that the license of libosmogb should be GPLv2+ and not AGPLv3+. The reason the source files stated AGPLv3+ is due to the history, as they were moved from OpenBSC to libosmocore at the time we needed to use them from osmo-pcu. It was an oversight back then to not re-license them accordingly.
* Doc: Adding new parameter descriptions in gprs_bssgp_bss.cAndreas Eversberg2012-09-301-1/+9
|
* Fix: Correcting bssgp_tx_fc_bvc, bssgp_tx_fc_ms, bssgp_tx_ul_udAndreas Eversberg2012-09-301-9/+26
|
* Gb: Add functions for sending flow control messages from BSS sideHarald Welte2012-09-101-0/+105
|
* Gb: Add header file for BSS-side BSSGP functionsHarald Welte2012-09-101-0/+1
| | | | .. not sure how we could have missed that so far.
* Fix encoding of BSSGP_IE_NUM_OCT_AFF in bssgp_tx_llc_discarded()Andreas Eversberg2012-07-211-1/+1
| | | | | | This is a 24bit integer value, and thus we need to encode the three least significant octets of the network-byte-order 32bit value, not the three most significant octets.
* libosmogb: move files to proper location and fix buildHarald Welte2012-06-171-0/+425