summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ipaccess: don't close the signalling link if we receive bad OML/RSL messagePablo Neira Ayuso2011-08-171-1/+0Star
| | | | | Instead, propagate the error to upper layers. This fixes a segfault in the BSC if bad OML/RSL message is received.
* test: use site_id 1801 in ipa BTS examplePablo Neira Ayuso2011-08-171-1/+1
| | | | | Thus we can use it with the example file for openBSC under doc/examples/nanobts/openbsc.cfg.
* ipaccess: fix segfault if bsc port already in usedPablo Neira Ayuso2011-08-171-2/+0Star
| | | | | | | | | | | This patch fixes a segfault if we try to bind to an already busy port, it can be easily reproduced with: $ test/./e1inp_ipa_bsc_test & <0003> ipaccess.c:830 enabling ipaccess BSC mode <0000> e1inp_ipa_bsc_test.c:241 entering main loop $ test/./e1inp_ipa_bsc_test segfault
* e1_input: fix missing registration of dahdi driverPablo Neira Ayuso2011-08-171-2/+0Star
| | | | | | This patch fixes the registration of the dahdi driver. We were using conditional compilation (HAVE_DAHDI_USER_H) which we don't use anymore.
* E1 input: rename signal_input by e1inp_signal_inputPablo Neira Ayuso2011-08-161-1/+1
| | | | | Comestical change required by patches that port openBSC upon libosmo-abis.
* src: replace S_INP_* signals by S_L_INP_* according to naming policyPablo Neira Ayuso2011-08-166-17/+17
|
* DAHDI: Actually increment e1_input related rate countersHarald Welte2011-08-161-0/+15
|
* E1 Input: better names for rate countersHarald Welte2011-08-161-4/+4
|
* E1 Input: Add rate counters for events related to E1 linesHarald Welte2011-08-163-15/+64
|
* E1 Input: Move 'show e1_*' command to e1_input_vty.cHarald Welte2011-08-161-0/+118
|
* E1 Input: Add VTY command to specify the name of a LineHarald Welte2011-08-161-1/+28
| | | | So far, there was no way to set the line->name field at all.
* LAPD: Propagate lapd_receive() errors to the E1 driverPablo Neira Ayuso2011-08-165-8/+44
| | | | | | | | | | 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.
* LAPD: Use proper log levels and prefix all messages with LAPDHarald Welte2011-08-161-26/+29
|
* LAPD: Remove all calls to 'assert' from the codeHarald Welte2011-08-161-4/+11
| | | | | For a system-level daemon, no protocol parser error should ever call assert, which would take down the entire process.
* DAHDI: Fix case where we have multiple E1 ports/cards (spans)Harald Welte2011-08-161-1/+7
| | | | | | | DAHDI creates one device node for every E1 timeslot, starting from '1', and keeps incrementing that number even for additional ports/cards. Thus, we have to use the e1inp_line number multiplied by 31 as a base.
* include: add missing ipa.h to Makefile.am so make distcheck works againPablo Neira Ayuso2011-08-161-0/+1
|
* don't use DLRSL, as it will be removedHarald Welte2011-07-211-1/+1
|
* update to comply with libosmocore namespace fixesHarald Welte2011-07-1912-190/+190
| | | | | This updates the code and brings it in sync to libosmocore git commit 892e621fec571c7cba3573caa0d328ed1b25d8ee
* talloc: revert to use talloc inside libosmocoreHarald Welte2011-07-1817-17/+16Star
| | | | | | 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.
* ipaccess: ipaccess_fd_cb needs to be externPablo Neira Ayuso2011-07-081-1/+1
|
* ipaccess: hack to get openBSC's ipaccess-config tool workingPablo Neira Ayuso2011-07-082-1/+4
| | | | | Export one function that we shouldn't, it's a quick way to fix the ipaccess-config in openBSC.
* hsl: close socket if we destroy the signalling linkPablo Neira Ayuso2011-07-081-0/+14
| | | | | As we do in ipaccess driver, the socket is not useful anymore if the BSC/BTS decides to close the signalling link.
* tests: add missing hsl examplesPablo Neira Ayuso2011-07-082-0/+506
| | | | Hm, it seems I forgot to git add them :-(.
* tests: convert IPA BTS example to use event-oriented approachPablo Neira Ayuso2011-07-081-21/+53
| | | | | | Like the HSL BTS example. We use an event file descriptor which is used to call the GSM 12.21 based function for handling.
* hsl: BTS supportPablo Neira Ayuso2011-07-088-41/+157
| | | | | | This patch adds the BTS support for the hsl driver. It includes two examples under the tests/ directory.
* tests: close OML and RSL if set for the BSC examplePablo Neira Ayuso2011-07-081-2/+4
| | | | We only close the OML and RSL links if they are indeed up.
* ipaccess: add bugtrag for the RSL link becomes up casePablo Neira Ayuso2011-07-081-0/+9
| | | | | | | | | The RSL signal link becomes up for the ipaccess driver is tricky. If the BSC forgets to use the E1 line used by OML for the RSL link, we run into trouble. This patch adds a bugtrap so people don't forget to appropriately handle this case.
* tests: example BTS now sends an OML SW ACT REQPablo Neira Ayuso2011-07-081-2/+130
| | | | | | This allows to test that the write path works and it allows you to get an idea on how to implement the BTS side by means of libosmo-abis.
* tests: use the virtual E1 line used by OML for RSL linkPablo Neira Ayuso2011-07-081-3/+13
| | | | | | | | | | | | The ipaccess driver is tricky. Since it uses two ports for OML and RSL links, the link for RSL needs to be done in the same line that the OML link. Now the BSC examples uses the virtual E1 line where the OML link is for the RSL one. This patch also verifies that the OML link is up before the someone tries to get the RSL link up.
* hsl: remove unused hsl_setup functionPablo Neira Ayuso2011-07-071-6/+0Star
| | | | This function lives in openBSC not here.
* e1_input: add new refcounting scheme to avoid leaking E1 linesPablo Neira Ayuso2011-07-074-30/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch 's/e1inp_line_get/e1inp_line_find/g' since we need this function name for the new refcounting scheme. Basically, I have added a new function to clone lines that is used by the ipaccess driver: struct e1inp_line *e1inp_line_clone(void *ctx, struct e1inp_line *line); And two functions to bump and decrement the refcount: void e1inp_line_get(struct e1inp_line *line); void e1inp_line_put(struct e1inp_line *line); This is useful to avoid leaking virtual E1 lines in the ipaccess case, since we have two sockets for OML and RSL respectively, we have to release the line *once* both sockets have been closed. Without this patch, there are cases in which we don't know if it's time to release the virtual E1 line. This patch also includes a fix to avoid crashing if we open a connection with OML/RSL port without sending any ID_RESP message (in that case, we have no chance to set the signal link). I tested these situations with netcat.
* ipaccess: close connection if we receive bad messages from BTSPablo Neira Ayuso2011-07-071-29/+55
| | | | | If we receive bad messages from the BTS, we close the connection. I think this is a more robust behaviour.
* ipaccess: skip further processing for ping, pong and id_req messagesPablo Neira Ayuso2011-07-071-5/+10
|
* ipaccess: release virtual E1 line for closed connectionPablo Neira Ayuso2011-07-071-0/+3
| | | | | We fix a leak in the ipaccess_drop(...) path where we were missing the release of the cloned E1 line for this OML/RSL links
* ipaccess: don't forget to release temporary RSL socketPablo Neira Ayuso2011-07-071-1/+5
| | | | | We have to release the temporary RSL in case that the socket is closed and we have no chance to attach it to the OML link.
* include: remove IPA_NODE and E1INP_NODE definition from internal.hPablo Neira Ayuso2011-07-051-4/+0Star
| | | | They should be defined in osmocom/vty/command.h in libosmocore.
* src: add e1_input_vty.c to libosmo-abisPablo Neira Ayuso2011-07-054-0/+106
| | | | | This file provides the VTY interface for E1 lines, I have moved it to libosmo-abis since it belongs here.
* tests: support OML software activate request ack messagePablo Neira Ayuso2011-07-051-2/+118
| | | | | | | | This patch steals some code from openBSC to implement the OML software activate request ack message which is delivered to the BTS. This allows to test the ->sign_link(...) path.
* ipaccess: fix write path for OML/RSL message from BSC -> BTSPablo Neira Ayuso2011-07-051-3/+1Star
| | | | | | | | | This patch fixes the write path for OML/RSL messages. I broke this while trying to support the delivery of IPA CCM messages using this path, which is not useful since they are directly delivered by means of the file descriptor. This patch fixes the corruption of messages leaving the BSC.
* src: use signal infrastructure that will be available in libosmocorePablo Neira Ayuso2011-07-053-20/+2Star
| | | | | This is still not in mainline yet, it's in a separate patch that I expect to send to Harald soon.
* logging: use new harald's logging infrastructure in libosmocorePablo Neira Ayuso2011-07-0515-72/+4Star
| | | | | I can send patches to improve it later, better not to waste much time at it by now so port libosmo-abis upon it.
* ipaccess: fix ID_RESP parsing in BSC modePablo Neira Ayuso2011-07-051-6/+3Star
|
* ipaccess: remove any reference to deprecated msg->trxPablo Neira Ayuso2011-07-051-2/+0Star
| | | | We plan to use msg->dst instead.
* e1_input: change prototype of ->sign_link(...)Pablo Neira Ayuso2011-07-056-7/+8
| | | | | This patch removes the struct e1inp_sign_link parameter since this is already available in the msgb->dst field of the message.
* e1_input: change prototype of close hook in e1inp_driverPablo Neira Ayuso2011-07-053-3/+5
| | | | | This patch changes `close' so we can make the e1inp_event inside this hook.
* include: export lapd.h since openBSC needs itPablo Neira Ayuso2011-07-055-3/+4
| | | | More specifically, the unfinished ericsson rbs2000 BTS.
* include: remove unused ipaccess_read_msg definition from internal.hPablo Neira Ayuso2011-07-021-2/+1Star
| | | | This was used by hsl driver but not anymore.
* tests: use logging infrastructure to display messagesPablo Neira Ayuso2011-07-022-23/+35
| | | | instead of using printf
* add AUTHORS and COPYING filesPablo Neira Ayuso2011-07-022-0/+664
| | | | | | | | The AUTHORS file contain the people that appear in the copyright headers plus myself. The COPYING file contains the AGPLv3 which is the selected license according to discussion with Harald.
* dahdi: fix driver compilationPablo Neira Ayuso2011-07-022-18/+10Star
| | | | | | Now dahdi driver compiles file. We force the compilation of this driver, I prefer to avoid condition compilation options that tend add problems IMO.