Commit Graph

8 Commits

Author SHA1 Message Date
Andreas Eversberg 6cc5301e4c LAPD: Indicate sequence error after indicating received data
First indicated the received data in an I frame, if possible. Then
indicate the sequence error using MDL-ERROR-INDICATION. This way the
data is delivered before the error is handled by BSC.

Also there is no reason to indicate sequence error on supervisory
frames.

See §8.7.4 of 3GPP TS 44.006.

Related: OS#5968
Change-Id: I535c18018bf0df4124a5e9618238028fa31be289
2023-11-27 16:25:53 +00:00
Andreas Eversberg bd2b897b72 LAPDm: Add a flag to enable suppression of subsequent REJ frame
This behaviour was default in earlier versions of LAPDm/LAPD. Because it
is only required for osmocom-bb, a flag is added to enable it there.

Related: OS#5969
Change-Id: I93994dbbd1fc2c9edb8f3015c6b18ecd0fce0565
2023-11-27 16:25:53 +00:00
Andreas Eversberg 49b7087360 LAPD: Add support for RTS based polling and T200
The T200 timer is started when the current frame is polled at
PH-READY-TO-SEND event.

A flag is used to enable this feature. The user of LAPD core must track
frame numbers to check the timeout condition. Then it must call the
external timeout function.

Related: OS#4074
Change-Id: Ib961b5a44911b99b0487641533301749c0286995
2023-11-27 16:25:53 +00:00
Andreas Eversberg 1bb0b99552 LAPD: Always update N(R) in pending TX frames if V(R) is incremented
The outcome of the update function is still used to indicate if an RR
frame must be sent or not. Only if there is no I frame in the TX queue,
RR frame must be sent.

Related: OS#4074
Change-Id: I71676c709878105bfd18b9370fecc61b92796a6f
2023-11-15 21:28:22 +00:00
Andreas Eversberg 913a783ff2 LAPD: Flush TX queue, if remote peer enters busy condition or rejects
In case of a busy condition or a reject (sequence error) from the remove
peer, the messages in the TX queue are obsolete and will be flushed.

Related: OS#4074
Change-Id: Iaaf9aaabb958ef889e252ddd0026ff82cfac981f
2023-11-15 21:28:22 +00:00
Andreas Eversberg cc63aae030 LAPD: Prepare lapd_send_i() for RTS support
When RTS is used, lapd_send_i() is called very frequently. (for every
PH-READY-TO-SEND primitive) The logging output can be suppressed in this
case.

As there is no complete lctx (lapd context) when calling lapd_send_i()
at RTS, take the stored lctx.

Related: OS#4074
Change-Id: I3109b7aa15c0f75f4a7458fc1c5d0ce633100f76
2023-11-15 21:28:22 +00:00
Andreas Eversberg 676b361fa7 LAPDm: Correctly count expiry of T200 during estabishment/release
After T200 expires N200+1 times, the link establishment or relase
fails. The counting must be performed prior check.

Related: OS#5970
Change-Id: Icf44e26420fc91312e7c8972a2f3ed475e42fc48
2023-10-23 09:07:28 +00:00
Harald Welte d55a209d1c create libosmoisdn sub-library
There are some parts of libosmogsm which are not really GSM specific,
but rather ISDN bits that were inherited by GSM.  This includes the
I.460 multiplex as well as the core LAPD protocol.

Let's move those bits to its own libosmoisdn library, before we add
more ISDN specific bits to the wrong place.

Backwards-compatibility is created by making libosmogsm depend on
libosmoisdn, and by providing wrapper include files for source
compatibility.

Change-Id: Ib1a6c762322fd5047be3188b1df22408ef06aa50
2023-01-21 22:41:57 +01:00