Update libcoap functions that need to be called locked with a name
suffix of _locked.
Move matching functions out of coap_threadsafe.c to be coded just ahead
of the newly renamed _locked function.
Properly define the _locked function in the appropriate _internal.h file
for documentation, removing the #defines from coap_threadsafe_internal.h.
Work in progress for all the functions.
Remove coap_lock_* requirements for testdriver (coap_delete_node()).
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.
A duplicate CON message is sent by the server if the client's ACK to the original
confirmable message did not reach the server.
See issue #1306 for full description: https://github.com/obgm/libcoap/issues/1306
Optional compile time thread safe code supported.
Locking is done at the coap_context_t level, and if enabled is primarily
done coap_threadsafe.c and coap_threadsafe_internal.h.
coap_threadsafe_internal.h causes coap_X() to get mapped to coap_X_locked()
throughout the libcoap library code with the exception of coap_threadsafe.c
if thread safe is enabled.
coap_debug.h: Support logging level set to _COAP_LOG_EMERG
coap_pdu.h: handle small ints
coap_pdu_internal.h: handle small ints
coap_session_internal.h: handle small ints
coap_uthash_internal.h: handle small ints
coap_block.c: Handle small ints
coap_debug.c: Fix use of vsnprintf() and vfprintf()
coap_pdu.c: Handle small ints
coap_tinydtls.c: Handle small ints
coap_uri.c: Fix alignment issue in coap_new_uri()
uncrustify run on RIOT examples to conform to RIOT's coding standards/
Reduce timeout to 1 second and enter established state for servers that
only partially implement RFC8323 for TCP support, but do not send a CSM.
Add new coap_context_set_csm_timeout_ms() to control the value of the timeout.
This then makes sure that all things libcoap are properly initialized
before use, and coders realize they need to do this.
Note: coap_new_context() continues to make sure that coap_startup()
is invoked if not done previously, but this may be too late.