aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-05-31example: Remove call to osmo_ipa_process_msg()daniel/osmo_io-with-ipaarehbein1-5/+0
That call now happens up the call stack in IPA mode Change-Id: I53283ec7bd7f07dfa612681ae84af93d5cd098b9
2023-05-31stream: Add IPA send function/IPA-mode read to cliarehbein3-10/+28
- Also: Adapt ipa-stream-client example to work alongside new change Related: OS#5753 Change-Id: I042700af6614dd1879514dca0482e05b5ff22cb7
2023-05-31stream: Move helper functionsarehbein1-21/+21
Prepare for next commits Change-Id: I318965538e5329c44d0910694621b5e1f1db0626
2023-05-31examples: Add extension header octet to examplearehbein2-3/+7
Mainly to make data/packets look (pseudo-)correct in Wireshark Change-Id: I962b9edcba65cdc98da00d2f8753dc5acd481502
2023-05-31stream: Add IPA send function/IPA-mode read to srvarehbein3-8/+89
Also: Adapt the example to work with the new changes. Related OS#5753, OS#5751 Change-Id: I61e1fe59166c46595efe8c1f32b8f2607cb6c529
2023-05-31stream: Add osmo_io based segmentation to examplearehbein2-0/+2
Related: OS#5751, OS#5753 Change-Id: Ibf5fd3a606da7888f23e6f75cc30fe433897a97b
2023-05-31stream: Fix segmentation for clientarehbein1-0/+1
Related: OS#5753, OS#5751 Change-Id: I0ddf26e29bf0b954e5897c0776dae5eb27712fdb
2023-05-31stream: Simplify code/fix client segmentationarehbein2-6/+12
Required change: Ie45402ad8e86e3cecf75ad78a512c17e61e68b19 Related: OS#5751 Change-Id: Ie5e40d47b2bbc63b5c4a2446ea75d22a3e427354
2023-05-31stream: Fix endless loop on server on client disconnectarehbein1-0/+1
Not sure why, but select() keeps reporting read events it seems, even though the client doesn't send any packets anymore. Without this line, the server gets stuck in an endless read loop with zero bytes read because of that. Change-Id: I012ddf14ae17642a52d34026d85ab6958cf488a1
2023-05-31stream: Adapt to new changesarehbein1-4/+3
- adapt to def. of struct osmo_io_ops - eliminate compiler warnings due to change in callback signature Requires change I6a0eebb8d4490f09a3cc6eb97d4ff47b4a8fd377 Related: OS#5753 Change-Id: I5f9a5ce85efb4ed512ff6ca1f3e170d2ffb2ba22
2023-05-31stream: Add client-side (segmentation) support for IPACarehbein2-0/+13
With this commit, IPAC segmentation is taken care of by setting the protocol being streamed Depends on change I3a639e6896cc3b3fc8e9b2e1a58254710efa0d3f Related: OS#5753, OS#5751 Change-Id: I822abf52c6ae396c90b5c50228a0a39c848d3de6
2023-05-31stream: Add server-side (segmentation) support for IPACarehbein3-18/+292
With this commit, IPAC segmentation is taken care of by setting the protocol being streamed Depends on change I3a639e6896cc3b3fc8e9b2e1a58254710efa0d3f Related: OS#5753, OS#5751 Change-Id: I6c91ff385cb5f36ab6b6c96d0e44997995d0d24c
2023-05-31stream: Move some code in preparation of next commitarehbein1-57/+56
This avoids unnecessary static declarations. Change-Id: Ic3f21967fe929b17327eb95739ace16c9734a151
2023-05-31examples: Use osmo_io in {ipa-,}stream-{client,server}Daniel Willmann4-76/+19
Change-Id: I97a9979199c816686b32080534627f6f033e009e
2023-05-31Add osmo_io support to osmo_stream_cli and osmo_stream_srvDaniel Willmann2-35/+393
Change-Id: I2f52c7107c392b6f4b0bf2a84f8c873c084a200c
2023-05-31ipa-stream-server: Return -EBADF in read_cb after osmo_stream_srv_destroy()Daniel Willmann1-1/+2
This fixes a potential heap-use-after-free error. When there is still data to be written the osmo_stream_srv_cb() will call osmo_stream_srv_write() which will try to dereference conn even though it has already been freed. Change-Id: I5ac1920b8d4ce3b0205f00d253e7ed878fb745e3
2023-05-17stream: (typo) Change callback param name of struct osmo_stream_cli from srv ↵Daniel Willmann1-4/+4
to cli Change-Id: I742db401165477f85e66bb428f156ecbbd5d6665
2023-05-17stream: Introduce and use osmo_stream_cli_fd() to get the fdDaniel Willmann2-7/+14
This will become useful once osmo_io can be used as a backend. Change-Id: I7e964dea0adee8edbb9b75d2d17e7d0c5d8917d5
2023-04-25debian: set compat level to 10Oliver Smith2-2/+2
Related: OS#5958 Change-Id: Icfdbea7cbe4681cd3b286471032fd6dd7226888f
2023-03-13src/Makefile.am: do not overwrite AM_LDFLAGSVadim Yanitskiy1-1/+1
Change-Id: I7b656c167cceb0657c0362b1237f846b7f3e9770
2023-03-13tests/Makefile.am: clean up AM_* variablesVadim Yanitskiy1-2/+3
* -I is a preprocessor flag, so it should be in AM_CPPFLAGS * $(LIBOSMOCORE_LDFLAGS) is not defined here, remove it Change-Id: Ice892f848e06b601e67b06a4e1e25c11fb7c4128
2023-03-13{utils,tests}/Makefile.am: reorder libraries in LDADDVadim Yanitskiy2-17/+8
Otherwise the linker may pick system-installed libs instead. Change-Id: Ia639b1c5460ad9391d2c311b4978ca9374789f7a
2023-02-27rtp.h: add RTP_PT_CSDATAOliver Smith1-0/+2
Related: OS#4393 Change-Id: I2ea378ba4d17e977da25ef9e6e86b3de2ccd0ad7
2023-02-20fix msgb leak on OSMO_STREAM_SRV_F_FLUSH_DESTROYNeels Hofmeyr1-0/+1
In osmo_stream_srv_send(), call msgb_free() if the msgb is not enqueued. Before this, osmo_stream_srv_send() enqueues a msgb, assuming the queue will free it. But if OSMO_STREAM_SRV_F_FLUSH_DESTROY is set, it just returns and drops the msgb. There is no rc, so the caller cannot know. Change-Id: I994c5e06a9030cfbf4fca8ab42588c61f7121cee
2023-02-20Run struct_endianness.pyOliver Smith3-5/+5
Ensure there is no diff to prepare to run this in CI. Related: OS#5884 Change-Id: Ib3459ebb2414dd1798dfda6d3c585232ceff741b
2023-02-10Add osmo_stream_srv_link_is_opened()Max2-4/+15
We use file descriptor of -1 as an indicator for unopened link internally. However, since all the structs of libosmo-netif are opaque, using it from external applications looks like a leaky abstraction. Let's remedy this by adding function which properly check this for the library user. Related: OS#5568 Change-Id: I91aa7da5f09ec4e8e2d21c827b45ed92e6b0e3d9
2023-02-10osmo_stream_srv_link_close(): properly handle NULL inputMax1-0/+3
Related: OS#5568 Change-Id: Ie15bb3dc99bfe18065e03fde68d517b0d389b7ad
2023-02-07Bump version: 1.2.0.114-3804-dirty → 1.3.01.3.0Pau Espin Pedrol8-25/+147
Change-Id: Id67541378193f22f924409f02301f0063aab639e
2023-01-03osmo-amr-inspect: Improve robustness reading from stdinPau Espin Pedrol1-5/+11
Fixes printing hexbuf which might not have been null-terminated. Related: SYS#6161 Fixes: Coverity CID#302068 Change-Id: I460f1deb7455b3b6a85a090bdcad8e21a883db68
2022-12-22Introduce utils/osmo-amr-inspect program2023q1Pau Espin Pedrol5-1/+342
This program allows inspecting a list of AMR PDUs in hexstring format present in a text file. This allows easily finding out the properties of the PDU as well as finding potential errors on the data. It also allows forcing decode in different formats (octet-aligned, bandwidth-efficient) in order to detect which may be the correct one. Related: SYS#6161 Change-Id: Iffa6cc2e5391b77e3097d4c3b8d3f5211427dbe2
2022-12-21amr: osmo_amr_bwe_to_oa(): validate input data is long enoughPau Espin Pedrol1-0/+2
Change-Id: I2d11ce71c29ae046c2feab1e59045d97dc3e5099
2022-12-21amr: use OSMO_BYTES_FOR_BITS()Pau Espin Pedrol1-3/+3
Change-Id: Ib92856ede3f493615c24d883954989e952c51157
2022-12-21amr: Clarify size of AMR BWE header and ToCPau Espin Pedrol2-4/+8
Change-Id: I34c76b18ee45e12dba92864715e8ef91e6de3b01
2022-12-21amr: use struct bwe_hdr in osmo_amr_bwe_to_oa()Pau Espin Pedrol1-8/+15
The header conversion is now much clearer. Take the chance to delay the memset(buf) after the checks. Change-Id: I5042dc628ac70eca62b4980f4acae991dd976528
2022-12-21amr: constify input buffer in osmo_amr_is_oa()Pau Espin Pedrol2-2/+2
Change-Id: I72ef6fc700f628ea158ea888a5f1e9dc8776ab7e
2022-12-21amr: Add missing header stdbool.hPau Espin Pedrol1-0/+1
Change-Id: I84e447960c4912147d2f3a6170393370d354625b
2022-12-21amr.h: Fix AMR_FT_{GSM,TDMA,PDC}_EFR_SID_LENPau Espin Pedrol1-13/+13
Fixes: 678c7fc8fe4fd11e09ccd642ad60c10c365bd19a Change-Id: I63c8082bec12bf81760330d1fc0b13de23ac6a24
2022-12-20stream: Fix tx data dropped upon show socket writePau Espin Pedrol1-12/+22
On some stream socket types like TCP it is expected that the send() syscall may return a short write, ie not all bytes being copied to the socket. In that case we need to keep the bytes not copied and attempt to submit them later. Related: OS#5836 Change-Id: I3755aada02ceb186fb990604e3496126fe47e1fb
2022-12-20stream: Avoid useless polling if tx_queue becomes emptyPau Espin Pedrol1-2/+10
Before this patch, the WRITE poll flag was being left ON and waited to be polled again by the kernel in order to disable it. Let's spate that extra polling cycle which only creates more polling triggers, context switches, etc. Change-Id: I1dd2145249a7322ad95e49be588fd472f00734e1
2022-12-20stream: Log error on short sendPau Espin Pedrol1-0/+4
This is clearly a problem on TCP streams which needs to be addressed in the future. Related: OS#5836 Change-Id: I9bd257b80a378b779df84e204673f8e394eca5b6
2022-12-20stream: osmo_stream_*_write: Unifiy way to get data and lengthPau Espin Pedrol1-6/+6
Change-Id: I5b5d6f7a5a1722bd01c13d32557c21d8a0889966
2022-12-20stream: Log read/write flagsPau Espin Pedrol1-1/+1
Change-Id: I57b064fa0498be76579ae9597ab9217d659aae41
2022-12-19osmux: Allow forwarding AMR NO_DATA framesPau Espin Pedrol2-5/+9
Related: SYS#6161 Change-Id: If8baebc532090ba9808af7f3dd0afec86f40a7d6
2022-12-19amr: Support all SID and NO_DATA amr formatsPau Espin Pedrol4-58/+93
Related: SYS#6161 Change-Id: I0e766b3231f03ea87d89fad6ecdce3bd14769054
2022-12-19tests/amr: Add test case for unused FT=14Pau Espin Pedrol2-1/+11
FT=15 will be accepted in follow-up patch, so keep a tests checking the invalid FT code path. Change-Id: I5872921f5d4a909261e770ddecf048329200724b
2022-12-19amr: Add struct definition for AMR BWE headerPau Espin Pedrol1-0/+28
Change-Id: I4b44257605bc5967d862ee29076ea6260d9a6bd8
2022-12-19amr: osmo_amr_bwe_to_oa() define variable as unsignedPau Espin Pedrol1-1/+1
There's no need to have the variable as signed anymore since the loop was modified in the previous patch. osmo_amr_bytes() returns a size_t (unsigned). Change-Id: I8aa6b5f6d3334e152a62b7c28aac3f881f027894
2022-12-19amr: osmo_amr_bwe_to_oa(): Modify loop to allow osmo_amr_bytes()=0 (NO_DATA)Pau Espin Pedrol1-4/+4
oa_payload_len can be 2 if osmo_amr_bytes() returns 0 (it will return 0 when FT NO_DATA is supported). In tha case, the loop condition (oa_payload_len - 3) (signed) is compared against unsigned i which ends up accessing i=256. Change-Id: I1e513f493d7883a03acbfa3d9744ec63657810b3
2022-12-19amr.h: Fix missing include dependenciesPau Espin Pedrol1-0/+3
Needed for size_t uint8_t, etc. Change-Id: Ia808c2b6c426de79db5c88784dd7bce6096179aa
2022-11-24osmux_output: Refactor init code to avoid calling deprecated APIs internallyPau Espin Pedrol1-13/+16
Current internal use of APIs marked as deprecated seems to be causing issues when building on debian unstable. Simply rearrange the init code to an internal helper function to avoid code duplication while still keeping the old deprecated APIs working as they used to, without getting deprecation warnings at buildtime. Related: OS#5677 Change-Id: Ie8e168740c0421edd96013620256aab0306dc6c5