If coap_context_set_keepalive() is set in the server, CoAP keepalive packets
will get sent for any CoAP session that is curently observing a resource.
If the keepalive times out, then the observation(s) are canceled and the
server session is deleted.
Add in a new function coap_io_get_fds() to get the lists of (internal
to libcoap) file descriptors that are in a read or write pending state,
as well as the timeout time for the next internal to libcoap activity
(e.g. packet retransmission).
Tag server returned data with a digest computed ETag option value so
requests with an ETag option can return 2.03 if there is a match.
The size of bytes hash that is computed for the ETag can be overwritten by
localy defining COAP_ETAG_MAX_BYTES to be a value between 1 and 8 bytes
inclusive. It is set to 4 by default.
If an Observe is de-registered, but an unsolicited Observe response is received
before the de-register response is received, then the unsolicited response
failed to get decrypted.
Update stateless token to track 20 bits - the largest no of blocks
as per RFC7959.
Make output of data detail configurable for coap_show_pdu().
Add in new function coap_enable_pdu_data_output() to do this.
Add -x option to coap-client and coap-server to enable this dropping
of data detail.
by:
- Correcting Contiki-NG's value of COAP_DEFAULT_MAX_PDU_RX_SIZE
- Denying to create PDUs longer than COAP_DEFAULT_MAX_PDU_RX_SIZE
- Using the MTU setter, thereby not overriding stack-specific limits
- Using existing constants for L4-specific header sizes
./autogen.sh and ./configure no longer need to be run prior to running
make for Contiki, LwIP or RIOT from the appropriate examples sub-directory.
scripts/fix_version.sh now handles updating coap.h for the different
LIBCOAP_ and PACKAGE_ definitions.
Group together and document the run-time checks available for checking
the libcoap built-in functionality based on the ./cconfigure and / or
CMakeLists.txt options.
Create include/coap3/coap_defines.h file that contains a list of
COAP_ #defines created from the options defined when running ./configure
or cmake.
Add additional coap_*_is_supported() functions.
Tidy up the general proxy logic by moving common functionality
into libcoap.
New functions coap_proxy_forward_request(), coap_proxy_forward_response()
and coap_proxy_is_supported() added.
New --enable-proxy-code support added to configure.
New ENABLE_PROXY_CODE support added to CMakeLists.txt.
Support for common shared connection to next hop.
Support for round-robin balancing across multiple next hops.
Only support changing the client's source port if the DTLS library
has support / configured for CID.
Used when debugging server handling source address changes and CID
is in use.
Add in support for TinyDTLS (Client only) if TinyDTLS is patched
appropriately (not currently available on TinyDTLS main branch).
Add in new function coap_dtls_cid_is_supported().
'make distclean' removes header files built from the .in files, which
means that they are not available for different OS builds.
The same is true for CMakeLists.txt.
Remove the need for the .in files and update for libcoap revisions
by using a new script scripts/fix_version.sh created from
scripts/fix_version.sh.in.
CI has been updated to check revisions have been updated in the
appropriate places.
Do not remove libcoap-3.sym and libcoap-3.map when doing 'make distclean'
as they are git tracked files.
Support of RFC9146. Currently only Mbed TLS supported.
New function coap_context_set_cid_tuple_change() for a client to
force periodic source port changes to test out CID.
Configurable support for the client to use Connection-ID
assuming underlying DTLS library is configured for or supports it.
If a proxy reads in a packet via coap_read_endpoint, which then
invokes an ongoing proxy TCP connection, while waiting for the CSM
response of the new session, coap_read_endpoint would get invoked
again if there is any data to read on any of the listening endpoints..
With a Constrained Stack, the read in data is protected by mutex
m_read_enpoint - which is still locked when trying to wait for the
CSM.
As the code is either single threaded, or protected by global_lock
if multi-threaded, there is no need to maintain mutexes such as
m_read_endpoint. This PR removes these not needed mutexes.
Do not call coap_free_context() from within sigint handler.
Always call coap_io_process().
Use sys_arch_sem_wait() for timeouts while waiting for input.
When context is de-allocated, other threads can still access the
context lock held within context. Indicating being freed when
coap_free_context() was called worked in most cases, but not all.
Create new options coap_uri_into_optlist(), coap_path_into_optlist() and
coap_query_into_optlist() to be used instead of coap_uri_into_options(),
coap_split_path() and coap_split_query() functions so the requirement
for a scratch buffer is not needed.
Getting the minimum size for a scratch buffer is not straight forward and
potential for unexpected boundary condition errors to occurif too small.
Correct parsing and stripping out of "%2E%2E" ("..") and "%2E" (".")
path segments. ".." now removes the previous segment (if it exists).
Update documentation and unit testcases.
Update examples to use new options.
Set up lg_crcv if separate ACK response received for a coap_send() CON
request to be able to handle Block2 responses.
Handle Block1 request getting back a Block2 request that has an initial
separate response once the Block1 has completed by adjusting the stateless
token counter.
Separate response is typical for proxy support (OSCORE previously handled)..
Move requirements for client to determine how to set up the SNI for
PSK/PKI encrypted communications down into libcoap. The client just
needs to indicate the host to connect to in the client_sni field of
coap_dtls_cpsk_t or coap_dtls_pki_t.
New internal function coap_sanitize_client_sni() makes sure that
the SNI sent follows RFC 6066. As per
https://datatracker.ietf.org/doc/html/rfc6066#section-3
Literal IPv4 and IPv6 addresses are not permitted in "HostName".
all IPv4 and IPv6 addresses are dropped for the SNI, and so no SNI is
sent. DNS hostnames will get transmitted as the SNI.
Handle Observe cancellation with large blocked FETCH that needs to use
diffferent tokens when there is packet loss by checking the cache-key
if the token is not found (Q-Block1).
Let FETCH with Q-Block1 use NON now that cache-key is getting checked
if token mismatch.
Handle getting an unsolicited Observe response in the middle of
sending the FETCH blocks that ultimately will be doing the Observe
cancellation following re-assembly. (The unsolicited Observe token will
be the same token that is used to respond to the observe cancellation).
Move get_wkc_len() into hnd_get_wellknown_lkd() to simply document how
hnd_get_wellknown() should be done.
Revert out coap_register_print_wellknown_callback() changes as no
longer needed.
Update the Public API equivalent of the libcoap functions that need to be
called when locked with a name suffix of _lkd.
Move matching Public API functions out of coap_threadsafe.c to be coded
just ahead of the newly renamed _lkd function.
Properly define the _lkd function in the appropriate _internal.h file for
documentation, removing the #defines from coap_threadsafe_internal.h.
Tag all the Public API functions that have a _lkd function with COAP_API.
COAP_API can then be defined as to what should be done for that function.
Check libcoap library does not call the original Public API function when
it should be calling the _lkd function by marking the Public API not _lkd
functions as deprecated during the libcoap library build.
[Done by the new COAP_API being defined as __attribute__((deprecated)).]
Work in progress for all the functions that need to be multi-thread safe.
Update the Public API equivalent of the libcoap functions that need to be
called when locked with a name suffix of _lkd.
Move matching Public API functions out of coap_threadsafe.c to be coded
just ahead of the newly renamed _lkd function.
Properly define the _lkd function in the appropriate _internal.h file for
documentation, removing the #defines from coap_threadsafe_internal.h.
Tag all the Public API functions that have a _lkd function with COAP_API.
COAP_API can then be defined as to what should be done for that function.
Check libcoap library does not call the original Public API function when
it should be calling the _lkd function by marking the Public API not _lkd
functions as deprecated during the libcoap library build.
[Done by the new COAP_API being defined as __attribute__((deprecated)).]
Work in progress for all the functions that need to be multi-thread safe.
Update the Public API equivalent of the libcoap functions that need to be
called when locked with a name suffix of _lkd.
Move matching Public API functions out of coap_threadsafe.c to be coded
just ahead of the newly renamed _lkd function.
Properly define the _lkd function in the appropriate _internal.h file for
documentation, removing the #defines from coap_threadsafe_internal.h.
Tag all the Public API functions that have a _lkd function with COAP_API.
COAP_API can then be defined as to what should be done for that function.
Check libcoap library does not call the original Public API function when
it should be calling the _lkd function by marking the Public API not _lkd
functions as deprecated during the libcoap library build.
[Done by the new COAP_API being defined as __attribute__((deprecated)).]
Work in progress for all the functions that need to be multi-thread safe.
Update the Public API equivalent of the libcoap functions that need to be
called when locked with a name suffix of _lkd.
Move matching Public API functions out of coap_threadsafe.c to be coded
just ahead of the newly renamed _lkd function.
Properly define the _lkd function in the appropriate _internal.h file for
documentation, removing the #defines from coap_threadsafe_internal.h.
Tag all the Public API functions that have a _lkd function with COAP_API.
COAP_API can then be defined as to what should be done for that function.
Check libcoap library does not call the original Public API function when
it should be calling the _lkd function by marking the Public API not _lkd
functions as deprecated during the libcoap library build.
[Done by the new COAP_API being defined as __attribute__((deprecated)).]
Work in progress for all the functions that need to be multi-thread safe.
Gives the ability to add in additional library build checks through
the use of #define etc. that is not available to applications or
other host o/s support.
Preparatory work for further locking checks.