AgeCommit message (Collapse)AuthorFilesLines
2018-07-27Bump version: → Espin Pedrol5-8/+22
Change-Id: Ic9bbe8427c44ef2a9ee02537f17821048f177cdd
2018-07-05stream.c: Use non-blocking connect in osmo_stream_cliHarald Welte1-1/+1
When establishing a client-side stream connection via libosmo-netif, we must using non-blocking connect if we want to avoid blocking/stalling the entire process. The libosmocore socket API provides the OSMO_SOCK_F_NONBLOCK flag for this. Make use of it! Change-Id: I9bfcb39b5801a36ef32ca0d1f3eb8236687d7ed6 Related: OS#3383
2018-06-29remove "channel" layerHarald Welte18-1141/+1
The "channel" layer on top of IPA client + server was introduced in 2011 but never used in any osmocom program/project so far. Contrary to the several other IPA multiplex related implementations in libosmo*, it did not deal properly with segmented IPA messages, i.e. where a single TCP segment (and hence recv/read call) does not contain a full IPA message. So rather than fixing it up and having yet another IPA related API in our libraries, let's remove it. Change-Id: I97c378750acb1637ee032fa88a968edf68d8979f
2018-05-15osmux: change log lvl of batch full to debugPau Espin Pedrol1-2/+2
This message is expected as all code filling batches call osmux_batch_enqueue() and checks for error to know if it must tell the user of the lib to call osmux_xfrm_input_deliver. Change-Id: I3d8227f2281f6ca92fd2502d3e328765dc7ecfe9
2018-05-15jibuf: Fix out-of-order seq queue around syncpointsPau Espin Pedrol3-7/+36
Fixes: OS#3262 Change-Id: Ib8c61dbe6261cf73d6efcd7873e23b7656117556
2018-05-15tests: jibuf_test: Add scenario to show out-of-order bugPau Espin Pedrol2-0/+83
Related: OS#3262 Change-Id: I1e78cc44f8a04dcb983352b513f8de2574b2394b
2018-05-15tests: jibuf_test: Set some functions as staticPau Espin Pedrol1-2/+2
Change-Id: I3af6db3fd74d55c5e659132fc542f22478a55eb7
2018-05-03Bump version: → Espin Pedrol3-4/+58
Change-Id: Ic8a9e44b2f930fed024040777eab58699fdcaadc
2018-04-28osmux: Fix use of uninitialized memory in osmux_out_handleHarald Welte1-0/+1
In Change-Id: I2efed6d726a1b8e77e686c7a5fe1940d3f4901a7 we're adding a new member to 'struct osmux_out_handle' which is not initialized. Rather than initializing this single new member, let's do a memset() over the entire osmux_out_handle at the beginnign of osmux_xfrm_output_init(). Change-Id: I751e9414c6de2413a9f977e5ae5655ebfd114f45 Closes: OS#3219
2018-04-19osmux: Move examples and tests to use new output APIsPau Espin Pedrol4-24/+17
Change-Id: Ie69c427308eb7d81aedab7fbb71f1bdaf43f0275
2018-04-19osmux: Set Marker bit on osmux frame loss detectedPau Espin Pedrol4-12/+34
Until this patch, we didn't notify in any way to the RTP reader when an Osmux frame was lost. Instead, we updated the seq&timestamp as if there was no lost, and as a result the RTP reader would only see a steady increase of delay every time an osmux frame was lost. As the batch_factor for the lost packet is unknown, we cannot assume any number of amr payloads lost, and thus we cannot simply increment seq and timestamp for a specific amount. Instead, the only viable solution seems to set the M marker bit in the first rtp packet generated after a non-consecutive osmux frame is received. The implementation may act differently with the first generated RTP packet based on the first osmux seq number used for the stream. In case 0 it's used as first osmux seq number, M will be set depending on request from original RTP packet having the M bit set. If it's not 0, the first RTP packer will unconditionally have the M bit. That's not an issue because it's anyway expect for receiver to sync on the first packet. Related: OS#3185 Change-Id: I2efed6d726a1b8e77e686c7a5fe1940d3f4901a7
2018-04-19tests: Add osmux2 testsuitePau Espin Pedrol4-1/+497
This test is aimed at testing several specific scenarios related to how osmux manages in/out of osmux/rtp packets over time. Change-Id: I3bf59276424ea87c4e66a6ff46de1e3e9a06a904
2018-04-19osmux: Add new API osmux_xfrm_output_sched to fix rtp generation issuesPau Espin Pedrol2-3/+141
With old implementation, in conditions with jitter we could end up scheduling RTP generated packets from two consecutive osmux frames in an interleaved way (from seq field point of view). This new implementation should make it easier for any RTP reader/playback to have better results in those conditions. Old APIs osmux_xfm_output and osmux_tx_sched are marked as deprecated in favour of the new one, which has a better control of generated RTP packets. However, they are still usable despite the implementation changes done to support the new API. Related: OS#3180 Change-Id: I4e05ff141eb4041128ae77812bbcfe84ed4c02de
2018-04-17examples: use osmo_init_logging2Pau Espin Pedrol16-31/+33
Change-Id: I7f1f4503f254931edeebfbadf3953efa7b20f85f
2018-04-17Build jibuf_tool based on libpcap availabilityPau Espin Pedrol2-4/+13
Change-Id: I27cdb1b5175a5b02638e6d743b686bdf4b1be144
2018-04-17tests: use osmo_init_logging2Pau Espin Pedrol2-2/+6
Change-Id: Icc84bbd53e1589e26e445e3460024e77162bd76f
2018-04-13jibuf: Estimate src clock skewPau Espin Pedrol6-13/+1005
Change-Id: Ifae633d53107417a8e2f9b0f200d2711db72d199
2018-04-13tests: jibuf_tool: Add seq.pltPau Espin Pedrol1-0/+50
Change-Id: I37bb3ab372b7ad7c3c1d09c8134827c932bf8bf8
2018-04-13jibuf: re-sync clock out of sync timestampsPau Espin Pedrol4-7/+152
Change-Id: I33556b33d7549654442d9bdd7f31128792506652
2018-04-13jibuf: Take RTP marker into accountPau Espin Pedrol4-5/+89
Change-Id: Ie142acfb45650e0af775f58226fd191beaf8178e
2018-04-13tests: jibuf_tool: Add parameters to control size of bufferPau Espin Pedrol1-4/+14
Change-Id: I8a7fa39985f8d197e24c32cab80299aba2d03087
2018-04-13tests: jibuf_tool: Add OSMUX supportPau Espin Pedrol1-3/+40
Change-Id: I0f02da0329e6739ff340d31113161bb520b1b760
2018-04-13tests: jibuf_tool: Improve jibuf_test to read pcapsPau Espin Pedrol3-105/+308
Change-Id: I7a13c823fb70e0adbc5fa0726fd66b15dc40014e Signed-off-by: Pau Espin Pedrol <pespin@sysmocom.de>
2018-04-13tests: jibuf_tool: Initial commitPau Espin Pedrol3-1/+421
Change-Id: I92307c8b1483dd488339771462290aae0ae5689a
2018-04-13jibuf: Add initial implementation of Jitter BufferPau Espin Pedrol8-2/+1407
Change-Id: I9688ba9c4d5b733b9f29d0f15f73750f9271ef55
2018-04-13Update README.mdAlexey1-1/+1
Fixed "interface" double references Change-Id: Icb41dc65dec56d6b8d8f23dfc9bbc2e85cf6dc3b
2018-04-12osmux: osmux_xfrm_output_pull: Improve checks and log of malformed packetsPau Espin Pedrol1-5/+11
Change-Id: I143805bb5ee9f5e3ada46114e380a03ede80df9f Related: SYS#4182
2018-04-12tests: osmo-pcap-test: Fix pcap includes not found in old versionsPau Espin Pedrol2-2/+2
pcap/dlt.h only exists on newer versions of libpcap. On older versions, same defines are available in pcap/bpf.h, which in newer versions include pcap/dlt.h, so we are always fine include pcap/bpf.h. As a side note, there's a lots of comments in pcap/dlt.h stating that those symbols used to reside in pcap/bpf.h but were moved there at some point. Change-Id: I824671a415eb3f35f480c934b9780ff13510011a
2018-04-05stream.c: osmo_stream_cli_open2: Remove wrong assumption in reconnect decisionPau Espin Pedrol1-1/+1
Documentation of osmo_sock_init2 doesn't provide information of any specific value of errno set/expected after running the function. It is incorrect to expect a specific value of errno and looking at the implementation it is actually not a good idea to check it. If reconnect flag is set, let's reconnect always instead of looking at errno to decide. Change-Id: I25b33f4cdc496ae31ff240d445b9b2805091845c
2018-03-12jenkins.sh: use --enable-werror configure flag, not CFLAGSNeels Hofmeyr1-1/+1
Change-Id: I739f4562a96b7b6031075d47d94f46af7a37b4b4
2018-03-12configure: add --enable-werrorNeels Hofmeyr1-0/+18
Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: I68e4781ec5dfaf1dac46510a092a87e35691f082
2018-03-07osmux: Use correct log category DLMUXPau Espin Pedrol1-27/+27
Change-Id: I77f4593941207689f714d15304dcce40b21d4bd8
2018-02-26test: osmo-pcap-test: Fix clock drift while replaying pcap filePau Espin Pedrol2-7/+26
In the previous implementation, the processing time was not being taken into account, which was implicitly added for each new packet to be sent, which caused a steady incremental drift in the clock clearly visible when analysing a RTP stream. As it uses timespecsub, it depends on libosmocore Change-Id I45fc993b9bb0a343763238bf463c8640f47b00f1. Change-Id: I11cb9a63e16e829ccd4af1096b9f473c802d822f
2018-02-22add support for flushing and destroying a server-side streamStefan Sperling2-1/+30
Introduce osmo_stream_srv_set_flush_and_destroy() which marks a stream to be 'flushed and destroyed'. No new messages will be received on this stream, and no new messages can be queued. Once the Tx queue has been drained, the connection is destroyed. The API user is given a chance to perform cleanup operations in the closed_cb() callback for the connection. The same mechanism will be added for client-side connections in a follow-up patch. Change-Id: I8ed78fe39c463e9018756700d13ee5ebe003b57f Related: OS#2789 Suggested-by: Harald Welte
2018-02-09debian/control: Fix Vcs-BrowserHarald Welte1-1/+1
Change-Id: I19049ccf6bfc100dbbeb81b80b9ff7f422ad232f
2017-12-21Enable sanitize for CI testsMax1-1/+1
Change-Id: I3a888a415698db5a11d74422f7ccb2d94126f56e
2017-12-14contrib: jenkins.sh: Disable building doxygen for depsPau Espin Pedrol1-1/+1
Change-Id: I456b539ebdb86a6a27af0bec1d44d68b407ad912
2017-11-20osmo_stream_{cli,srv}_destroy: fix mem leak: empty msgb queueNeels Hofmeyr1-0/+2
On destroying a client or server stream, deallocate any msgbs that are still pending in the queue. In libosmo-sccp, the ss7_test.c in test_as(), messages are queued and were, before this, left floating after the stream was destroyed, causing a sanitizer memory leak. This patch fixes the leak. Depends: Ia291832ca445d4071f0ed9a01730d945ff691cf7 (libosmocore) Change-Id: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639
2017-11-20gitignore: vim swp filesNeels Hofmeyr1-0/+2
Change-Id: I0013625df95c5600479953e6f83b848efadb525a
2017-11-18add --enable-sanitize config optionNeels Hofmeyr1-0/+12
Change-Id: Ie00859d981044d59b8114332884e3d7f6fc48ef7
2017-11-17stream: Avoid re-creating and leaking socket when unneededPau Espin Pedrol1-2/+6
In previous implementation, if no reconfiguring is needed, a new socket would be created without closing the old one, leaking the previous socket. Instead, if we don't need reconfiguring, we return 0 as no operation is required. Change-Id: I6c1a7fff63e44840fb5e2bc7ace5e9a61e304987
2017-11-13Add SPDX-License-Identifier + Copyright statementsHarald Welte11-1/+164
Change-Id: I43bb1c4a889421907a1a08eb29c96f2330ab00ec
2017-11-13src/rs232.c: Fix accidential reference to GPLv3+ instead of GPLv2+Harald Welte1-1/+1
Change-Id: I5fa2696c5090994c417ca882c5225cbd7c1be2c7
2017-11-13debian/copyright: There are no AGPL licensed files leftHarald Welte1-20/+0
Change-Id: I7d1bf1cdefea955b28e756419e7d90beb2535bd0
2017-11-13debian/control: Fix upstream-nameHarald Welte1-1/+1
Change-Id: Ic5f42a387525f7718097f4259bae6628b903a4ca
2017-10-28jenkins: use osmo-clean-workspace.sh before and after buildNeels Hofmeyr1-1/+4
See osmo-ci change I2409b2928b4d7ebbd6c005097d4ad7337307dd93 for rationale. Depends: I2409b2928b4d7ebbd6c005097d4ad7337307dd93 Change-Id: I6bdbd22b5f05ab75de2c6c777667bf1a63eb0b86
2017-10-28Bump version: 0.1.0 → Welte1-0/+6
Change-Id: I731fce9fd10a586c10261b23ed0f0bbcb6f3eada
2017-10-28Debian: The -dev package doesn't depend on any shared librariesHarald Welte1-2/+1
This fixes: dpkg-gencontrol: warning: Depends field of package libosmo-netif-dev: unknown substitution variable ${shlibs:Depends} Change-Id: Ic57cbc8a1876e6e5449e7dd4a73f269444dd67da
2017-10-28Don't link library against libosmogsm, we don't use any symbols of itHarald Welte2-4/+4
This fixes a related dpkg-shlibdeps warning Change-Id: I0325e7a6dea5195f1634230930570bf4dfe3810c
2017-10-27Tag/Release Version Welte4-7/+11
Short changelog: * Add Doxygen documentation * SCTP support in stream.c * new udp-test-client and udp-test-server programs * better / more verbose error handling in examples * new osmo_dgram_tx_set_local_{addr,port}() functions * use IPA definitions from libosmogsm, rather than repeating them * encode RTP header M field of RFC3550/4867 in OSMUX header * new osmo_stream_srv_link_set_nodelay() * new osmo_stream_srv_link_set_proto() * new osmo_stream_cli_set_nodelay() * new osmo_stream_cli_set_proto() * new osmo_stream_cli_set_local_addr() * new osmo_stream_cli_set_local_port() * new osmo_stream_cli_reconnect() * new osmo_stream_cli_open2() with reconnect argument * more vrebose osmux_snprintf() * remove mistaken reference to AGPL in rs232.c * fix memory leak in osmo_stream_srv_link_set_addr() * add osmo-pcap-test for SLL and Ethernet * extend osmux-test Change-Id: Ibf75fcd6643351ce3946faa155ae1db8c33a5e35