[riot-notifications] [RIOT-OS/RIOT] net/nanocoap: get option bytes (#12075)

Ken Bannister notifications at github.com
Wed Sep 11 20:53:34 CEST 2019

kb2ma commented on this pull request.

> @@ -573,6 +573,23 @@ static inline ssize_t coap_get_uri_query(const coap_pkt_t *pkt, uint8_t *target)
 ssize_t coap_opt_get_next(const coap_pkt_t *pkt, coap_optpos_t *opt,
                           uint8_t **value, bool init_opt);
+ * @brief   Retrieve the value for an option as an opaque array of bytes
+ *
+ * Retrieves the location and length of the option value of any type. Useful for
+ * an opaque option, which essentially is an array of bytes. If more than one
+ * option for a given option number, retrieves the first option. To retrieve
+ * subsequent options, see coap_opt_get_next().

I agree that it would be better if the library user was not required to make this calculation.

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/20190911/0972a1a8/attachment.htm>

More information about the notifications mailing list