riot_sys::bindgen

Function nanocoap_cache_add_by_req

Source
pub unsafe extern "C" fn nanocoap_cache_add_by_req(
    req: *const coap_pkt_t,
    resp: *const coap_pkt_t,
    resp_len: size_t,
) -> *mut nanocoap_cache_entry_t
Expand description

@brief Creates a new or gets an existing cache entry using the request packet.

@param[in] req The request to calculate the cache-key @param[in] resp The response to add to the cache @param[in] resp_len The actual length of the response message in @p resp

@return The previously existing or newly added cache entry on success @return NULL, if there is no space left