Commit Graph
3163 Commits
Author SHA1 Message Date
Jon Shallow 5567e83dfd coap_mutex_internal.h: Fix typo in coap_thread_pid_t definition 2025-12-15 12:00:23 +00:00
Jon Shallow 5a5330d2be RIOT: Update code version and documentation 2025-12-13 18:07:25 +00:00
Jon Shallow 24db04b45e coap_session.c: Remove need for waiting for CSM for TCP call-home
Fixes (D)TLS startup direction as well.
2025-12-13 16:06:14 +00:00
Jon Shallow b60d33ef3a coap_pdu.c: Save unnecessary realloc() for larger packets 2025-12-13 12:51:30 +00:00
Jon Shallow f1b245a476 coap_mbedtls.c: Report CA issues with no FS support and files defined 2025-12-13 12:50:23 +00:00
Jon Shallow 18bb1ff114 Call-Home: Fix Call-Home reconnecting should remote Client fail 2025-12-11 22:25:32 +00:00
Jon Shallow 07797d9a41 coap_strm_lwip.c: Clean up TCP close 2025-12-10 09:19:34 +00:00
Jon Shallow e1c5889faa LwIP: Fix TCP traffic timing windows
Use correct input function for netif_add() in examples.

Invoke coap_io_process() as soon as possibile following TCP input /
error.

Update rcvd window size after receipt of data.
2025-12-09 10:44:45 +00:00
Jon Shallow 12f22a16f7 coap_openssl.c: Fix DTLS timeout checking 2025-12-09 10:43:26 +00:00
Jon Shallow 0eff6a4ed7 FreeRTOS/LwIP: Support getting thread_id for locking 2025-12-09 10:16:16 +00:00
Jon Shallow 5fa14f6a74 cmake: Fix multi-thread support building 2025-12-08 13:06:46 +00:00
Jon Shallow d97e7f39d8 configure.ac: Fix observe-persist support 2025-12-06 10:24:24 +00:00
Jon Shallow f64d16919f multi-threading: Fix no_recursive_check issue 2025-12-06 10:01:58 +00:00
Jon Shallow 1afe621cf5 Zephyr: tidy up / fix thread safe building 2025-12-05 16:02:54 +00:00
Jon Shallow 8c1e09a25d cmake: Fix thread number logging 2025-12-04 19:32:55 +00:00
Jon Shallow 9f6e671894 Block Transfer: Support constrained memory clients
Add in new function coap_add_data_large_request_app() that provides a call-back
to get individual blocks rather than having a large buffer held in
(contrained) memory.
2025-12-04 14:42:18 +00:00
Krisztian Szilvasi 592b7bc1d6 Update the lg_crcv for each block to prevent premature release during long transfers.
Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
2025-12-03 15:45:00 +00:00
Jon Shallow 0bf6a2d75c Update SO and ABI to match v4.3.5a bug fix release 2025-11-27 11:26:43 +00:00
Jon Shallow b59f31e71d coap_wolfssl.c: Do more error checking 2025-11-27 10:20:09 +00:00
Jon Shallow aef27f2e68 coap_proxy.c: Support enabling multicast forwarding requests
Missed pushing a commit.
2025-11-20 17:01:20 +00:00
Jon Shallow 7039c70100 coap_proxy.c: Support enabling multicast forwarding requests
Now configurable, previously the multicast request was just forwarded.
2025-11-20 16:47:51 +00:00
Jon Shallow 763330cb61 LwIP: Fix locking for FreeRTOS environments
Handle recursive locking of LOCK_TCPIP_CORE().

Updated support for IPv4 only environments.
2025-11-20 12:33:24 +00:00
Jon Shallow f9fd716025 ext/tinydtls: Update submodule to the latest 'main' version 2025-11-20 12:31:49 +00:00
Jon Shallow 523773baab Zephyr: Fix deprecated, now undefined, symbols when CI building 2025-11-17 11:16:41 +00:00
Jon Shallow a6ed1a6951 coap_glutls.c: Properly handle error conditions 2025-11-06 10:24:33 +00:00
Jon Shallow 13abce9a15 coap_net.c: Better fix for unexpected Q-Block NON restart
The large sent body can also be an ACK as well as CON, so check it is
not a NON.
2025-10-27 20:19:47 +00:00
Jon Shallow 21f09ac337 coap_net.c: Fix unexpected Q-Block NON restart 2025-10-25 18:18:51 +01:00
Jon Shallow fc83bf3f69 Q-Block: Handle CON usage when multiplexing requests on same session. 2025-10-25 09:58:46 +01:00
Jon Shallow 49668640a0 coap_session.c: Fix GCC array bounds warning for memcpy
Note assert() added from #1209 has now been removed as not needed by #1628,
and if NDEBUG is defined then the assert() would have been a noop anyway.
2025-10-24 09:56:54 +01:00
Patryk Jarosz 10a7e3c82d fixed memory leak coap_send 2025-10-22 15:35:56 +01:00
Jon Shallow e13dfda905 coap_block.c: Do not timeout lg_srcv if server app request handler is slow 2025-10-20 09:34:08 +01:00
Tobias Tefke 698b897570 coap_encode.h: Check BSD is defined before evaluating it 2025-10-20 09:33:54 +01:00
Tobias Tefke d437d9cabd coap_dgrm_internal.h, coap_subscribe_internal.h: Fix extern C guards 2025-10-20 09:33:20 +01:00
raspopov 3ac4613866 Switch the CMake TinyDTLS build to the native way
These changes switch the TinyDTLS library build from Autotools to CMake,
as support for CMake has now been added. The use of external libraries
has been optimized. PkgConfig support has been added for library
detection. The libraries' names were also fixed to use CMake-style
naming.
2025-10-17 13:28:40 +01:00
Mario Kicherer 673b2184ce add block data handler for single body block transmissions 2025-10-17 11:36:25 +01:00
raspopov 490e4e0452 Fix wolfSSL bug and MSVC compilation
When I was fixing MSVC compilation incompatibility due to a dynamic
array on the stack in the coap_crypto_aead_decrypt() function,
I accidentally noticed an incorrect calculation of the array size in
the previous coap_crypto_aead_encrypt() function.
2025-10-11 10:50:31 +01:00
raspopov 277f981ab3 Fix the MbedTSL compilation process under Windows
It adds the strndup() function, which is missing in Windows, as has been
done in other parts of libcoap.
2025-10-10 09:28:48 +01:00
Mario Kicherer da1be4b5ca add COAP_BLOCK_FORCE_Q_BLOCK 2025-10-09 16:31:50 +01:00
Jon Shallow 48a1b83100 Q-Block: Various Q-Block fixes 2025-10-08 13:57:51 +01:00
raspopov aaaf3d1324 Fix tinyDTLS compilation
The current code uses a dynamic array on the stack, a relatively rare
compiler extension. For example, MSVC does not support it.

The proposed changes use a classic dynamic array on the heap, which
greatly improves code compatibility. This will also enable libcoap to be
compiled alongside tinyDTLS using the Microsoft compiler on Windows.
2025-10-06 18:43:54 +01:00
raspopov e9c1b0b5ea Fix MSVC compilation
Using the Ninja generator with the MSVC compiler leads to errors due to
incorrect compiler call options. In CMake, the generator and the
compiler are different entities.

This fix replaces the incorrect CMake variable with the correct one that
describes the current MSVC-compatible compiler.
2025-10-06 16:45:20 +01:00
Jon Shallow fb77750ad3 coap_proxy.c: Correctly cache large proxy responses 2025-10-06 10:23:29 +01:00
Jon Shallow 0c563edfb7 Proxy: Support passing safe-to-forward critical options for reverse proxy 2025-10-06 10:18:55 +01:00
Jon Shallow e16613eab9 configure.ac: Fix disabling IPv4 or IPv6 builds 2025-10-06 09:39:20 +01:00
raspopov 245354f0ef Fix HAVE_TIME_H and HAVE_SYS_TIME_H ifdefs
If we correctly determine the presence of the sys/time.h and time.h
files using the HAVE_TIME_H and HAVE_SYS_TIME_H macros, then the LWIP
compilation will result in a duplicate function error. Perhaps previous
versions of LWIP did not have these files, in which case everything
would have worked correctly.

These changes add the necessary ifdefs and keep the optimal timer
function for LWIP.

Adds missed #include <time.h> lines to examples and documentation.

Adds the detection of the sys/select.h header to the CMake and autoconf.
2025-10-06 09:38:52 +01:00
raspopov 5ca624642e Fix compiler warnings
Fixed warnings of unused variable
and possible use of initialized variable.
2025-10-06 09:37:00 +01:00
Jon Shallow 576b68e5db LwIP: Add in support for disabling IPv4 or IPv6
Note that TinyDTLS needs both IPv4 and IPv6 if DTLS is going to be used.
2025-10-02 18:48:17 +01:00
raspopov 6cbf590785 Fix coap_resolve_address_info() for LWIP
These changes add a basic implementation of the coap_resolve_address_info()
function when compiling LWIP with NO_SYS = 1. This implementation is
similar to those in CONTIKI and RIOT.

The function gai_strerror() was removed because it is not very important,
yet it is missing from many implementations.

A CONTIKI compilation bug has also been fixed.
2025-10-02 18:39:26 +01:00
raspopov 6f97006daa Fix Windows tests
In Windows, calling the connect function for a socket requires a valid
address. This causes the t_session6 test in the coap_new_client_session()
function in test_session.c to fail.

The fix replaces in6addr_any with in6addr_loopback, as in the adjacent
function call. This does not affect the functionality of the test.

As a result, the tests under Windows are completely successful.
2025-10-02 18:12:50 +01:00
raspopov f61a2efa0c Add CUnit autodetection to CMake
Added a rules file for automatic detection of the CUnit library,
as well as support for running tests directly from CMake.

Updated distribution bundle rule.
It adds FindCUnit.cmake to the EXTRA_DIST rule in the Makefile.am file.

The CUnit tests run perfectly on both Windows and Debian.
2025-10-02 17:55:51 +01:00