Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I43bb1c4a889421907a1a08eb29c96f2330ab00ec
|
|
Change-Id: Ied83e6b117a420d734a88e3aff925a874c3dd520
|
|
Change-Id: Ic9557c6519b44b5985daf7d2d14ec063790441fb
|
|
Previously recv() returning 0 for UDP socket was considered as error
although it's legitimate return value for empty UDP packets. Relax the
error check to avoid confusing error messages.
The function behavior is the same:
* msg is not altered while receiving 0-length UDP packet
* return value is 0
The only result of the relaxed error check is the absense of error log
message for 0-length UDP packet.
Change-Id: I32e5fcbf5ed92cc923660ac59e6a37fd3f0703a7
Fixes: OS#2219
|
|
We couldn't figure out what "crx" as supposed to mean and assume
it is a typo. Fix the code and call it ctx, this is fixing the
API documentation as well.
Change-Id: I27ed1178fdbbcf3fc0e1070dc19b4ecf9a327a04
|
|
* when using osmo_*_destroy(), always call *_close() internally to
make sure we don't free memory holding references to sockets that are
still open
* when closing the socket, always make sure to set the fd to -1 in all
cases, to avoid attempts to avoid later close() on a new file using
the same fd number as the socket closed previously.
Change-Id: I29c37da6e8f5be8ab030e68952a8f92add146821
|
|
during osmo_*_set_addr(), we must make sure to talloc_free() any old
address before copying in the new address. Not all functions did this,
and those that did implemented it manually. Let's use
osmo_talloc_replace_string() which is exactly intended for this case.
Change-Id: Ie1b140a160c66e8b62c745174865d5ba525cb2c2
|
|
This uses the new osmo_sock_init2() features introduced in libosmocore
Change-Id Idab124bcca47872f55311a82d6818aed590965e6 to bind *and*
connect a given socket during creation.
Change-Id: I013f4cc10b26d332d52d231f252bb0f03df8c54b
|
|
We should have doxygen documentation for all libosmo-* APIs.
libosmo-netif is currently devoid of any API docs. Let's start with the
stream and datagram socket related functions.
Change-Id: I589a5e60d9df2b8a65fbaf68f80e3ae0039d8c2a
|
|
|
|
|
|
%s/_conn_/_/g
%s/_conn//g
%s/_server_/_tx_/g
%s/_client_/_rx_/g
%s/_SERVER_/_TX_/g
%s/_CLIENT_/_RX_/g
%s/_RECONFIG/_RECONF/g
|
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
We provide osmo_dgram_conn_recv(...) which allows you to take control
on the message allocation and receival process. Instead of hiding this
details inside the datagram infrastructure.
Providing more control to clients of this code means more flexibility.
|
|
We allow to change the callback and data pointers in runtime safely
without the need to reconfig.
|
|
This removes spamming message that is currently displayed with
LOGL_NOTICE loglevel.
|
|
This patch changes the prototype of osmo_dgram_conn_set_read_cb.
Now it takes one callback to a generic struct osmo_dgram_conn
instead of osmo_dgram_server_conn. This is useful in case that
you want to reply to one message using the datagram socket (without
this change is not possible).
|
|
This patch allows you to call dgram_*_open(..) as many times as
you want to trigger reconfigurations.
|
|
Modify examples as well to use the new API.
|
|
This patch adds new datagram socket infrastructure and it reworks
the previous examples (now it's LAPD over datagram).
|