aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gprs
AgeCommit message (Collapse)AuthorFilesLines
2015-03-18bssgp: Handle BSSGP STATUS messagesJacob Erlbeck1-0/+2
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
2014-10-26Change license of libosmogb from AGPLv3+ to GPLv2+Harald Welte1-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.
2014-10-09gprs-ns: Let gprs_nsvc_reset return a valueJacob Erlbeck1-1/+1
Currently gprs_nsvc_reset does not return any value. This patch changes the function to return an integer, where a value less than zero indicates an error. The value is taken from the gprs_ns_tx_reset function. In case of failure, an error message is logged. Sponsored-by: On-Waves ehf
2014-06-16include: Switch to #pragma once patternSylvain Munaut7-26/+7
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-24gb: Fix NS RESET/RESET_ACK abnormal casesJacob Erlbeck1-0/+5
This changes the implementations for the reception of RESET and RESET_ACK to be compatible with 3GPP TS 08.16, 7.3.1: - Just send a RESET_ACK with correct values back to the SGSN when a RESET with an invalid NSVCI or NSEI has been received. - Check RESET_ACK for matching NSEI and NSVCI. - Ignore unexpected RESET_ACKs. In addition, use RESET_ACK from a BSS to update the BSS source address based on the NSVCI to be tolerant with changing UDP source addresses/ports. Sponsored-by: On-Waves ehf
2013-10-15gb: Fix gprs_ns_rx_reset to not create NS-VC duplicatesJacob Erlbeck1-0/+3
Under special circumstances (see below) receiving a NS-RESET leads to duplicated NS-VC entries. This happens when the source port of a NS-VC changes to a new one that has already been used by another NS-VC. This patch changes gprs_ns_rx_reset() to check for this case and to use the existing NS-VC object. The NS-VC object that was associated with the source address before is detached from this source but kept in the NS-VC list so that it can be reattached when a correspondent NS-RESET is received later on. Meanwhile it will have a cleared link layer address which will not match a real link info. A new counter NS_CTR_REPLACED is incremented each time when the NS-VC object is replacing another one. A new signal S_NS_REPLACED is added which gets dispatched in this case, too. Another new counter NS_CTR_NSEI_CHG is incremented each time when the NSEI of a NS-VC object (with fixed NSVCI) changes. Ticket: OW#874 Sponsored-by: On-Waves ehf
2013-10-15gb: Add functions to access the LL part of the NS-VC objectsJacob Erlbeck1-1/+7
Adds the functions gprs_ns_ll_copy() and gprs_ns_ll_clear(). Renames gprs_ns_format_peer() to gprs_ns_ll_str(). All of these functions uniformly access the link layer part within the NS-VC objects. Sponsored-by: On-Waves ehf
2013-10-11tests/gb: Show invoked signals in test outputJacob Erlbeck1-0/+3
Register an osmo signal handler to print a short notice about every SS_L_NS signal that is generated while processing the tests. Sponsored-by: On-Waves ehf
2013-10-08gb: Separate nsvc creation from NS message processingJacob Erlbeck1-0/+9
This patch refactors gprs_ns_rcvmsg() by moving the parts relevant to the NS messages into the new functions gprs_ns_vc_create() (nsvc object creation) and gprs_ns_process_msg() (main NS automaton). These do not contain code that directly depends on the link layer (they call other functions that still do). This reduces the gprs_ns_rcvmsg() function to calling these two functions and optionally setting up the link layer specific fields of the nsvc. Sponsored-by: On-Waves ehf
2013-10-08msgb: Add may_alias attribute to struct libgb_msgb_cbJacob Erlbeck1-1/+1
This explicitely allows aliasing of this struct to avoid the warning shown below. Note, that this warning isn't show when '-fno-strict-aliasing' is used. Addresses: gb/gprs_ns_test.c:85:54: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
2013-07-06libosmogb: Add function to close NS instance without destroying itHolger Hans Peter Freyther1-1/+4
2013-03-25gprs_ns: Allow to set the DSCP for the UDP socket.Holger Hans Peter Freyther1-0/+1
Allow to tag the NS service with a custom DSCP.
2012-09-30Fix: Correcting bssgp_tx_fc_bvc, bssgp_tx_fc_ms, bssgp_tx_ul_udAndreas Eversberg1-2/+2
2012-09-10Gb: Add functions for sending flow control messages from BSS sideHarald Welte1-0/+8
2012-09-10Gb: Add header file for BSS-side BSSGP functionsHarald Welte1-0/+67
.. not sure how we could have missed that so far.
2012-09-07BSSGP: make bvc_ctx->fc a dynamic talloc allocationHarald Welte1-1/+1
this ensures that we can talloc the flow-control queue entries as siblings off the bvc_ctx.
2012-09-07BSSGP flow-control: various fixesHarald Welte1-5/+13
* add more comments on units of struct members * make sure to parsre FC-BVC message correctly * add error message in case user passes PDU larger than bucket size * add new function to initialize flow control struct
2012-09-07libosmogb: Port BSSGP flow control from openbsc/laforge/bssgp_fc branchHarald Welte1-0/+37
This code is supposed to implement the BSSGP flow control algorithm, both for the per-BSS and for the per-MS flow control. The code currently has no test cases, they will come in a separate commit.
2012-08-03gb: Make suspend_ref a plain uint8_t instead of a uint8_t*Holger Hans Peter Freyther1-1/+1
The OpenSUSE build is not happy about the uint8_t to uint8_t* assignment. As the suspend_ref is a mandatory field we can make it a plain uint8_t. Increase the LIBVERSION as the ABI has changed.
2012-06-30build: simplify headers management and remove recursionDiego Elio Pettenò2-8/+0
There is no real reason to keep the include directory a multi-level recursion, so instead declare everything within include (so that we can use proper nobase_ declarations) and be it. Please note that since we removed the sub-Makefile.am, ./configure will not create the directory structure for us on out-of-tree builds, so we have to make sure the directory we're generating to exists first. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
2012-06-17libosmogb: move files to proper location and fix build0.5.0Harald Welte8-0/+635