Files
libcoap/include
Jon Shallow 54d52221ba Split COAP_NACK_RST into COAP_NACK_RST and COAP_NACK_ICMP_ISSUE
As COAP_NACK_RST is used for
1. ICMP Port Unreachable message is received
2. CoAP reply RST message.
there needs to be a way to differentiate between these conditions.

If there is detected to be an ICMP response issue to sending a UDP
packet, report this as COAP_NACK_ICMP_ISSUE instead of COAP_NACK_RST.

If the reported issue to coap_session_disconnected() is COAP_NACK_ICMP_ISSUE,
then make sure that the packet (plain or DTLS) gets re-transmitted.

As hinted in #131 discussion, retry of the packet should be attempted,
(as per https://tools.ietf.org/html/rfc7252#section-4.2 ICMP Unreachable)
this fix will cause the plain packet to get retransmitted up to the maximum
retry count if type CON.

Likewise, DTLS will get restarted up to the maximum retry count if type CON.

examples/client.c:

Include COAP_NACK_ICMP_ISSUE in the nack_handler.

include/coap2/coap_io.h:

Add in COAP_NACK_ICMP_ISSUE to coap_nack_reason_t.

src/coap_session.c:

Update coap_session_disconnected() so that plain/DTLS can restart.

src/net.c:

Fix coap_wait_ack() to exponentially back off the re-transmit times.

Update coap_read_session() to report COAP_NACK_ICMP_ISSUE instead of
COAP_NACK_RST.

man/coap_handler.txt.in:

Update documentation
2019-07-19 12:35:49 +02:00
..