Age | Commit message (Collapse) | Author | Files | Lines |
|
Notify user about read errors, similar to what is supported in the
earlier ofd cb backend of osmo_stream_cli/srv:
https://osmocom.org/issues/6405#note-15
Related: OS#6405
Fixes: 5fec34a9f20c3b8769373d1b28ae2062e5e2bdd6
Fixes: 0245cf5e07855abea72693272c55b50b5a93aff4
Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
|
|
Change-Id: I86fc159d928fc7ebce2f771670c5a198c52f5fc0
|
|
In order to detect memory leaks while debugging, stream server/client
and keyboard is closed on exit.
Related: OS#5753
Change-Id: I9dbb7f46b2a798e88ad4df8ff73c6ee40c07b843
|
|
Also the example client/server must not access msgb after sending it,
especially if the msgb got freed due to a failure.
Change-Id: I627a71b4f0183cd83835c328a5cdd67a413ae614
|
|
This can help with memleak debugging.
Change-Id: Ia16632602b937db88e2da2b053192887bdb8a986
|
|
This helps to test connections via a network and failing connections.
The client may add "-r <peer>" to the command line, to set the address
of the remote peer.
The server may add "-l <peer>" to the command line, to select address
of local peer.
By default "127.0.0.1" is used.
Change-Id: Ie6da55ef248436e521c5d8f21f8053356c46a114
|
|
Change-Id: I4137cdf1e21cb669b632fe5c126ec27475d98400
|
|
Related OS#5753, OS#5751
Change-Id: I61e1fe59166c46595efe8c1f32b8f2607cb6c529
|
|
With this commit, IPA segmentation is taken care of by setting the
segmentation callback provided by libosmo-netif.
The ipa-stream-server example needs to prepend IPA headers now because
those are stripped by the segm. cb on both sides.
Depends: libosmocore.git I3a639e6896cc3b3fc8e9b2e1a58254710efa0d3f
Related: OS#5753, OS#5751
Change-Id: I822abf52c6ae396c90b5c50228a0a39c848d3de6
|
|
With this commit, IPA segmentation can be taken care of by setting
the segmentation callback osmo_ipa_segmentation_cb().
Depends: libosmocore.git I3a639e6896cc3b3fc8e9b2e1a58254710efa0d3f
Related: OS#5753, OS#5751
Change-Id: I6c91ff385cb5f36ab6b6c96d0e44997995d0d24c
|
|
Mainly to make data/packets look (pseudo-)correct in Wireshark.
Also: Add helper for allocating message buffers with extended headroom for IPA.
Change-Id: I962b9edcba65cdc98da00d2f8753dc5acd481502
|
|
It was later decided that since setting a name is not really required,
it is best to leave it out of the create() function and let the user use
the osmo_stream_srv_set_name() API if needed (otherwise a dynamic name
based on socket is selected)
Change-Id: I5d677ef57b7db0aedd8c43282568c845097cb12b
|
|
It was later decided that since setting a name is not really required,
it is best to leave it out of the create() function and let the user use
the osmo_stream_cli_set_name() API if needed (otherwise a dynamic name
based on socket is selected).
Change-Id: I2a2fad318ef22c2ac117f95588a078ca3beccea5
|
|
Change-Id: I8c37bbe3db9823a399773d6790000ba508e79377
|
|
Change-Id: I97a9979199c816686b32080534627f6f033e009e
|
|
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
|
|
Change-Id: I7f3f8d40f89ffdd135a73316ee60fd429ba2a5b0
|
|
Until now, the osmux_out_handle was allocated by the client, and passed
to the API to initialize it. This makes it really hard to improve the
implementation without breaking the ABI.
Let's break the ABI now one last time (hopefully) by allocating the
struct through an API. With only this change, the already built users
(osmo-mgw, openbsc) can still work fine, since there's no change on the
struct osmux_out_handle. However, they will somehow break next time the
struct is changed until they are ported to the same API (easy to do).
Related: OS#5987
Change-Id: Ie8df581f375c9a183a7af60b431561bda82f6e34
|
|
Change-Id: I408bfc84b9c1740df946fa29191f0e286f5b46e1
|
|
The only reason we have a libosmo-netif -> libosmo-abis
dependency is the lapd examples whihc are built but not even installed.
Let's build those only if --enable-lapd-examples is specified at the
command line, and remove the dependency to libosmo-abis in all other
cases.
Change-Id: Ida8157cd9111b196e4bf08782c45d0e3d393f1c9
Closes: OS#4726
|
|
Change-Id: Ifb90e00036cc51ef02f3cf4dda1ff7dcd1f8a5b5
|
|
We have functions to help with/abstract the nodelay settings so use
those.
Change-Id: Icb143c6e5fc3063f942a744deb576865674a4c62
|
|
New define is available since libosmocore 1.1.0, and we already require
1.3.0, so no need to update dependenices.
Let's change it to avoid people re-using old BSC_FD_* symbols when
copy-pasting somewhere else.
Change-Id: I269690c1c9e4d19b5b69eef206b95e71f7931188
|
|
It's similar to connect_cb() but called once client has been
disconnected.
Change-Id: I905adb2d6191216551a3bcdcd1aec1f96f01612a
|
|
Likely a copy-paste error from corresponding client example code.
Change-Id: I47cc8c7340eb188d85a49d4f41c295bed0e1bee4
|
|
Add functions to get the description of a server link or client
connection which examine data on corresponding socket.
Those functions use static buffers and intended for single use in
log/printf statements as illustarted by corresponding example changes.
Change-Id: If9a8e211da85956781479862a63c4fc6e53ed6be
|
|
Display socket information for accepted client.
Change-Id: I5aa6757be79754cf7ffa4a276dae1cfb80fe904e
|
|
Stream server example had an error which resulted in infinite loop on
client disconnect. Fix this by properly handling client closing
connection to allow it to reconnect multiple times.
Change-Id: Icfc2cf7f971b9e3a4abc34cc18d8a44c811c5617
|
|
Make client and server examples more verbose by logging actual bytes
sent/received.
Change-Id: I6979b2f92c96c2366f18bf31e4bc495a6709133a
|
|
Set category filter to make sure internal library logging won't
interfere with example's own logging. It's also nice example
illustrating log_set_category_filter() usage.
Change-Id: I17d7878d302f011d8ff0d86708d677f5b559299e
|
|
In libosmocore Change-ID I1834d90fbcdbfcb05f5b8cfe39bfe9543737ef8f
we have introduced ipa_ccm_id_resp_parse() as a bugfixed replacement
of ipa_ccm_idtag_parse().
The main difference is that the returned "value" parts now have
a correct reported "length", whereas before this commit they all
reported a one-byte too-long "length" for each IE.
Let's use this opportunity to remove the copy+pasted
osmo_ipa_idtag_parse() function from the libosmo-netif codebase.
Change-Id: I4626d247626543e032593bf226b6c233f6678562
|
|
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
|
|
Change-Id: Ie69c427308eb7d81aedab7fbb71f1bdaf43f0275
|
|
Change-Id: I7f1f4503f254931edeebfbadf3953efa7b20f85f
|
|
In addition to showing basic UDP send/receive example, it helps to test
corner-case when dealing with 0-length UDP packets.
Change-Id: I08c0adf1cf9b6a6f1f7090b237d0497c2ec13cdf
Related: OS#2219
|
|
Fixes: CID#57922
Change-Id: Ibaafdd49d9446a12fe7d0e2f5b2039da3ffc7ea9
|
|
This lead to compiler warnings on FreeBSD, as setsockopt() is undefined.
Change-Id: Ie0ee3e48adfd0cd252703ec020cef28cf76ca223
|
|
memcpy
Change-Id: Id962821c71b3a1c4c01c1131eb809b8ec8eaa062
Fixes: Coverity CID 57859
|
|
Change-Id: I1b5fa97d14e69ff502b6deba0fd898a01e53420f
Fixes: Coverity CID 57633
|
|
Change-Id: If40e85600ca1dfbda5975d7aa92cccdb11f9c34d
Fixes: Coverity CID 57632
|
|
lapd-over-datagram-network.c:38:12: warning: ‘sapi’ defined but not used [-Wunused-variable]
static int sapi = 63, tei = 0;
^~~~
Change-Id: If367deb0e0d7d5e031db2bd905179263d18703f0
|
|
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
|
|
|
|
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.
|
|
|
|
This variable is never set and could therefore be removed.
|
|
|
|
Instead of using the osmuxh->circuit_id.
|
|
Useful for debugging purposes. Modify also examples to use it.
|
|
|