Function riot_sys::coap_build_hdr

source ·
pub unsafe extern "C" fn coap_build_hdr(
    hdr: *mut coap_hdr_t,
    type_: c_uint,
    token: *mut u8,
    token_len: size_t,
    code: c_uint,
    id: u16
) -> ssize_t
Expand description

@brief Builds a CoAP header

Caller must ensure @p hdr can hold the header and the full token!

@param[out] hdr hdr to fill @param[in] type CoAP packet type (e.g., COAP_TYPE_CON, …) @param[in] token token @param[in] token_len length of @p token @param[in] code CoAP code (e.g., COAP_CODE_204, …) @param[in] id CoAP request id

@returns length of resulting header