Move some existing header inline code into source files.
Update coap_resolve_address_info() to remove need for client based app
code to have to understand IPv4/IPv6 code.
Remove IPv4/IPv6 specific code from examples code.
This means that apps need to have no knowledge of what IP support is available.
Updates coap_uri_into_options() and coap_resolve_address_info()
which have only been recently added to develop branch and are not in any
previous release.
If keepalive is enabled, make sure that they continue when a server
stops / starts. Limit the retry timeouts to the number of seconds
defined by coap_context_set_keepalive() so that interim NAT devices
are always kept "warm".
Addded in a new event COAP_EVENT_KEEPALIVE_FAILURE and updated docs
accordingly.
Add in optional callbacks for when dynamic resources are setup and deleted.
Add in optional callbacks for when observe subscriptions start and stop.
Add in optional callbacks for when the observe counter is updated (can be
ratelimited) for a resource as well as track when a resource is deleted.
Add is support for new functions
Main functions with libcoap tracking support are
coap_persist_startup()
coap_persist_stop()
coap-server has -t option to track observe information.
UDP sessions supported, as well as OSCORE over UDP.
Documentation updated
libcoap tracking support (as opposed to application tracking) is configurable.
Follows RFC6455, as specified in RFC8323.
Make support configurable.
Add in example support.
Update other code to be aware of WebSockets as a CoAP protocol.
syslog.h is no longer required for libcoap as all LOG_ usage has been replaced
with COAP_LOG_.
Added #include <stdio.h> to example code for code-client and coap-server as
a hint should application code be using LOG_.
Current stack:-
Application
CoAP
CoAP-Session
DTLS
Netif
Sockets
Network Stack
Depending on the CoAP protocol, indexing functions through coap_layers_coap[]
(in src/coap_io.c) will invoke the correct layer function when used at the
CoAP and DTLS layers.
It is then easy to add in another protocol layer by updating coap_layers_coap[].
Add in new file src/coap_dtls.c.
Add in coap_(d)tls_establish() functions which are called when netif
accept / connect take place.
Add in coap_session_establish() function which is called when (D)TLS
has established as well as at the session layer if there is no (D)TLS
in preparation for properly supporting protocol layers.
Add in coap_(d)tls_close() functions which are called prior to
coap_netif_close().
Add in skeleton coap_netif.c coap_netif_internal.h files, populated with
coap_netif_dgrm_read(), coap_netif_dgrm_read_ep(), and coap_netif_dgrm_write()
functions that are called by the CoAP and (D)TLS code which in turn call
the appropriate coap_socket_*() functions.
The coap_dtls_send() function parameters are aligned with
coap_netif_dgrm_write().
Add in new function coap_context_set_max_token_size() to define
the maximum supported token size.
Track changes to PDU to support extended tokens.
Update documentation.
coap_resolve_address_info() emulates getaddrinfo() but has the extensibility to
support other socket types based on the address to resolve.
coap-client, coap-server and lwip/client updated to use this new functionality.
coap_address(3) updated to include the new functions.
See https://core-wg.github.io/oscore/test-spec5.html
Add in new test server oscore-interop-server to provide the necessary
functionality.
Add in script and configuration files to run the tests locally.
Based on work done in https://gitlab.informatik.uni-bremen.de/obergman/libcoap
New directories with files
include/oscore
src/oscore
New files
include/coap3/coap_oscore.h
include/coap3/coap_crypto_internal.h
include/coap3/coap_oscore_internal.h
man/coap-oscore-conf.txt.in
man/coap_oscore.txt.in
src/coap_oscore.c
tests/test_oscore.c
tests/test_oscore.h
Supported by new option (enabled by default)
./configure --enable-oscore
cmake .. -DENABLE_OSCORE=ON
Requires a TLS library configured to do the OSCORE encryption and hashing.
Drop the use of syslog LOG_DEBUG etc. for coap_log() and use the
coap_log_debug() etc. macros which make use of COAP_LOG_DEBUG etc.
Application examples updated, as well as the man page examples.
Assemble all the blocks before checking for Observe registration
or de-registration.
Track all the tokens used for the large FETCH registration and
re-use them for the de-registration as the server can elect to use
any of them when re-assembling the body for the registration Token.
If multiple requests (apart from DELETE) are sent at the same time to
the same resource, and the responses need to make use of the Block2 option,
there is no way for the server to differentiate between which block set a
request (if there is a resource content change) is for unless a Request-Tag
is used.
Disable this functionality by setting COAP_BLOCK_NO_PREEMPTIVE_RTAG when
calling coap_context_set_block_mode(). Request-Tag will still be sent
with any request that includes Block1 option.
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.
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.