pub unsafe extern "C" fn coap_opt_get_opaque(
pkt: *mut coap_pkt_t,
opt_num: c_uint,
value: *mut *mut u8,
) -> ssize_t
Expand description
@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().
@param[in] pkt packet to read from @param[in] opt_num option number to retrieve @param[out] value start of the option value
@return length of option; 0 if the option exists but is empty @return -ENOENT if option not found @return -EINVAL if option cannot be parsed