aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-08-08configure: check for sctp.hneels/check_sctp_hNeels Hofmeyr1-0/+1
Notice missing sctp header at configure time. Without this patch, the user only finds out at build time. Change-Id: I4b3e1f1894f13ac1175a71a5139c02a2633be26d
2016-07-07gitignore: tests/osmux/.dirstampNeels Hofmeyr1-0/+1
Change-Id: Ia0380da1f4980035938ec39cd2b5674f0400fbb3
2016-07-07osmux-test: remove real-time constraint by defaultNeels Hofmeyr1-0/+10
Introduce a local #define to disable the real-time constraint from osmux-test. It would make sense to remove this completely, but in case anyone may be interested in the timing on a specific platform, I've just #defined it away. The real-time constraint to pass or fail the test is a bad idea in terms of our build server. Whenever the server is loaded, the tests will fail for no reason, like here: https://gerrit.osmocom.org/474 The real time to calculate is highly dependent also on the hardware platform. The arbitrarity of the time constraint is sort of proven by dd24cdd95f3fb8c8f which simply doubles the time to pass the test. Change-Id: Ic1da4bd22411652334f73195b2e37853e0738906
2016-05-26debian: Make upgrading from debian SID easierHolger Hans Peter Freyther1-0/+6
Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I6486f91bc11e0828b4ccd0e22f8e2135af0d271a Reviewed-on: https://gerrit.osmocom.org/111 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-26osmux: Add function to delete all msgs pending for a circuitDaniel Willmann1-0/+11
Use this function in osmux_batch_del_circuit() since msgs are stored in a list per circuit. After the circuit is free()d the msgs are lost. Before this patch any messages enqueued inside a batch when the circiut is deleted were leaking. Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Ticket: OS#1733 Reviewed-on: https://gerrit.osmocom.org/120 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-25osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini()Daniel Willmann1-12/+10
Change-Id: If224980123d4a369133499ab7b577d02511f4055 Ticket: OS#1733 Reviewed-on: https://gerrit.osmocom.org/119 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-14misc: Drop oRTP dependency as there is nothing using itHolger Hans Peter Freyther2-2/+1
This seems to be a copy of paste of libsomo-abis. Let us just drop it here and be done with it. Change-Id: Ia5cb2b572fb5597605284d1c3f657d548aa790f2 Reviewed-on: https://gerrit.osmocom.org/64 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-04-13jenkins: Add the build script from jenkins hereHolger Hans Peter Freyther1-0/+26
This can be used to replicate a build issue more easily.
2016-03-05debian: Update dependencies due SCTP supportHolger Hans Peter Freyther1-1/+1
We need to have the sctp-dev headers to be installed to be able to build this package.
2016-02-29osmux_test.c: tweak error reportNeels Hofmeyr1-1/+3
2016-02-19stream: Use macros to access data and lengthDaniel Willmann1-1/+1
2016-01-23Do not use strlen on binary inpitHolger Hans Peter Freyther1-1/+1
Coverity points out that buf might not be NULL terminated. For the memcpy ret was already used, so use ret for msgb_put as well. Fixes: CID#57922
2015-12-26libsctp: Only define LIBSCTP_LIBS in case there is a libHolger Hans Peter Freyther1-1/+3
2015-12-26libsctp: Fix build and don't link everything to libsctpHolger Hans Peter Freyther1-7/+9
On some systems sctp_* is part of the standard libc, so do not use AC_CHECK_LIB but AC_SEARCH_LIBS to find the symbol we need. Both macros modify LIBS which means all applications will link again libsctp and this is not what we want. Undo the side-effect of LIBS and export LIBSCTP_LIBS which is already used in the Makefile.am.
2015-12-25stream.c: ensure to zero-initialize sctp_sndrcvinfoHarald Welte1-0/+2
caught by valgrind: ==3150== Syscall param sendmsg(msg.msg_control) points to uninitialised byte(s) ==3150== at 0x60DC0D0: __sendmsg_nocancel (syscall-template.S:81) ==3150== by 0x5DF3413: sctp_send (in /usr/lib/x86_64-linux-gnu/libsctp.so.1.0.16) ==3150== by 0x65AA066: osmo_stream_srv_write (stream.c:540)
2015-12-22fix/complete stream client re-connect logicHarald Welte2-4/+17
So far, when the first connection attempt failed in osmo_stream_cli_open(), we returned a terminal errro without any re-connection attempts. While this may be useful in some cases, our general idea of the stream client logic is to handle the reconnection attempts insid the library. We introduce a new osmo_stream_cli_open2() function while keping the old behavior for backwards compatibility.
2015-12-22stream.c: Fix another 'link' variable / symbol mismatchHarald Welte1-1/+1
2015-12-22osmo_stream_cli_destroy: call talloc_free on right objectHarald Welte1-1/+1
'link' turns out to be a really bad variable name, as the symbol resolves to the global link(2)...
2015-12-21SCTP support for osmo_stream_{cli,srv} codeHarald Welte4-7/+98
Wih this change, osmo_stream_ client and server API can be used not only for TCP but also for SCTP. The latter is needed in SIGTRAN ad Iuh applications, for example.
2015-11-07teip is a pointer, not an intAlexander Huemer1-2/+2
2015-11-03misc: Release 0.0.6 without libosmovty dependency0.0.6Holger Hans Peter Freyther1-0/+6
2015-11-03libosmovty: Drop dependency as no VTY code is written hereHolger Hans Peter Freyther2-3/+2
Do not link to libosmovty as we don't need it.
2015-08-23Prepare a new release0.0.5Holger Hans Peter Freyther1-2/+2
2015-08-19osmux: rename batch->dummy field to batch->ndummyPablo Neira Ayuso1-5/+5
This is basically a counter that tells us how many circuits need the padding, so better rename this to ndummy. Suggested by Holger.
2015-07-21build: bump library release numberPablo Neira Ayuso1-1/+1
I have added two new interfaces to add and to delete circuits from osmux input handles. The client application needs to be adapted to use them otherwise it will break. That's why I'm making this library release incompatible with the previous generation.
2015-07-21tests: osmux: iterate 64 times in osmo_test_loop()Pablo Neira Ayuso1-1/+1
Instead of 63, this resolves major "definitely lost" remaining leak that valgrind reports regarding msgb.
2015-07-21tests: compile tests with debugging symbols, ie. -gPablo Neira Ayuso1-1/+1
Useful when debuggin via valgrind/gdb.
2015-07-21tests: osmux: fix msgb leaksPablo Neira Ayuso1-0/+2
2015-07-21osmux: kill osmux_get_hdr()Pablo Neira Ayuso2-14/+0
Never used, so let's get rid of this function. We can recover it later on in case we need it.
2015-07-21tests: osmux: test circuit reopening after closurePablo Neira Ayuso1-0/+7
Make sure circuit routines works correctly.
2015-07-21tests: osmux: validate dummy padding with no voice data interactionPablo Neira Ayuso1-0/+4
Make sure that early dummy bandwitch preallocation works fine in the absence of any kind of voice traffic.
2015-07-21tests: osmux: test online deactivation of dummy paddingPablo Neira Ayuso1-0/+4
Add RTP packets to circuit with dummy padding enabled to test automatic deactivation once when start seeing real voice traffic.
2015-07-21tests: osmux: factor out main test loopPablo Neira Ayuso1-28/+36
Move main test loop routine to the new osmux_test_loop() function.
2015-07-21tests: osmux: adapt it to use the new circuit APIPablo Neira Ayuso1-0/+13
This also introduces a spare circuit that contains no voice data to test bandwidth preallocation through the new osmux dummy frame type.
2015-07-21osmux: introduce osmux_xfrm_input_open_circuit()Pablo Neira Ayuso2-34/+103
This new function allows you to create a circuit on an existing input handle. We don't create the circuit anymore from the first packet seen, instead the client application is in full control of opening and closing the circuit. This change includes a new feature to pad a circuit until we see the first packet that contains voice data. This is useful to preallocate bandwidth on satellite links such as Iridium/OpenPort.
2015-07-21osmux: introduce osmux_xfrm_input_close_circuit()Pablo Neira Ayuso2-5/+24
Add this new function to explicitly remove an existing circuit. Thus, the client application (openbsc) is in full control to release circuits. Before this patch, the circuit object was added when the first RTP messages was seen, and it was removed when transforming the list of pending RTP messages to the Osmux message (once the timer expired). Moreover, check circuit->nmsgs to account bytes that are consumed by the osmux header, given that !circuit doesn't mean "this is the first packet" anymore.
2015-07-21osmux: count pending messages to be transformed in the batchPablo Neira Ayuso1-17/+15
Add a new field to count the number of messages in the batch that are pending to be transformed to osmux. Use this new field to check when to enable the osmux timer. The follow up patch keeps circuit objects in the batch until they are closed, so we won't be able to rely on this to know when to enable the timer anymore.
2015-07-21osmux: pass up struct osmux_batchPablo Neira Ayuso1-9/+8
Instead of struct osmux_in_handle. This object contains the internal batching state information.
2015-07-21osmux: rename circuit->list to circuit->rtp_listPablo Neira Ayuso1-7/+7
A circuit object contains a list of pending RTP messages to be converted to the osmux format.
2015-07-21osmux: rename struct batch_list_node to osmux_circuitPablo Neira Ayuso1-33/+33
I think this is a better name for this object. Basically, an input handle represents a batch that is composed of one or more circuit objects. Each circuit object contains a list of RTP messages that are pending to be converted to the osmux format in one single batch.
2015-07-21osmux: add circuit helper functionsPablo Neira Ayuso1-19/+46
Add osmux_batch_add_circuit() and osmux_batch_find_circuit() helper functions.
2015-07-17osmux: add osmux_input_state structurePablo Neira Ayuso1-37/+40
This new structure serves as container of the internal osmux state during transformation from RTP AMR to the compressed osmux format. This reduces the footprint of several functions and it makes them easier to extend if we need to pass new information between functions.
2015-07-17osmux: discard non voice osmux messagePablo Neira Ayuso1-0/+5
We only support voice osmux messages by now. Discard unsupported types.
2015-06-19build: fix regarding missing CFLAGS constituentsAndreas Rottmann1-1/+1
When libosmo-abis is installed in a distinct prefix, the build failed with non-found headers, for example: ../../src/rs232.c:38:35: fatal error: osmocom/abis/e1_input.h: No such file or directory #include <osmocom/abis/e1_input.h>
2015-05-19build: fix "make distcheck"Andreas Rottmann2-1/+3
Running "make distcheck" failed trying to generate ".version" into the read-only unpacked source directory: make[1]: Entering directory '/tmp/build/libosmo-netif-0.0.4.10-7d1d/_build' echo 0.0.4.10-7d1d > ../.version-t && mv ../.version-t ../.version /bin/bash: ../.version-t: Permission denied Makefile:877: recipe for target '../.version' failed Actually shipping ".version" in the tarball fixes that.
2015-03-22rtp: Declare struct msgb to fix compiler warningHolger Hans Peter Freyther1-0/+3
Fixes: /usr/include/osmocom/netif/rtp.h:63:41: warning: ‘struct msgb’ declared inside parameter list struct rtp_hdr *osmo_rtp_get_hdr(struct msgb *msg);
2015-03-22rtp: Add "data" to access the data behind the headerHolger Hans Peter Freyther1-0/+1
This is needed for mgcp_transcode.c of OpenBSC to access the data after the header. Use a zero sized array for it.
2015-03-22endian: Use the new endian macros for portabilityHolger Hans Peter Freyther6-13/+17
Use the new macros to deal with little/big endian. Im a bit worried to make this change due the little test coverage in this module but in case of a typo the elements would not be defined.
2015-03-14debian: Move the package to multi-arch supportHolger Hans Peter Freyther5-11/+14
2015-02-25Fix the compilation on FreeBSD.Nikola Kolev6-0/+8