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

Leandro Lanzieri notifications at github.com
Mon Jul 15 09:05:50 CEST 2019

leandrolanzieri 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

You could also add the `-EBADMSG` return value in case of Payload Marker.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190715/4341ace9/attachment.html>

More information about the notifications mailing list