[−][src]Function libcoap_sys::coap_pdu_parse
pub unsafe extern "C" fn coap_pdu_parse(
proto: coap_proto_t,
data: *const u8,
length: usize,
pdu: *mut coap_pdu_t
) -> c_int
Parses @p data into the CoAP PDU structure given in @p result. The target pdu must be large enough to This function returns @c 0 on error or a number greater than zero on success.
@param proto Session's protocol @param data The raw data to parse as CoAP PDU. @param length The actual size of @p data. @param pdu The PDU structure to fill. Note that the structure must provide space to hold at least the token and options part of the message.
@return 1 on success or @c 0 on error.