1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 17:43:51 +01:00

1805 Commits

Author SHA1 Message Date
Marian Buschsieweke
5387c20dde
sys/net/nanocoap: Make APIs (more) transport agnostic
This changes the API of nanocoap with the goal to reduce the expose of
UDP specifics in the API. The plan is to eventually support transports
such as CoAP over TCP and CoAP over WebSocket directly in nanocoap
while sharing most of the code, as e.g. the CoAP Option processing
remains identical. Specifically, the plan is to unlock a transport with
modules and introduce overhead for dispatching to specific transport
only when multiple transports are actually in use.

Support for OSCORE directly in nanocoap is probably not sensible, as
the serialization is very much unlike the other transports. A unified
CoAP API for multiple transports including OSCORE is probably best
implemented on top. But when limited to the boring set of CoAP
transports, we probably can support them well with nanocoap with less
overhead.

Breaking API Changes:
=====================

- `coap_parse()` now returns `ssize_t` instead of `int`
    - This function is not really user facing, so the impact should
      be limited
    - This is useful for stream transports where the buffer may
      contain data of more than one packet. The return value contains
      the number of bytes actually consumed, which will match the
      buffer size for non-stream transports.

API Changes:
============

- `coap_pkt_t` now contains a `uint8_t *buf` pointer instead of a
  `coap_hdr_t *hdr` pointer to the beginning of the buffer
    - This will also work when the buffer is used by non-UDP
      transports
    - A deprecated `coap_udp_hdr_t *hdr` has been crammed into
      an unnamed `union` with `uint8_t *buf`. For architectures
      where pointers have the same memory layout regardless of type
      (e.g. all of the supported ones), this will make `hdr` an
      alias for `buf`.
    - The alias will only be provided if no transport besides UDP is
      used in nanocoap. So existing apps will continue to work, new
      apps that want to support other transports need to move to
      adapt.
- `coap_hdr_t` has been renamed to `coap_udp_hdr_t`
    - A deprecated alias was created for deprecation
- `coap_hdr*()` functions have been deprecated
    - Equivalent `coap_pkt*()` functions have been created that work
      on `coap_pkt_t *` instead of `coap_hdr_t *`
    - If non-UDP transports are used, the deprecated `coap_hdr*()`
      will probably not be exposed to avoid footguns.
- `coap_build_hdr()` has been renamed to `coap_build_udp_hdr()` and
  that works on an `uint8_t *` buffer with a given length, rather than
  on a `coap_hdr_t *` with a *figers crossed* length
    - a deprecated `coap_build_hdr()` function was added that calls
      to `coap_build_udp_hdr()` and has the same signature, so that
      users have time to update
2025-11-10 17:28:41 +01:00
Benjamin Valentin
606f9bd4e6 examples/networking/dtls/dtls-echo: fix copy & paste error in readme 2025-10-29 16:14:15 +01:00
Benjamin Valentin
48ca993188 examples: fix wrong GNRC paths in documentation 2025-10-29 15:13:22 +01:00
Benjamin Valentin
88bd202031 treewide: adapt GNRC example paths in documentation 2025-10-29 15:10:43 +01:00
Benjamin Valentin
99a121b474 examples/networking/gnrc: remove gnrc prefix from folder names 2025-10-29 14:56:37 +01:00
crasbe
5c469ec886 examples: update Makefile.ci with stm32c0116-dk & stm32c0316-dk 2025-10-20 14:57:03 +02:00
Ann🐸
e46e3ac6b3
Merge pull request #21792 from LasseRosenow/doxygen-deprecate-getting-started
doc: deprecate Doxygen `Getting Started` and add CoAP guide
2025-10-15 13:45:10 +00:00
Lasse Rosenow
6332834ccc
doc/guides: add coap guide
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: Ann🐸 <git@annsann.eu>
2025-10-15 14:52:38 +02:00
Jason Parker
e6e6b11caf boards/nucleo-c071rb: add support 2025-10-10 12:43:17 +02:00
Teufelchen
0d5e3f056a
Merge pull request #21397 from benpicco/hostnames
net/hosts: add module for static hostname definitions
2025-10-06 09:29:28 +00:00
Lasse Rosenow
f5b814437c
doc: standardize capitalizations and fix urls 2025-09-23 18:19:14 +02:00
Lasse Rosenow
05f533a2a9
examples/guides: reformat guides code 2025-09-23 18:19:14 +02:00
Benjamin Valentin
d1b83cdcf1 examples/gnrc_border_router: enable hostnames 2025-09-11 19:16:03 +02:00
Gregory Guche
8dc500703b pkg/xipfs: add XIPFS as vfs module 2025-07-23 12:44:38 +02:00
Mikolai Gütschow
65e52012e4
examples: fix typos in refs to gnrc_border_router 2025-07-17 13:58:19 +02:00
crasbe
d8de73b1f4
Merge pull request #21600 from Teufelchen1/remove/gomach
net/gomach: Remove deprecated GoMach module
2025-07-14 18:32:52 +00:00
Teufelchen1
f027626f3c net/gomach: Remove deprecated GoMach module 2025-07-14 13:18:20 +02:00
Teufelchen1
23a5ff6b4d treewide: Update Rust dependencies 2025-07-14 11:18:14 +02:00
crasbe
cb9c55ae3c
Merge pull request #21591 from krzysztof-cabaj/examples_change_to_SPDX
examples: move licenses from headers to SPDX format
2025-07-10 21:23:32 +00:00
krzysztof-cabaj
b3033889ac examples: manual addition of SPDX licenses in other file types 2025-07-10 22:06:44 +02:00
krzysztof-cabaj
4e56a90b40 examples: manual addition of SPDX licenses in Rust code 2025-07-10 22:06:44 +02:00
krzysztof-cabaj
595feaca69 examples: manual addition of SPDX licenses in Python code 2025-07-10 22:06:44 +02:00
krzysztof-cabaj
1f0490ccce examples/lang_support: change license to SPDX 2025-07-10 22:06:44 +02:00
krzysztof-cabaj
f725c6f07d examples/networking: change license to SPDX 2025-07-09 15:51:49 +02:00
krzysztof-cabaj
3db74e1a00 examples/advanced: change licence to SPDX 2025-07-09 13:31:54 +02:00
krzysztof-cabaj
e12c7b80c4 examples/basis: change license headers to SPDX 2025-07-09 13:23:02 +02:00
mguetschow
fc3acd4203
Merge pull request #21390 from carl-tud/unicoap-01-parser-message
net/unicoap: Unified and Modular CoAP stack: Parser and Message APIs (pt 1)
2025-07-09 00:02:32 +00:00
Carl Seifert
0db81c5de7 examples/unicoap_message: add demo of message APIs 2025-07-08 22:41:39 +02:00
Gunar Schorcht
02c0f48096
Merge pull request #21522 from gschorcht/cpu/esp32/add_esp32h2
cpu/esp32: add ESP32-H2 support
2025-07-08 19:26:41 +00:00
Gunar Schorcht
986cda8167 examples/gnrc/mqtt/paho-mqtt: disable WiFi for ESP32-H2 2025-07-04 13:51:33 +02:00
mguetschow
52db3b8ecc
Merge pull request #21512 from netd-tud/psa-hash-headers
sys/psa_crypto: Rework Headers
2025-06-30 09:06:36 +00:00
Fabian Hüßler
5222ef5512 examples/gnrc_lorawan: simplyfy configuration a bit 2025-06-27 14:39:21 +02:00
crasbe
05b965ac25
Merge pull request #21434 from AnnsAnns/introduce_tutorials
Guides: Introduce C Tutorial
2025-06-26 14:02:14 +00:00
AnnsAnn
8cdb2d9411 doc/guides: Riot Tutorial
examples/guides: Introduce tutorial references

doc/guides/tutorial: Introduce code_folder for all tutorials
2025-06-26 15:53:58 +02:00
Armin Wolf
501811e173 sys/psa_crypto: Split subsystem definitions into separate files
Currently PSA backends cannot use other backends because the necessary
definitions are defined in a single big header file. This prevents us
from creating a generic HMAC backend based on the available hash
backends, as the hash context struct is not available when defining the
HMAC context struct.

Fix this by spliting the headers into separate files. This makes it
possible us use the hash context definitions without pulling in the
remaining context definitions.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
2025-06-15 20:23:24 +02:00
Marian Buschsieweke
0a21b4d990
examples/.../rust-gcoap: disable build on native for now
Until the bug is fixed
2025-06-04 15:20:49 +02:00
mguetschow
6f23791e31
Merge pull request #21517 from KSKNico/fix-examples-headers
examples: replace header guards with #pragma once
2025-06-02 09:56:36 +00:00
KSKNico
a28a905d73 examples: replace header guards with #pragma once 2025-05-28 15:50:48 +02:00
Mikolai Gütschow
a79358d746
examples/gcoap_dtls: migrate to XFA SHELL_COMMAND 2025-05-27 21:02:03 +02:00
Marian Buschsieweke
cac44edec7
tree-wide: replace multiple empty lines with one
For each C source/header `$file`: `sed -e '/^$/N;/^\n$/D' -i $file`.
2025-05-21 22:51:04 +02:00
Marian Buschsieweke
f36a384cb9
examples/basic/subfolders: fix test
At least on the samr21-xpro used for hardware in the loop testing, the
terminal did not attach in time after the reset to capture all of the
output.

This adds the `test_utils_interactive_sync` module to wait for an `s`
to be received via `stdio` before starting to print to sync with the
test scripting.
2025-05-10 15:50:16 +02:00
Mikolai Gütschow
1f674a416f
examples/basic/subfolders: add test 2025-05-09 11:20:09 +02:00
Mikolai Gütschow
8ff4d19986
examples/basic/subfolders: switch from DIRS to EXTERNAL_MODULE_DIRS 2025-05-09 11:20:09 +02:00
Leandro Lanzieri
a57d5cc024 examples/lwm2m: add on/off switch object 2025-04-29 13:40:58 +02:00
crasbe
06e79a9188 examples/suit_update: fix compilation for native 2025-04-23 11:57:18 +02:00
Marian Buschsieweke
c05d546bca
examples,tests: Update Makefile.ci
This updates the `Makefile.ci` entries for all MSP430 boards plus a few
low end Cortex-M boards.
2025-04-16 15:25:38 +02:00
krzysztof-cabaj
d3dc0c0e5a examples/nanocoap_server: remove unnecessary modules 2025-04-11 14:21:33 +02:00
krzysztof-cabaj
ddeeec163b exaples/nanocoap_server: fix typo in LWIP interface name 2025-04-11 13:59:13 +02:00
Marian Buschsieweke
4ce7ab2133
tree-wide: fix documentation issues
This should fix compilation with -Wdocumentation on LLVM.
2025-04-10 13:37:13 +02:00
Mikolai Gütschow
223031e0d6
treewide: update riot-wrappers and riot-sys
diff generated with `find -name Cargo.toml -exec cargo update --manifest-path "{}" --package riot-wrappers --package riot-sys ";"` according to https://github.com/RIOT-OS/RIOT/blob/master/doc/guides/managing-a-release/README.md?plain=1#L31

upcoming release version bump similar to https://github.com/RIOT-OS/RIOT/pull/21133
2025-04-08 14:29:46 +02:00