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.
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.
New examples/zephyr directory that contains a sample coap-client.
Building the coap-client assumes that the zephyrproject has already been
installed and set up (default directory ~/zephyrproject).
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.
./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.
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.
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.
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.
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.
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.
Two new functions added
coap_tls_engine_configure()
coap_tls_engine_remove()
Added in new PKI key type coap_pki_key_define_t which allows the CA, Public Cert
and Private Key to be different types (e.g. PEM, DER etc.).
Added a new key type ENGINE to make use of the configured tls_engine.
Added in a -q option to coap-server and coap-client for testing ENGINE.
Note: ENGINE is only supported by OpenSSL.
Add in new COAP_BLOCK_NOT_RANDOM_BLOCK1 option for
coap_context_set_block_mode(). This disables receipt of any Block1
packet (but not Q-BLock1) if the block numbers are not sequentially
received starting with 0. A 4.08 code is returned for every packet
out of order and its data is ignored.
If COAP_BLOCK_SINGLE_BODY is set in coap_context_set_block_mode(),
but not COAP_BLOCK_NOT_RANDOM_BLOCK1, then all Block1 packets are
assembled in the correct order before passing the body up to the
application. The receive logic will timeout after MAX_TRANSMIT_WAIT
(93 seconds) if there are any missing blocks, or 10 seconds if the
last block is seen.
If COAP_BLOCK_SINGLE_BODY is not set in coap_context_set_block_mode(),
and not COAP_BLOCK_NOT_RANDOM_BLOCK1, then the random order packets
are passed up to the application layer where it is the application's
responsibility to decide what to do with the randomly ordered packets,
and what response code to send.