riot_sys::bindgen

Function gcoap_resp_init

Source
pub unsafe extern "C" fn gcoap_resp_init(
    pdu: *mut coap_pkt_t,
    buf: *mut u8,
    len: size_t,
    code: c_uint,
) -> c_int
Expand description

@brief Initializes a CoAP response packet on a buffer

Initializes payload location within the buffer based on packet setup.

@param[out] pdu Response metadata @param[in] buf Buffer containing the PDU @param[in] len Length of the buffer @param[in] code Response code

@return 0 on success @return < 0 on error