summaryrefslogtreecommitdiffstats
path: root/tests/gb/gprs_bssgp_test.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix/Update copyright notices; Add SPDX annotationHarald Welte2017-11-131-1/+3
| | | | | | | | 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
* gb: Add bssgp_msgb_copy functionJacob Erlbeck2016-02-221-0/+34
| | | | | | | | | | | | | | This function originates from openbsc/src/gprs but is just specific to BSSGP/Gb on the same level like bssgp_msgb_alloc. This commit puts the former gprs_msgb_copy function beside bssgp_msgb_alloc. Renamed function: gprs_msgb_copy -> bssgp_msgb_copy Sponsored-by: On-Waves ehf
* test: Fix compiler warnings on 64bit systemsHolger Hans Peter Freyther2015-11-091-2/+2
| | | | | | Use %td to print ptrdiff_t use %zu to print size_t, include time.h on FreeBSD. Some more compiler warnings are left but they require more thinking.
* bssgp/test: Add missing START/END printfsJacob Erlbeck2015-06-191-1/+6
| | | | Sponsored-by: On-Waves ehf
* bssgp: Fix bssgp_tx_fc_bvc parameter typeJacob Erlbeck2015-05-061-0/+75
| | | | | | | | | | | | 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: Ensure non-NULL bctx before calling bssgp_rx_ptp (Coverity)Jacob Erlbeck2015-04-071-0/+17
| | | | | | | | | | | | | | Currently bssgp_rx_ptp might be called with bctx being NULL, when the NS BVCI is neither BVCI_SIGNALLING nor BVCI_PTM, but the message is a BVC_RESET or it contains an BVCI IE != BVCI_SIGNALLING where the BVCI is not known. This patch ensures that bssgp_rx_ptp will only be called with a non-NULL bctx. A log message will be issued, if the bctx is NULL when this was not expected. Fixes: Coverity CID 1040674 Sponsored-by: On-Waves ehf
* bssgp: Handle BSSGP STATUS messagesJacob Erlbeck2015-03-181-0/+35
| | | | | | | | | | | | | | | | | | | Currently incoming BSSGP STATUS messages are just logged and no other action is taken. This makes it impossible for higher layers to react to failures which are indicated by corresponding STATUS messages unless a timeout is triggered as a result of that failure later on. This commit adds a bssgp_rx_status() function and calls it on incoming STATUS messages. That function logs a message, increments the new BSSGP_CTR_STATUS counter if the bctx context exists and invokes an NM_STATUS status indication. The latter will allow the application to handle failures immediately. Since all STATUS messages should be handled, the function is already called in bssgp_rcvmsg and the message is no longer handled in (and will not reach) bssgp_rx_sign and bssgp_rx_ptp. Ticket: OW#1414 Sponsored-by: On-Waves ehf
* bssgp: Include sys/socket.h for AF_INET on FreeBSDHolger Hans Peter Freyther2014-10-251-0/+1
|
* gprs: Don't discard SUSPEND/RESUME in bssgp_rcvmsgJacob Erlbeck2014-10-231-2/+2
| | | | | | | | | | | | | | | Currently sending SUSPEND/RESUME messages to this function (like it is done in the osmo-sgsn) results in STATUS messages complaining about an unknown BVCI. The reason is, that these messages rely on a TLLI/RAI pair to identify the context and do not contain an explicit BVCI. This patch modifies bssgp_rcvmsg() to only complain about and unknown BVCI if one is given but a matching context is not found (except for RESET messages). The ctx argument is removed from the functions handling SUSPEND and RESUME since it will always be NULL then. Sponsored-by: On-Waves ehf
* gprs/test: Add BSSGP testsJacob Erlbeck2014-10-231-0/+151
This patch adds a test suite for the BSSGP protocol. The first (and only) test checks the handling of BSSGP SUSPEND/RESUME. Sponsored-by: On-Waves ehf