Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Update 6P for better conformance with IETF RFC 8480 #987
This PR updates 6P implementation for better conformance with IETF RFC 8480. Yet, some of behaviors defined in RFC 8480 are not implemented on purpose. For these, I put comments explaining why, to provide code-readers with clearer ideas behind.
In addition, this PR introduces
New behavioral changes are tested manly by
Once this PR is merged, I will update the wiki.
Thank @debug-ito for his inputs and preliminary reviews.
'coap-lwm2m' test failed for some reason: https://travis-ci.org/contiki-ng/contiki-ng/jobs/549757701
I don't think the changes in this PR caused the failure. I will re-run the test to see if the test failure persists.
The error handler is a channel through which a scheduling function becomes aware of an erroneous situation such as schedule consistency.
We change the behavior to take seqno in the last complete transaction even if it ends with an 'ERR' return code except for RC_ERR_VERSION and RC_ERR_SFID.
What RFC 8480 describes for seqno management could cause the initiator to have two consecutive requests having the same seqno, which would bring a confusion to a SF if a response to the first request arrives after the initiator sends the second one. That delayed response will be treated as a legitimate response to the second request, but it is not true. To prevent that, next_seqno is incremented just after having a request ready to send.