riot_sys::bindgen

Function coap_tree_handler

Source
pub unsafe extern "C" fn coap_tree_handler(
    pkt: *mut coap_pkt_t,
    resp_buf: *mut u8,
    resp_buf_len: c_uint,
    ctx: *mut coap_request_ctx_t,
    resources: *const coap_resource_t,
    resources_numof: size_t,
) -> ssize_t
Expand description

@brief Pass a coap request to a matching handler

This function will try to find a matching handler in @p resources and call the handler.

@param[in] pkt pointer to (parsed) CoAP packet @param[out] resp_buf buffer for response @param[in] resp_buf_len size of response buffer @param[in] ctx CoAP request context information @param[in] resources Array of coap endpoint resources @param[in] resources_numof length of the coap endpoint resources

@returns size of the reply packet on success @returns <0 on error