summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* e1_input: move the lapd_instance pointer out of dahdi specificsHarald Welte2011-08-212-58/+74
| | | | ... and create a new e1inp_rx_ts_lapd() from dahdi as well
* trau_frame: Add doxygen documentationHarald Welte2011-08-211-1/+19
|
* subchan_demux: add doxygen documentationHarald Welte2011-08-211-4/+51
|
* TRAU: Properly initialize idle framesDieter Spaar2011-08-211-3/+29
| | | | | | This is particularly important in case of the Nokia BTS, as they seem to drop the RF/signalling channel if they don't get proper TRAU frames.
* ipa: export ipaccess_rcvmsg_base() and return intHarald Welte2011-08-191-5/+5
|
* ipaccess: make some functions static that shouldn't be exportedHarald Welte2011-08-192-3/+3
|
* e1_input: rework configuration of virtual E1 line operationsPablo Neira Ayuso2011-08-196-31/+25Star
| | | | | | | | | | | | | | | | | | | | | | | | | struct e1inp_line_ops { - enum e1inp_line_role role; - char *addr; - void *data; + union { + struct { + enum e1inp_line_role role; /* BSC or BTS mode. */ + const char *addr; /* IP address .*/ + void *dev; /* device parameters. */ + } ipa; + struct { + const char *port; /* e.g. /dev/ttyUSB0 */ + unsigned int delay; + } rs232; + } cfg; Now this structure contains the configuration details for the virtual E1 line, instead of using a pointer. This also get the line_update callback to its original layout: + int (*line_update)(struct e1inp_line *line);
* input: add rs232 driver for virtual E1 linesPablo Neira Ayuso2011-08-193-1/+305
| | | | | This patch adds the rs232 driver which is used by then bs11_config utility available in openBSC.
* ipa: remove unused 'proto' variableHarald Welte2011-08-191-3/+0Star
|
* ipa: fix compiler warning about ssize_t / socklen_tHarald Welte2011-08-191-1/+1
|
* hsl: use PRIx64 / inttypes.h for uint64_t format stringHarald Welte2011-08-191-1/+2
|
* hsl: remove unsued 'proto' variableHarald Welte2011-08-191-3/+0Star
|
* add string.h include to fix compiler warningHarald Welte2011-08-191-0/+1
|
* 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.
* 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.
* src: replace S_INP_* signals by S_L_INP_* according to naming policyPablo Neira Ayuso2011-08-165-10/+10
|
* 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-162-15/+55
|
* 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-163-6/+29
| | | | | | | | | | 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.
* don't use DLRSL, as it will be removedHarald Welte2011-07-211-1/+1
|
* update to comply with libosmocore namespace fixesHarald Welte2011-07-1910-186/+186
| | | | | This updates the code and brings it in sync to libosmocore git commit 892e621fec571c7cba3573caa0d328ed1b25d8ee
* talloc: revert to use talloc inside libosmocoreHarald Welte2011-07-1811-11/+11
| | | | | | 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: hack to get openBSC's ipaccess-config tool workingPablo Neira Ayuso2011-07-081-1/+1
| | | | | 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.
* hsl: BTS supportPablo Neira Ayuso2011-07-084-39/+139
| | | | | | This patch adds the BTS support for the hsl driver. It includes two examples under the tests/ directory.
* 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.
* 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-073-29/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* src: add e1_input_vty.c to libosmo-abisPablo Neira Ayuso2011-07-052-0/+103
| | | | | This file provides the VTY interface for E1 lines, I have moved it to libosmo-abis since it belongs here.
* 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-052-3/+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-0510-52/+1Star
| | | | | 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-053-4/+5
| | | | | 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-052-2/+4
| | | | | 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-052-2/+2
| | | | More specifically, the unfinished ericsson rbs2000 BTS.
* dahdi: fix driver compilationPablo Neira Ayuso2011-07-021-18/+8Star
| | | | | | Now dahdi driver compiles file. We force the compilation of this driver, I prefer to avoid condition compilation options that tend add problems IMO.
* input: close socket if no signal link was createdPablo Neira Ayuso2011-07-022-16/+44
| | | | | | | | | If the ->sign_link_up callback does not returns (or if it's NULL) a valid new signal link, we inmediately close the socket. If no signal link is set, there is nothing we can do with this socket, so keeping it open is useless otherwise.