riot_sys

Function coap_opt_put_uri_pathquery

Source
pub unsafe extern "C" fn coap_opt_put_uri_pathquery(
    buf: *mut u8,
    lastonum: *mut u16,
    uri: *const c_char,
) -> size_t
Expand description

@brief Convenience function for inserting URI_PATH and URI_QUERY into buffer This function will automatically split path and query parameters.

@param[out] buf buffer to write to @param[in,out] lastonum number of previous option (for delta calculation), or 0 if first option May be NULL, then previous option is assumed to be 0. @param[in] uri ptr into a source URI, to the first character after the authority component

@returns amount of bytes written to @p buf

This function may produce two different options (Uri-Path and Uri-Query). Users that need to insert Content-Format, Max-Age or the currently unassigned option 13 need to split their URI themselves and call the respective helper functions.