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.
Add in new event COAP_EVENT_XMIT_BLOCK_FAIL which gets triggered on
detecting transmission failure of large body using BlockX.
Track the last time a lg_xmit was sent, so it can be timed out on failure.
Correctly track the next lg_xmit timeout time (and lg_crcv, lg_srcv) so that
the lg_xmit can be expired.
Support for larger COAP_OBS_MAX_NON and COAP_OBS_MAX_FAIL definitions.
Change default for COAP_OBS_MAX_FAIL to 1 as there will already have
been MAX_RETRANSMIT(4) of the notification over a period of 93 seconds if
defaults are used.
Code and documentation clean up
Replace usage of hdr_size with max_hdr_size as appropriate as hdr_size
is not set until PDU is encoded. This should eliminate potential buffer
overruns.
Better checks for available space for the payload when using BlockX.
Clarify documentation.
If coap_cancel_all_messages() is called because of missing separate ACK,
then release any pending delayqueue entries if message is CON.
Remove duplicate code in coap_cancel_all_messages().
As an incoming proxy request may delay its response (e.g. initiate an
ongoing connection), send back empty ACK immediately so that the
client does not timeout and re-transmit the request.
Do not process duplicated (i.e. re-transmitted) proxy requests.
Correct a couple of typos in example proxy code.
A unique Request-Tag is added to any PUT/POST/FETCH request that contains
a large body. The server is then able to differentiate between concurrent
sending of large data using the same session.
If a server responds with a 4.01 and includes an Echo option, then the libcoap
client retransmits the request adding in the received Echo option with the same
value.
If the server responds normally with an Echo option, then the next request
from the libcoap client (internally added by libcoap) will contain that Echo
option.
It is the responsibility of the server application to add in the Echo
option if required and validate the next request unless the Echo is triggered
by OSCORE (RFC8613 Appendix B.1.2).
Add in new function coap_mcast_per_resource() to enable granularity of
handling multicast requests differently at the resource level.
The granularity is handled by how the flags variable is set up in
coap_resource_init(). These additional flags are ignored if
function coap_mcast_per_resource() has not been invoked.
Added 2 functions coap_resource_unknown_init2() and
coap_resource_proxy_uri_init2() that support defining the mcast flags as
per coap_resource_init().
Responses are now delayed rather than the request being delayed before being
passed to the request handler.
Update coap-server with the -r option to enable multicast on specific
resources.
Do not reset wait_ms in coap-client for Block2 transfers.
Fix double release of lg_xmit data.
Allow lg_xmit server sessions to timeout.
Check that there is support for adding diagnostic messages for
error returns.
Truncate received data that is larger than the indicated block size
apart from the BERT case.
Sending off multiple CON requests with the same token without waiting for
any responses, causes the first one to be sent with the remainder ending
up in the delayqueue.
On receipt of ACK, coap_remove_from_queue() called in coap_dispatch(),
which returns the MID matching entry that was in the send queue, and then
the next entry on the delayqueue is removed from delayqueue and then sent
which puts the request on the sendqueue for any required re-transmissions.
coap_cancel_all_messages() should not be called in handle_response()
following the logic above if response is type ACK. If
coap_cancel_all_messages() is subsequently called with the same (possibly
empty) token as the next request that is being sent, then the next sendqueue
entry is inadvertantly deleted.
As there is now no sendqueue entry on receipt of the next ACK, the next
delayqueue entry is not sent off.
Only call coap_cancel_all_messages() if response is not of type ACK
(i.e. a separate response).
Report on tokens being the same as the previous one to encourage application
coders to use different tokens.