Fix issues thrown up with ubuntu-latest moving to ubuntu-22.04.
clang 14+ generates dwarf-5 code which valgrind does not currently support
so downgrade to output dwarf-4.
Use ./autogen.sh for tinydtls builds rather than 'autorecond --force --install'
Remove some spurios } in the workflow
If the request handler returns an error code to an observe request
then following the deletion of the observe, no longer refer to the
now deleted object.
Clean up / simplify conditions for breaking out of the main coap_io_process()
loop. ready is no longer required here.
Handle mcast Observe requests by continuing to track the token
Make sure that all of the Observe (potentially blocked) response is received
before closing down.
Remove unecessary code.
coap_io_pending() checks to see if there are any PDUs pending transmission,
whether there are any large (block) transmissions in progress, whether
there are still expected response packets(client) or expected request
packets(server), and whether the client is expecting further observe
responses. If any of this is true, then it returns 1, else 0.
coap_io_pending() also invokes coap_io_process() to check that all that can
be transmitted is, as well as processes any impending input packets.
This takes coap_can_exit() a step further who only checks the transmit state.
coap_handle_response_get_block() has been updated to release the current
lg_crcv if all the fragmented body of a large transfer have been received.
Documentation updated.
Set up coap_log_t as an enum, using syslog variable names prefixed by
COAP_.
Add function coap_dtls_log() for logging information from (D)TLS libraries.
Update the log output to have use Lower-case variants for the logging levels to
indicate that output is from the (D)TLS library instead of the CoAP library.
(D)TLS libraries updated to be consistent in the usage of
coap_dtls_set_log_level()/coap_dtls_get_log_level().
Add in coap_log_emerg(), coap_log_alert() etc. as wrappers to reduce the line
length required for log entries. Updating all the coap_log() functions to
no longer use syslog variants will be a part of a separate PR.
Added in the "-V" option to the examples, with an initial default of
COAP_LOG_ERR, separating out the CoAP and (D)TLS logging levels.
Note: TinyDTLS log output will be consistent when built against a TinyDTLS
version that contains support for an external logging handler.
As well as adding in the DTLS_PSK wrappers in the appropriate place. add in
coap_dtls_psk_is_supported(), coap_dtls_pki_is_supported(),
coap_dtls_pkcs11_is_supported() and coap_dtls_rpk_is_supported() functions
to support better granularity of what capabilities are available in the
(D)TLS libraries.
Update coap_string_tls_support() to use these new functions.
Uppdated documentation for these new functions.
If NSTART > 1, any retransmit timeouts are reported on the difference in
time with an earlier entry in the transmit queue, rather than the actual
delay before the node entry gets retransmitted.
This change reports on the actual delay for a node before it gets retransmitted,
which more accurately records when the node will get retransmitted.
OpenSSL 3.0+ has removed the SSL_OP_LEGACY_SERVER_CONNECT option from the
default set list meaning that a OpenSSL 3.0+ client is unable to set up a
session with a TinyDTLS server.
This fix adds back in SSL_OP_LEGACY_SERVER_CONNECT to the set list of
options.
This removes the message that reports the failure
"unsafe legacy renegotiation disabled"
that causes the session set up to fail.
There is debate as to whether RFC 5746 is appropriate for DTLS sessions,
which is what OpenSSL 3.0+ now enforces unless SSL_OP_LEGACY_SERVER_CONNECT
is set.
The dtls versions of the server and client are built as
server-dtls and client-dtls.
Add in flexible option support for server and client. These are
a subset of the coap-server and coap-client options.
encode.h and str.h are not used in any open PRs and can safely be renamed
with a coap_ prefix.
Order the include lists alphabetically as if all the entries have a coap_
prefix, so when the include file gets renamed with a coap_ prefix, the
include order is not disturbed.
Rename (as these are all internal files) for clarity
coap_mutex.h to coap_mutex_internal.h
coap_hashkey.h to coap_hashkey_internal.h
uthash.h to coap_uthash_internal.h
utlist.h to coap_utlist_internal.h
Apart from debug log messages, there is no way for a user to be
notified when a message retransmission happens.
This event can be useful for diagnosing issues related to
lossy networks or unresponsive CoAP servers (e.g. user can
track total retransmissions as an indicator for general link
quality).
Assigned event ID to 0x5002 to avoid creating a new 0x6000
event group, and because it's similar to COAP_EVENT_BAD_PACKET (0x5001).
Delay exit briefly checking if there are any response packets following
observe cancellation and process as appropriate.
If multiple observes are outstanding, cancelling them using CON will
cause issues as NSTART limit is hit. The server then does not know
about all of the cancellations.
Also, this can allow the server to properly shutdown observe
activity when blocks are used.
The RFC references appear without the hyperlink in the man pages,
but now appear as hyperlinked in the doxygen output.
SEE ALSO updated with missing references.
Simplify code for applications by providing coap_uri_into_options()
which then adds the (optional) port and splits out the path / query
as CoAP options, adding them to the optlist_chain for subsequent use.
Added a new coap_delete_uri() for completeness.
Update documentation to include the uri based functions.
Update examples to use the new coap_uri_into_options() function.
New demo client app.
Update some of the memory sizes.
New coap_lwip_dump_memory_pools() to dump LwIP memory pool usage.
Add in logic to handle new client sessions.
New coap_io_process() to handle LwIP which can invoke a callback handler
to wait / timeout for the next input handler.
New coap_lwip_set_input_wait_handler() to define this handler.
Update coap_io_prepare_io() to handle LwIP.
Support re-use of pbuf for PDU re-transmissions.
Make sure that NSTART is correctly obeyed.
Build the client with client only libcoap code.
Build the server with server only libcoap code.
Update LwIP source to latest stable release.
Reserve memory for a response PDU.
New coap_lwip(3) man page.
Update directory structures for config files.
Update files contained in "make dist" and check lwip rebuilds
in the github workflows.
If a response packet is received that is badly formatted, invoke the
nack handler (if defined) with COAP_NACK_BAD_RESPONSE so that the
requestor knows there is an issue, rather than timing out.
However, if the response packet is so badly formatted, or it is not
possible to find the requesting packet, then this nack event will not
trigger, but an event is triggered with COAP_EVENT_BAD_PACKET.
Fix the link for the last entry in the name list where asciidoc
converts the minus sign to an extended dash (em dash)
Remove the updating of navtree.js as it is done differently in later
versions of doxygen.
Add in the missing name entry for coap_attribute.
Add in a new index tag for all the functions defined within the man pages.
Highlight the occurrence of that function name in the appropriate displayed
page.
For the man pages that have been restructured to break out the individual
functions, jump to the function definition.
When coap_make_session() fails, the local variable session will be
NULL, and the program continues at the error label. Because of
session == NULL, coap_session_free() will return immediately, leaving
a NULL entry in ep->sessions.
This fix is related to CID 1520613.