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
|
|
The amount and complexity of callbacks is increasing over time.
Use typedefs to define each of them so that callbacks:
- Are easier to identify (which types is used where)
- Are easier to document (have a 1st class place to write doxygen
documentation)
Change-Id: Ib0c4a9713fa4c755e457b8c2cbde6a7724d36e28
|
|
* make sure datagram.h is part of the group
* don't expose private #defines from C files to API documentation
Change-Id: I64a9ee3306bcc01ba785da476aea581ce31150bd
|
|
Let's make sure
* only exported / user-relevant #defines appear in the manual
* deprecated functions are marked in a way doxygen can mark them
* descriptive comments are using doxygen syntax
Change-Id: I5af0133322ddd5345a13380f1c007474c0bea117
|
|
Using this, a user can obtain the osmo_io_fd, for example in order to
perform configuration like osmo_iofd_set_alloc_info() or
osmo_iofd_set_txqueue_max_length().
Change-Id: Ie19c8294ddb12dfe5e0fd44e047c47e6f9cbd384
|
|
This provides us with proper logical separation between client and
server in the documentation.
Change-Id: I9e037fedaecb78396f435577b1652284b4951ded
|
|
Change-Id: I1196c3b035f495c5dbaa4d47ce3f79a08d0727f2
|
|
This allows a user setting a name on the underlaying stream which
in turns allows easily identifying the socket.
Change-Id: Iba683e4d65e0aba81e13bdf1b9d5a9065b1fc89c
|
|
This allows users to retrieve a previously set name.
Change-Id: If5054d3c207f8f5d58a448f1e58266ad9c4386dd
|
|
Let's enable the OSMO_IO_FD_MODE_RECVMSG_SENDMSG mode for SCTP
sockets, allowing OSMO_STREAM_MODE_OSMO_IO to be used with SCTP.
Change-Id: I6cf5bad5f618e71c80017960c38009b089dbd6a1
Depends: libosmocore Change-Id: I89eb519b22d21011d61a7855b2364bc3c295df82
Closes: OS#5753
|
|
Similar to what osmo_stream_srv_link and osmo_stream_cli already have.
Change-Id: I171befd1fdf40c3cbb3fc7e4c3eedf82128b0712
Related: SYS#5580
|
|
This can be used by apps retrieving struct sctp_status through
getsockopt(SCTP_STATUS).
The relevant field is spinfo_state: osmo_sctp_sstat_state_str(st.sstat_state);
Change-Id: Id7d8a9ad7b32406ac603e520b33809d7ae5c762f
Related: SYS#6636
|
|
This can be used by apps retrieving struct sctp_paddrinfo through
getsockopt(SCTP_GET_PEER_ADDR_INFO).
The relevant field is spinfo_state: osmo_sctp_spinfo_state_str(pinfo.spinfo_state);
Related: SYS#6636
Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f
|
|
osmo_stream_srv and osmo_stream_cli already had that API introduced in
order to use it instead of *_get_ofd(), since the later will eventually
be deprecated due to incoming osmo_io.
Change-Id: I1bd3f790d93af74c150938a59108b882ad2820f3
|
|
The old osmo_stream_{cli,srv}_get_ofd() API only works for streams
in OSMO_FD mode. However, it is legitimate for an application
wanting to get low-level access to the file descriptor, for example
to issue some {get,set}sockopt() calls on it.
Change-Id: Ib0737f21150f6ac8d524b92c7ddb098f2afdeaab
Related: OS#5753
|
|
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
|
|
Somehow gcc doesn't always warn about this rule being broken.
We are breaking the strict aliasing rule here and libosmo-netif
currently does not make use of the '-fno-strict-aliasing' flag.
It's possible that this has also been causing nondeterministic
timestamps in libosmo-netif stream tests every once in a while.
Related: OS#6164, OS#5753
Change-Id: Ibed543cdfcdda8c0256ce7d8818ff96d6d46e9b0
|
|
values
This will allow osmo_stream users (like libosmo-sccp) to set
SCTP_INITMSG related parameters, like number on inbound/outbound
streams, connect attempts, connect timeout.
Related: SYS#6558
Change-Id: I5343c7659881b29e0201e72badbc2d07e1ef2dca
|
|
This will allow extending capabilitites to set different parameters at
the lower layers as we need them.
This commit changes the behavior of osmo_stream_{cli,srv_link}: It now
doesn't enable by default SCTP AUTH/ASCONF features using setsockopt. It
is left up to the user of the API (libosmo-sccp in this case) to set it.
Since this unilateral use of setsockopt() has only been added recently
and we didn't release yet, it's fine changing it. libosmo-sccp will be
changed to unconditionally set its using setsockopt. It is left up to
the user of the API (libosmo-sccp in this case) to set it.
Related: SYS#6501
Related: SYS#6558
Change-Id: I2607c1c926a625986cd851adc65dd8b4de83d6ab
|
|
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
|
|
*Move the helper function to stream.c and pass a logging prefix string
so that it can be used by both client and server.
* Adapt log level based on message type.
* Rework logging code to log everything in one line
Change-Id: I0ed84cc2effb71b6ef1f6efb3f8b663c602a5a31
|
|
The event was enabled but was not being logged.
Change-Id: I49f5a648fd474e320101424fb6873a37442339bf
|
|
Change-Id: Iae325b787fdb7fc95aa6922975a7e1fcf368527a
|
|
Related: OS#5753
Change-Id: I87ef4c7023126b783dd79e7ed47be31e1b76f975
|
|
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
|
|
The dev/user in general is only interested about one side of the stream
when looking at the code. Since the stream.c file is tarting to be quite
large/bloated, this patch splits its content into stream_cli.c and
stream_srv.c to make it easier to improve/extend and review.
Keep common code between cli and srv in stream.c, and add a private header
to contain references to it.
Change-Id: I22af01bba2040eb320ba48fd1b46c090c98be159
|
|
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
|
|
Depends: libosmocore.git Change-Id If2772a3ccaa98616e0189862a49ab0243435e343
Change-Id: I539a0d29d11348efe702f971965a55cf56db5c59
|
|
Change-Id: I2f52c7107c392b6f4b0bf2a84f8c873c084a200c
|
|
Change-Id: I12d74e9b407f1ea7af83fb3ec4d03ad7228a27cf
|
|
Related: OS#4393
Change-Id: I2ea378ba4d17e977da25ef9e6e86b3de2ccd0ad7
|
|
Ensure there is no diff to prepare to run this in CI.
Related: OS#5884
Change-Id: Ib3459ebb2414dd1798dfda6d3c585232ceff741b
|
|
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
|
|
Change-Id: I34c76b18ee45e12dba92864715e8ef91e6de3b01
|
|
Change-Id: I72ef6fc700f628ea158ea888a5f1e9dc8776ab7e
|
|
Change-Id: I84e447960c4912147d2f3a6170393370d354625b
|
|
Fixes: 678c7fc8fe4fd11e09ccd642ad60c10c365bd19a
Change-Id: I63c8082bec12bf81760330d1fc0b13de23ac6a24
|
|
Related: SYS#6161
Change-Id: I0e766b3231f03ea87d89fad6ecdce3bd14769054
|
|
Change-Id: I4b44257605bc5967d862ee29076ea6260d9a6bd8
|
|
Needed for size_t uint8_t, etc.
Change-Id: Ia808c2b6c426de79db5c88784dd7bce6096179aa
|
|
This will be used internally by osmux code to print more meaningful
lines.
Related: SYS#6161
Change-Id: Ibbcfdb23a6015ce45840bb64b2b560c2806f7ff6
|
|
This allows easy access to osmux_hdr payload.
Change-Id: I27750c38f12d3d84dbaac5beff166d78ffa6c45b
|
|
Related: SYS#6113
Change-Id: Iecb0a4bc281647673d2930d1f1586a2df231af52
|
|
The param is already "cli" in the .c file.
Change-Id: I7e1e9902a39655e57e28d38a222bca850dd7de0e
|
|
Related: SYS#6113
Change-Id: Ieebc6e623874b4770ec7cd8b934244ffecaa089d
|
|
This API allows retrieving back the private pointer set previously by
osmux_xfrm_input_set_deliver_cb().
Change-Id: I95433b18802f73fa70e758f4aa02128eee940d88
|
|
Until now, the osmux_in_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, openbsci, osmo-bts) can still work fine, since there's no
change on the struct osmux_in_handle. However, they will somehow break
next time thestruct is changed until they are ported to the same API
(easy to do).
Change-Id: I752ab031f935f04731bb1a354333f1682a1aa5bd
Related: SYS#5987
|
|
It was not being used anywhere, yet older applications used to set it
(always to 0, which was the default value applied internally).
Let's make use of it and apply it as first seqnum to be used on a
circuit.
This value is applied upon call to osmux_xfrm_input_open_circuit(),
hence it can be set independently for every new circuit.
Change-Id: Ia26fcba5d7364a5744b2d64d0542a2b3880eee34
|