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.
examples/coap-client.c:
examples/coap-server.c:
Add in Q-Block intelligence.
include/coap3/block.h
include/coap3/coap_block_internal.h
include/coap3/coap_event.h
Add in Q-Block references.
Add in new functions
coap_block_check_q_block1_xmit()
coap_block_check_q_block2_xmit()
coap_send_q_blocks()
coap_send_q_block1()
coap_send_q_block2()
coap_block_drop_resp_q_block_xmit()
coap_block_drop_resp_q_block2_crcv()
coap_q_block_is_supported()
include/coap3/coap_session.h:
Add in new Congestion Control defaults and ability to configure them.
include/coap3/pdu.h:
Add in the new options.
libcoap-3.map:
libcoap-3.sym:
Expose external Congestion Control functions.
man/coap-client.txt.in:
man/coap-server.txt.in:
man/coap_block.txt.in:
man/coap_handler.txt.in:
man/coap_recovery.txt.in:
man/coap.txt.in:
Add in Q-Block information.
src/block.c:
Add in the new functions to support Q-Block.
src/coap_debug.c:
Output the new options as appropriate.
src/coap_io.c:
Check for Q-Block transmission timeouts.
src/coap_session.c:
Add in the Congestion Control support.
src/net.c:
src/resource.c:
Add in Q-Block support.
configure.ac
CMakeLists.txt
Add in support for enabling/disabling Q-Block support (enabled by default).
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.
If the server is responding to a mcast request with a packet that is a
part of larger body (i.e. responding with Block2 option) the requests
for the missing packets have to be using unicast, which continues
to be supported.
The application can determine the unicast remote address before the next
coap_send() by using coap_session_get_addr_remote().
Add in a new function coap_session_get_addr_mcast() to get the mcast IP
if the client session was set up to talk to a mcast address.
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.
This allows for code reduction if not all logging levels are required.
Done by defining ./configure --enable-max-logging-level=X, where X can have
the value of 0 through 8 inclusive.
COAP_LOG_EMERG is always logged.
Can save up to 40k bytes.
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[].