The first coap_send(pdu) is held back until after the optional tests for
Extended Token or Q-Block support are complete with the return from coap_send()
containing the held back pdu's mid.
If there are any errors with this PDU when subsequentially sent, the
event COAP_EVENT_FIRST_PDU_FAIL gets raised.
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.
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.
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.
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.
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.
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.
For the libcoap COAP_ compile time options configured in coap_defines.h or
coap_config.h make sure that #ifdef, #ifndef or defined() are not used and
replaced with #if as appropriate so that if the COAP_ compile time option
is defined as 0, the correct code gets built.
Add #if wrappers to source files that are platform specific or OSCORE.
Host names larger than 255 bytes will cause an internal buffer overflow.
Hostnames provided to coap_resolve_address_info() now have their length validated.
Discovered by SecMate (https://secmate.dev).
Sanity check host lengths when parsing a CoAP URI when using the coap_split_uri()
function.