pub unsafe extern "C" fn coap_has_unprocessed_critical_options(
    pkt: *const coap_pkt_t
) -> bool
Expand description

@brief Check whether any of the packet’s options that are critical

(i.e must be understood by the receiver, indicated by a 1 in the option number’s least significant bit) were not accessed since the packet was parsed.

Call this in a server on requests after all their option processing has happened, and stop processing the request if it returns true, returning a 4.02 Bad Option response.

Call this in a client when receiving a response before acting on it; consider the response unprocessable if it returns true.

@param[in] pkt pkt to work on

@returns true if any of the options marked as critical at parse time have not been accessed. @returns false if there are no critical options, or all have been accessed.