If the ACK (not empty) response gets lost, the repeated CON request will just
get the cached response without invoking further analysis.
This stops things like OSCORE reporting retry issues.
This functionality needs to be enabled by setting the COAP_BLOCK_CACHE_RESPONSE
bit when calling coap_context_set_block_mode(). If not enabled, then, for OSCORE
the response is sent as a separate response (empty ACK followed by CON response),
which is how code previous to this PR works.
If coap_context_set_keepalive() is set in the server, CoAP keepalive packets
will get sent for any CoAP session that is curently observing a resource.
If the keepalive times out, then the observation(s) are canceled and the
server session is deleted.
Add in a new function coap_io_get_fds() to get the lists of (internal
to libcoap) file descriptors that are in a read or write pending state,
as well as the timeout time for the next internal to libcoap activity
(e.g. packet retransmission).
Tag server returned data with a digest computed ETag option value so
requests with an ETag option can return 2.03 if there is a match.
The size of bytes hash that is computed for the ETag can be overwritten by
localy defining COAP_ETAG_MAX_BYTES to be a value between 1 and 8 bytes
inclusive. It is set to 4 by default.
Do not write the absolute build path into libcoapTargets.cmake. The
libcoapTargets.cmake is supposed to be packaged and installed by
distros. An absolute path referring to the build directory looks
therefore wrong.
Some build frameworks like Yocto have quality assurance check which
handle these issues as a warning or as an error. Example:
WARNING: libcoap-4.3.4-r0 do_package_qa: QA Issue:
File /usr/lib/cmake/libcoap/libcoapTargets.cmake in package
libcoap-dev contains reference to TMPDIR [buildpaths]
Declaring this header files as build interface looks like the right fix.
In case of a bundled tinytls library the header files should be handled
like the header files from libcoap itself: Either in the build folder of
libcoap or in /usr/include as declared one line above.
If an Observe is de-registered, but an unsolicited Observe response is received
before the de-register response is received, then the unsolicited response
failed to get decrypted.
Stop MbedTLS continuing to try to establish a (D)TLS session where the
server keeps on sending back a Server-Hello when it fails to decrypt
a client handhake (i.e. mismatch on PSK).
New examples/zephyr directory that contains a sample coap-client.
Building the coap-client assumes that the zephyrproject has already been
installed and set up (default directory ~/zephyrproject).
Update stateless token to track 20 bits - the largest no of blocks
as per RFC7959.
Make output of data detail configurable for coap_show_pdu().
Add in new function coap_enable_pdu_data_output() to do this.
Add -x option to coap-client and coap-server to enable this dropping
of data detail.
by:
- Correcting Contiki-NG's value of COAP_DEFAULT_MAX_PDU_RX_SIZE
- Denying to create PDUs longer than COAP_DEFAULT_MAX_PDU_RX_SIZE
- Using the MTU setter, thereby not overriding stack-specific limits
- Using existing constants for L4-specific header sizes