aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-12-14debian: Undo multi-arch changes to debian6.0zecke/ancient/debian6.0Holger Hans Peter Freyther6-14/+9
2015-11-03debian: Bump so version to link against new libosmovty20.3.2Holger Hans Peter Freyther5-8/+14
Debian doesn't have reverse dependencies so we need to bump the SO version to have libosmoabis and libosmotrau link against our new version.
2015-09-21ortp: Guard the jitter stats with a version checkHolger Hans Peter Freyther1-1/+4
ortp 0.18 has introduced the jitter_stats but we only check for 0.21 an later. It is okay that at some point the jitter stats will be reported. For previous versions it is 0.
2015-09-21ortp: Export statistics for the bts or similarv0.3.2Holger Hans Peter Freyther2-0/+32
We might want to know how many things arrived at the BTS and ortp is already counting for us. We don't intend to use RTCP so I am not sure what the last "sender report" is and how accurate the jitter is.
2015-08-15configure.ac: Add subdir-objectsHarald Welte1-1/+1
2015-03-22subchan: Remove unused const variableHolger Hans Peter Freyther1-1/+0
nullbytes has never been used, I assume the code ended up using memset instead of copying from nullbytes. Fixes: subchan_demux.c:47:22: warning: unused variable 'nullbytes' [-Wunused-const-variable] static const uint8_t nullbytes[SYNC_HDR_BITS];
2015-03-14debian: Switch to multi-arch supportHolger Hans Peter Freyther6-13/+18
2015-01-18New upstream releasev0.3.1Holger Hans Peter Freyther1-0/+6
2015-01-18ipa: Add API to clear the tx queueHolger Hans Peter Freyther2-0/+15
Jacob noticed that after a re-connect old messages would be sent. This can be the wanted behavior but add a method that allows a caller to clear the tx queue. The implementation has not been verified and there is no existing unit test where I could easily add this code to.
2014-12-26misdn: Close the file descriptor if the ioctl is failingHolger Hans Peter Freyther1-0/+1
Fixes: Coverity CID#1040691
2014-12-22ipa: Declare all structs usedJacob Erlbeck1-0/+5
A few declarations are missing. This patch adds forward declarations for struct used for pointers only and an include directive (osmocom/core/select.h) to get a full definition of struct osmo_fd. Sponsored-by: On-Waves ehf
2014-12-12ipa: Set the BSC_FD_WRITE in ipa_client_conn_openHolger Hans Peter Freyther1-0/+1
When the link is being created BSC_FD_WRITE and BSC_FD_READ are being ored into the flag. When the socket connects the first time the ipa_client_fd_cb function is called and the link->state is moved from connecting to connect. In case the connection drops and ipa_client_conn_open is called again the BSC_FD_WRITE flag might not be set. This means that after the socket is connected, ipa_client_fd_cb will not be called. This means that the updown_cb will not be called until after the first write or read on the socket. It might even lead to missing some data. When re-connecting set the write flag again.
2014-10-26ipa: Partially revert the e1inp_ipa_bts_rsl_connect_n commitHolger Hans Peter Freyther1-6/+0
The check was always hit by osmo-bts master leading to the RSL connection never being made. This is because the type of the line will be set _after_ the RSL connection has been made. E.g. inside osmo-bts/src/common/abis.c: static struct e1inp_sign_link *sign_link_up(void *unit, struct e1inp_line *line, enum e1inp_sign_type type) { struct e1inp_sign_link *sign_link = NULL; switch (type) { ... case E1INP_SIGN_RSL: LOGP(DABIS, LOGL_INFO, "RSL Signalling link up\n"); e1inp_ts_config_sign(&line->ts[E1INP_SIGN_RSL-1], line); ... Only the call to e1inp_ts_config_sign will set the type to be E1INP_TS_TYPE_SIGN. Before the call the type is still _NONE and the connect was rejected.
2014-09-25misc: Work with src != builddirHolger Hans Peter Freyther1-1/+1
libosmo-abis/0.3.0+gitrAUTOINC+b6d2834eef-r2.14.0/git/src/input/dahdi.c:25:26: fatal error: ../../config.h: No such file or directory #include "../../config.h"
2014-09-08Prepare a new release of libosmo-abis0.3.0Holger Hans Peter Freyther5-8/+13
2014-08-29test: Fix the compilation of the testHolger Hans Peter Freyther1-1/+1
This test didn't compile as it called the wrong method. It is a manual test anyway and tend to bitrot. I didn't execute the resulting test binary. Hmm, now I did and it segfaults on something that appears to have been introduced a long time ago. Manual tests are as good as no tests (besides they take more time than writing no test). ;)
2014-08-29Add missing TODO-RELEASE entry to remind us of the ABI bump on releaseHolger Hans Peter Freyther1-0/+1
2014-08-28Support for multiple RSL connections with ABIS/ipaccess (BTS side)Andreas Eversberg3-7/+36
In order to support multiple TRX, multiple RSL connections can be establised. e1inp_ipa_bts_rsl_connect() requires an additional parameter to set the TRX number. The ts[] array (member of struct e1inp_line) refers to OML and RSL. ts[0] refers to OML link, ts[1] to RSL link of first TRX, ts[2] to RSL link of second TRX (if exists) and so on. The code was successfully tested with osmobts-trx and UmTRX with two transceivers. The user of e1inp_ipa_bts_rsl_connect() (which is osmo-bts) can use the new function like this (backwards compatibility function provided): src/common/oml.c - rc = e1inp_ipa_bts_rsl_connect(oml_link->ts->line, inet_ntoa(in), port); + rc = e1inp_ipa_bts_rsl_connect_n(oml_link->ts->line, inet_ntoa(in), port, + trx->nr);
2014-08-21fix compiler warning in write_pcap_packet()Harald Welte1-5/+4
if we don't evaluate the result of write(), there's no point in storing the result in a variable.
2014-08-20move various generic IPA related functions to libosmocoreHarald Welte5-445/+13
libosmo-abis is about forming A-bis interfaces/lines by means of E1 or the IPA multiplex (or possibly other link layers). The IPA multiplex is used in other contexts, such as the Control interface, or the A interface. In that context, it makes sense to have generic IPA related functions in libosmocore.
2014-08-18ipa: Add E1INP_SIGN_OSMO to use IPAC_PROTO_OSMO via e1_inputHarald Welte3-1/+3
In order to make use of the IPAC_PROTO_OSMO stream_id of the IPA multiplex via the e1_input abstraction layer, we need to define E1INP_SIGN_OSMO and treat it like other signalling (OML/RSL). This is required for the upcoming code that uses IPAC_PROTO_OSMO to remotely insert routing table entries into the OML router (e.g. from osmo-bts).
2014-08-18ipa: add ipaccess_tlv_to_unitdata()Harald Welte2-0/+47
this function takes the parsed TLVs of an IPA ID RESP message and fills a 'struct ipaccess_unit'.
2014-08-18ipa: declare more already public functionsHarald Welte1-0/+4
ipaccess_idtag_parse(), int ipaccess_send_id_req() and paccess_parse_unitid(). In the mid to long term, the entire IPA/CCM handling should be moved out of the processes and into a proper state machine inside libosmocore or libosmoabis.
2014-08-18Split generic CCM handling out of ipaccess_bts_read_cb()Harald Welte2-18/+53
The generic functionality of responding to IPA CCM messages doesn't need to be intertwined with our e1input abstraction. We split this out as new exported function ipaccess_bts_handle_ccm() and modify ipaccess_bts_read_cb() to make use of that function.
2014-08-18ipa: Move the second null check into the first oneHolger Hans Peter Freyther1-5/+4
Move the second null check before we actually dereference the msg. Fixes: Coverity CID 1231854
2014-08-18declare ipa_msg_push_header() as public functionHarald Welte2-1/+1
2014-08-18ipa: ensure updown_cb() gets called on reconnectHarald Welte1-0/+1
If the ipa_client_conn is lost and ther user issues a new ipa_client_conn_open(), then we need to re-set our internal state to IPA_CLIENT_LINK_STATE_CONNECTING, as otherwise we wouldn't call the updown_cb() once the link is up again.
2014-08-18ipa: Set msgb->l1h to the beginning of the IPA headerHarald Welte1-1/+3
l2h points to the OML/RSL header, so it is only logical that l1h points to the IPA header. Also, this is what osmo-bts/msg_utils.c expects.
2014-08-17ipa.h: Wrap function declarations to make them more readableHarald Welte1-3/+17
purely cosmetic change.
2014-06-24rtp: Randomize the initial timestamp for RFC complianceHolger Hans Peter Freyther1-0/+1
Pick a random timestamp when creating the session. RFC 3550: The initial value of the timestamp SHOULD be random, as for the sequence number. Fixes: SYS#403
2014-06-24rtp: Randomize the initial sequence number for RFC complianceHolger Hans Peter Freyther1-0/+4
The usage of random() is not that unpredictable but the closest we can get right now. RFC 3550: The initial value of the sequence number SHOULD be random (unpredictable) to make known-plaintext attacks on encryption more difficult, even if the source itself does not encrypt according to the method in Section 9.1, because the packets may flow through a translator that does. Techniques for choosing unpredictable numbers are discussed in [17]. Fixes: SYS#403
2014-05-06ipa: Add function declaration for IPA header creationHolger Hans Peter Freyther1-0/+4
These functions are called from OpenBSC and are supposed to be public API of libosmo-abis.
2014-04-26ipa_proxy: make sure ipa instance name is nul-terminatedPablo Neira Ayuso1-0/+1
Reported by coverity. CID 1206565.
2014-03-31release: Prepare the 0.2.0 release of libosmo-abisv0.2.0Holger Hans Peter Freyther5-7/+12
2014-03-31ipa: Change ipa_msg_recv() to support partial receiveJacob Erlbeck7-54/+198
Currently ipa_msg_recv() fails, when messages are received partially. This patch provides a new function ipa_msg_recv_buffered() that uses an additional ** to a message buffer to store partial data. When this happens, -EAGAIN is returned. If NULL is used, the function behaves similar to ipa_msg_recv() and fails on partial read. In addition in case of errors the return value is now always -EXXX and the contents of errno is undefined. Note that this feature needs support by the calling code insofar that *tmp_msg must be set to NULL initially and it must be freed and set to NULL manually when the socket is closed. Note also that ipa_msg_recv() is then a wrapper around ipa_msg_recv_buffered() which mimics the old error behaviour by setting errno explicitely to -rc and returning -1 when an error has happened. Ticket: OW#728 Sponsored-by: On-Waves ehf
2014-03-24ipa/test: Add test program for IPA message receptionJacob Erlbeck5-2/+256
This patch adds tests for ipa_msg_recv(), where messages are sent either complete or partitioned. Sponsored-by: On-Waves ehf
2014-02-03ipaccess: Move the #endif before the curly braceHolger Hans Peter Freyther1-1/+1
Fix the compilation on FreeBSD that does not use these names but they are prefixed with TCPTV_KEEP... instead.
2014-01-20debian: Build the new upstream releaseHolger Hans Peter Freyther1-0/+6
2014-01-20Prepare the v0.1.6 release of libosmo-abisv0.1.6Holger Hans Peter Freyther4-7/+5
2014-01-20ipaccess: Change the visibility of the ipa messagesHolger Hans Peter Freyther2-3/+4
2014-01-20ipaccess: Make TCP keep-alive configurableJacob Erlbeck1-4/+11
This patch changes the implementation to use the keep-alive configuration fields instead of constants. Ticket: OW#1060 Sponsored-by: On-Waves ehf
2014-01-20input: Make keep alive configurable (generic)Jacob Erlbeck3-0/+78
This patch adds a generic keep alive configuration layer that mainly consists of additional fields in e1_input structs and VTY commands and extensions. Ticket: OW#1060 Sponsored-by: On-Waves ehf
2014-01-20ipaccess: Use keep alive for all connectionsJacob Erlbeck1-28/+45
Keep alive has only been used for OML so far. This patch refactors the socket configuration into an own function and uses it for RSL, too. Ticket: OW#1060 Sponsored-by: On-Waves ehf
2014-01-20ipaccess: Enable TCP keepalive by default on all BTS connectionsDaniel Willmann1-1/+34
This way we can find out fast if the connection is broken. Ticket: OW#1060
2013-12-28ipaccess: Fix crash when no IPA message is sent first on the RSL portHolger Hans Peter Freyther1-0/+5
The issue was that the link has not been configured yet and the list has not been initialized yet (it is NULL for next/prev). Check if the ts is not configured before searching a link. Reproduce with: (Sockets.StreamSocket remote: 'localhost' port: 3003) nextPutAll: #[0 1 0 0]; flush. Backtrace: #0 e1inp_lookup_sign_link (e1i=0x27af8c0, tei=0 '\000', sapi=0 '\000') at e1_input.c:437 437 if (link->sapi == sapi && link->tei == tei) (gdb) bt #0 e1inp_lookup_sign_link (e1i=0x27af8c0, tei=0 '\000', sapi=0 '\000') at e1_input.c:437 #1 0x00007f338ee87d49 in handle_ts1_read (bfd=0x27afe60) at input/ipaccess.c:436 #2 ipaccess_fd_cb (bfd=0x27afe60, what=1) at input/ipaccess.c:586 #3 0x00007f338f0976ce in osmo_select_main (polling=0) at select.c:158 #4 0x0000000000407394 in main (argc=<optimized out>, argv=0x7fff1aa4fed8) at bsc_hack.c:346 (gdb) p *e1i $1 = {type = E1INP_TS_TYPE_NONE, num = 2, line = 0x222e860, lapd = 0x0, {sign = { sign_links = {next = 0x0, prev = 0x0}, delay = 0, tx_timer = {node = { rb_parent_color = 0, rb_right = 0x0, rb_left = 0x0}, list = {next = 0x0, prev = 0x0}, timeout = {tv_sec = 0, tv_usec = 0}, active = 0, cb = 0, data = 0x0}}, trau = {demux = {chan_activ = 0 '\000', subch = {{ out_bitbuf = '\000' <repeats 319 times>, out_idx = 0, consecutive_zeros = 0, in_sync = 0}, {out_bitbuf = '\000' <repeats 319 times>, out_idx = 0, consecutive_zeros = 0, in_sync = 0}, {out_bitbuf = '\000' <repeats 319 times>, out_idx = 0, consecutive_zeros = 0, in_sync = 0}, { out_bitbuf = '\000' <repeats 319 times>, out_idx = 0, consecutive_zeros = 0, in_sync = 0}}, out_cb = 0, data = 0x0}, mux = {subch = {{tx_queue = {next = 0x0, prev = 0x0}}, {tx_queue = {next = 0x0, prev = 0x0}}, {tx_queue = {next = 0x0, prev = 0x0}}, {tx_queue = {next = 0x0, prev = 0x0}}}}}}, driver = {misdn = { fd = {list = {next = 0x7f338f2a7950, prev = 0x250f890}, fd = 19, when = 1, cb = 0x7f338ee87c40 <ipaccess_fd_cb>, data = 0x27af2c0, priv_nr = 2}}, ipaccess = { fd = {list = {next = 0x7f338f2a7950, prev = 0x250f890}, fd = 19, when = 1, cb = 0x7f338ee87c40 <ipaccess_fd_cb>, data = 0x27af2c0, priv_nr = 2}}, dahdi = {fd = { list = {next = 0x7f338f2a7950, prev = 0x250f890}, fd = 19, when = 1, cb = 0x7f338ee87c40 <ipaccess_fd_cb>, data = 0x27af2c0, priv_nr = 2}}, rs232 = {fd = { list = {next = 0x7f338f2a7950, prev = 0x250f890}, fd = 19, when = 1, cb = 0x7f338ee87c40 <ipaccess_fd_cb>, data = 0x27af2c0, priv_nr = 2}}}}
2013-12-12debian: Depend directly on the two libraries needed for libosmo-abisHolger Hans Peter Freyther1-1/+1
Do not pull in libosmocore but let the abis/trau library pull in the DSO that is actually linked to.
2013-12-12debian: Enable the hardening options for this libraryHolger Hans Peter Freyther1-0/+1
2013-12-12debian: Address warnings and increase standards versionHolger Hans Peter Freyther1-1/+1
2013-12-12debian: Split the libraries into separate packagesHolger Hans Peter Freyther4-4/+19
This way one can install two ABI incompatible versions of the library at the same time. This will ease future transition. Create a dummy/compatible package.
2013-12-12debian: Add depedency to newer libosmocore and update the changelogHolger Hans Peter Freyther2-1/+7