pub unsafe extern "C" fn coap_opt_add_opaque(
pkt: *mut coap_pkt_t,
optnum: u16,
val: *const c_void,
val_len: size_t,
) -> ssize_t
Expand description
@brief Encode the given buffer as an opaque data option into pkt
@post pkt.payload advanced to first byte after option(s) @post pkt.payload_len reduced by option(s) length
@param[in,out] pkt pkt referencing target buffer @param[in] optnum option number to use @param[in] val pointer to the value to be set @param[in] val_len length of val
@return number of bytes written to buffer @return <0 on error @return -ENOSPC if no available options