aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/lapd.c
AgeCommit message (Collapse)AuthorFilesLines
2021-12-14treewide: remove FSF address2021q4Oliver Smith1-4/+0
Remove the paragraph about writing to the Free Software Foundation's mailing address. The FSF has changed addresses in the past, and may do so again. In 2021 this is not useful, let's rather have a bit less boilerplate at the start of source files. Change-Id: I0ad20cdf1e571c1a15f6e67d46e07155a6a02520
2021-11-17lapd: don't add parenthesis around datalink nameHarald Welte1-5/+5
The name [printing] works like this: * libosmo-abis:lapd tells libosmogsm:lapd_core a name for each data link * libosmgsm:lapd_core assumes this name has no paranthesis and puts additional parenthesis around it in macros like LOGDL However, current libosmo-abis:lapd [before this patch] adds its own set of parenthesis, causing all ISDN-LAPD related log messages generated by libosmgsm:lapd_core to have double-parenthesis. So we have to remove the parenthesis from lapd_datalink.name and lapd_instance.name to fix the log lines printed in libosmocore. This in turn means we have to add parenthesis to some log statements here in libosmo-abis:lapd. Why can't we instead modify libosmogsm:lapd_core to drop parenthesis there? Becaus it is also used by LAPDm code in osmo-bts, and those two get it right :) Change-Id: I688cf2a73a8c31cb3cf66ec005d02a14de197008 Related: Ie6742843fff809edffcac24c4dce4edf66bc71be Related: OS#1938
2020-07-15lapd: Use lapd_dl_init2 instead of deprecated lapd_dl_initPau Espin Pedrol1-2/+1
Change-Id: If25957d10bf9e32d2fe601111a9c1311aee21094
2020-07-15cosmetic: lapd: Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: I7a6af2f417f6f924a3f27cfa12462158f2c2a1c6
2020-07-03input/lapd.c: Enlarge message buffers for DL-SAP primitivesHarald Welte1-1/+1
The DL-SAP primitive msgbs are currently allocated to only have headroom but no tailroom. Let's change that Change-Id: Ia476c8a2f70e6579be53230427923885a573f801 Related: OS#4644
2020-07-03lapd: Replace magic numbers with #definesHarald Welte1-3/+6
Related: OS#4644 Change-Id: I2971fb5bb27a7024abac7e2a4414eaf61f27ccb5
2020-06-09lapd: Always print context information when loggingHarald Welte1-39/+55
Historically, OpenBSC has primarily been used with setups that have a single E1 based BTS connected. This meant that an error message on the E1 LAPD implicitly has to be related to that single BTS. However, in more comprehensive setups, there may be many BTSs on many E1 lines with many signaling slots. At this point, it's important to know which line/timeslot/tei/sapi a given log message relates to. This patch introduces related log context. Change-Id: Ib81a749ae24013b17caaf5fd64ccd9acbbc3ce08 Requires: libosmocore.git Change-Id Ie6742843fff809edffcac24c4dce4edf66bc71be Related: OS#1938
2017-11-13Add SPDX-License-Identifier to all source filesHarald Welte1-0/+2
Change-Id: I9f2bc8c5d8a2c0bb0dd6caa4de5e2cb11be210e7
2017-03-15lapd: log pointer addressesPhilipp Maier1-2/+7
Add pointer address output to the sap alloc/free functions in order to track the objects later in the debug output (we have three of them) Change-Id: I9b961d5e36967cfd953551b24696849541257a1c
2017-03-14lapd: Reduce N200 (SABM retransmission count)Philipp Maier1-2/+2
N200, which controls the maxium number of LAPD retransmissions, is set to 300. This will cause a long waiting time until LAPD detects a failed link. This commit reduces the retransmission count to 50 in order to get a faster link re-establishment in case of link failure. This patch will only affect the ericsson LAPD profile, all other lapd profiles will not be touched. Change-Id: I4f56f9d00520adc0c0a4497547762cd054030867
2016-11-02lapd: adding support for ericsson's lapd dialectPhilipp1-0/+28
Ericsson's RBS2111-BTS (and similar) implements a lapdm dialect which uses a link establishment method that differs from the standard. While the BSC is transmitting sabm frames on one specific timeslot, the BTS will periodically scan through all timeslots to check for incoming sabm frames. When the BTS detcts the sabm fames on one of the timeslots it will stay there and continue to commence the link establishment. The described procedure requires a slightly modified lapd profile, the t200 retransmission timeout has to be configured to exactly 300 msek. Otherwise the link establishment will fail. Since the BTS will switch from timeslot to timeslot most of the sabm frames will not be seen by the BTS, so the maximum retransmission has to be increased. This patch suggests a maximum retry count of 300, which is an educated guess and has worked fine during our tests. Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5
2013-03-09lapd: Do not override t203_sec initialization.Holger Hans Peter Freyther1-1/+1
This was spotted by clang3.3 and got broken in git revision f42280b6a235163ab935abc9fd36b60716d7a460 when moving to the C99 initializer. Warning: input/lapd.c:106:30: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] .t203_sec = 20, .t203_sec = 0, ^ input/lapd.c:106:14: note: previous initialization is here .t203_sec = 20, .t203_sec = 0, ^~ 1 warning generated.
2012-08-30input: add generic PCAP interface for LAPDPablo Neira Ayuso1-0/+12
This patch allows you to create PCAP traces between the BSC and BTS including the LAPD frames. Useful for debugging communication issues. So far, it was only possible to create layer 3 traces containing OML/RSL. LAPD traces can be also interesting to debug communication issues between the BSC and the BTS. To enable PCAP of LAPD, you only have to invoke: li->pcap_fd = osmo_pcap_lapd_open("/tmp/file.pcap", 0600); By default, li->pcap_fd is set to -1 which means disabled. openBSC needs a patch to replace all usage of e1_set_pcap_fd by osmo_pcap_lapd_open.
2012-08-30lapd: use C99 structure initialization for profile templatesPablo Neira Ayuso1-27/+27
2011-10-01Length check of LAPD messages to prevent overflows on corrupt framesAndreas Eversberg1-7/+49
2011-09-30Fixed missing T203 in profilesAndreas Eversberg1-0/+3
2011-09-29Addition to last commit 2f5a3714075882ac946536709ac581453b6ad52aAndreas Eversberg1-11/+13
2011-09-29LAPD profiles are globally defined structuresAndreas Eversberg1-34/+49
The pre-defined structures can be used as a profile, as well as own defined or modified versions of them.
2011-09-29Replaced LAPD implementation with new LAPD core of libosmogsmAndreas Eversberg1-491/+344
The core functionality of input/lapd.c is removed. Now it uses lapd_core.c of libosmogsm. The stucture of lapd_instance and SAP (SAPI/TEI handling) is kept, as well as interfaceing and header transcoding. The former implementation of datalink is completely replaced, except for the minimal TEI manager.. Currently it supports 3 modes: - ABIS (BS11/Ericsson/Nokia) - ISDN (Not used yet) - ASAT (A interface for satellite) all these modes can run as NETWORK or USER.
2011-08-26lapd: stop timers in lapd_instance_free()Harald Welte1-0/+11
2011-08-24LAPD: Add function to release/free a LAPD instanceHarald Welte1-0/+7
2011-08-16LAPD: Propagate lapd_receive() errors to the E1 driverPablo Neira Ayuso1-2/+12
Scenario: BTS are configured and working, then the BSC stops working for some reason (crash or administrative stop). If the BSC comes back to life, LAPD among other things does not know about the previous existing TEIs. Instead of ignoring these frames, we notify the driver that we are seeing frames with unknown TEIs, so it can try to recover, e.g. by resending the SABM message.
2011-08-16LAPD: Use proper log levels and prefix all messages with LAPDHarald Welte1-26/+29
2011-08-16LAPD: Remove all calls to 'assert' from the codeHarald Welte1-4/+11
For a system-level daemon, no protocol parser error should ever call assert, which would take down the entire process.
2011-07-19update to comply with libosmocore namespace fixesHarald Welte1-26/+26
This updates the code and brings it in sync to libosmocore git commit 892e621fec571c7cba3573caa0d328ed1b25d8ee
2011-07-18talloc: revert to use talloc inside libosmocoreHarald Welte1-1/+1
It's not a good idea to confuse the two changes with each other. Moving the Abis part into a separate library is independent from the question whether we have talloc inside libosmocore or use a stand-alone talloc library.
2011-07-05logging: use new harald's logging infrastructure in libosmocorePablo Neira Ayuso1-1/+0
I can send patches to improve it later, better not to waste much time at it by now so port libosmo-abis upon it.
2011-07-05include: export lapd.h since openBSC needs itPablo Neira Ayuso1-1/+1
More specifically, the unfinished ericsson rbs2000 BTS.
2011-06-09include: remove internal definition that are now in libosmocorePablo Neira Ayuso1-0/+1
Still in one separate patch for libosmocore, but they may become part of mainline soon.
2011-06-07src: use include/osmocom/abis instead of include/osmocom/gsm/abisPablo Neira Ayuso1-1/+0
Harald prefers short paths. This patch also remove commented includes in several files.
2011-06-05initial commit of libosmo-abisPablo Neira Ayuso1-0/+713
still many things to get fixed