pub unsafe extern "C" fn coap_parse(
pkt: *mut coap_pkt_t,
buf: *mut u8,
len: size_t,
) -> c_int
Expand description
@brief Parse a CoAP PDU
This function parses a raw CoAP PDU from @p buf with size @p len and fills the structure pointed to by @p pkt. @p pkt must point to a preallocated coap_pkt_t structure.
@param[out] pkt structure to parse into @param[in] buf pointer to raw packet data @param[in] len length of packet at @p buf
@returns 0 on success @returns <0 on error