[riot-notifications] [RIOT-OS/RIOT] net/nanocoap: document internal option functions (#11839)

Ken Bannister notifications at github.com
Tue Jul 16 01:52:00 CEST 2019


kb2ma commented on this pull request.



> @@ -436,6 +448,19 @@ void coap_pkt_init(coap_pkt_t *pkt, uint8_t *buf, size_t len, size_t header_len)
     pkt->payload_len = len - header_len;
 }
 
+/*
+ * Decodes a field value in an Option header, either option delta or length.
+ *
+ * val[in]               Value of a nybble of the first byte of the option
+ *                       header. Lower nybble is coded length of delta; upper
+ *                       nybble is coded length of value.
+ * pkt_pos_ptr[in,out]   in: commonly, first byte of the option's value;
+ *                       otherwise, first byte of extended delta/length header
+ *                       out: next byte after the value or extended header
+ * pkt_end[in]           next byte after all options
+ *
+ * return                field value

Good catch. I made another pass through the return values.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11839#discussion_r303681365
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190715/1d6039ff/attachment.html>


More information about the notifications mailing list