1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

24 Commits

Author SHA1 Message Date
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Marian Buschsieweke
f0ba796e5d
sys/net/sock: add sock_aux_rssi
Allow accessing the RSSI value of received UDP datagrams / IP packets with the
sock API.
2021-01-13 13:29:13 +01:00
Marian Buschsieweke
ebcf1c0ab4
net/sock_ip: Extend API for auxiliary data 2020-12-02 17:56:13 +01:00
Martine S. Lenders
f9e17ac025
sock: amend API to iterate over stack-internal chunks
With lwIP we have a chunked UDP payload, so just providing the
stack-internal buffer is not possible. To be able to iterate over such
a chunked payload, this change allows the `sock_*_recv_buf()` functions
to use the internal buffer context as an iteration state.

As the internal buffer space can be released when the function would
return 0, `sock_recv_buf_free()` becomes unnecessary.
2020-04-01 15:50:46 +02:00
Martine S. Lenders
a7d468988d
sock: amend with zero-copy receive functions
This change amends the `sock` API by a set of functions to `sock` that
allow provisioning of stack-internal buffers to the caller on receive.

This allows to cover two use-cases

1. Zero-copy systems: if the stacks supported the buffer space provided
   by these functions can be the same that was filled in the link-layer
2. asynchronous receive within a wrapping sock layer (e.g. `sock_dtls`
   wrapping `sock_udp`): to receive packets of the lower level protocol
   asynchronously, the wrapping implementation layer would currently
   need to allocate its own buffer space, introducing a third buffer
   space in addition to the one of the application and the network
   stack. For a wrapping layer this is undesirable.

While there are security considerations exposing stack internal memory
space to the caller, I believe they are minor, as in the end the
application developer is the person in control of the node.
2020-03-24 14:02:36 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Martine Lenders
f0b5eb04c1 sock: initial import of asynchronous event definitions 2019-10-30 13:23:31 +01:00
Aiman Ismail
fed72571ec sys/net/sock: add sock_dtls API 2019-08-27 16:41:39 +02:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
Cenk Gündoğan
b8a6d0e500 doc: sock: fix broken markdown link 2016-12-27 13:53:25 +01:00
2b1cd628a9 sys: net: sock: add uint32_t ipv4 address to address union 2016-11-13 12:18:12 +01:00
Martine Lenders
6d5fdbfa1c sock: document byte order for port 2016-10-31 10:53:26 +01:00
Martine Lenders
9e6b7e8dbf sock: change IPv4 address type to array 2016-10-31 10:53:26 +01:00
aace13624b sock: change "no timeout" value from 0 to UINT32_MAX 2016-10-12 15:19:16 +02:00
Martine Lenders
f4d39274fb sock: doc fixes 2016-10-04 17:22:54 +02:00
Martine Lenders
d17ef910f0 fixup! sock: Introduction of new application layer API
Include missing header
2016-09-02 18:59:34 +02:00
Martine Lenders
26ee7248d5 fixup! sock: Introduction of new application layer API
Fix inheritence of _sock_tl_ep.
2016-08-23 00:36:39 +02:00
Martine Lenders
877cad9d66 fixup! sock: Introduction of new application layer API
Simplify static intializers.
2016-08-22 22:28:19 +02:00
Martine Lenders
1f74eae424 fixup! sock: Introduction of new application layer API
Fix some typedefs
2016-08-22 17:03:52 +02:00
Martine Lenders
278f046d1d fixup! sock: Introduction of new application layer API
Don't use netif parameter for static IP end-point initializers
2016-08-20 02:35:47 +02:00
Martine Lenders
bb7736ac97 fixup! sock: Introduction of new application layer API 2016-08-19 17:43:42 +02:00
Martine Lenders
b24d9de9ae fixup! sock: Introduction of new application layer API 2016-08-19 17:36:58 +02:00
Martine Lenders
01b0975072 fixup! sock: Introduction of new application layer API 2016-08-19 16:52:06 +02:00
Martine Lenders
7ef177a8cb sock: Introduction of new application layer API
This introduces a new alternative and better API to `conn`. It differs in the
following aspects:

* a common address type for both IPv4 and IPv6 addresses is introduced
* communication end-points are abstracted as end-point types `sock_x_ep_t`,
  containing the address, its family, its port (if required for protocol) and
  the interface identifier.
* All functions require some kind of state. Sending of datagrams to the same
  source or replying to incoming datagrams is thus simplified
* TCP connection establishment was overall reworked: connected sockets and
  listening sockets are now two distinct types. An accept on a listening socket
  than yields a connected socket
2016-08-18 12:25:41 +02:00