[][src]Function libcoap_sys::coap_check_option

pub unsafe extern "C" fn coap_check_option(
    pdu: *mut coap_pdu_t,
    type_: u16,
    oi: *mut coap_opt_iterator_t
) -> *mut coap_opt_t

Retrieves the first option of type @p type from @p pdu. @p oi must point to a coap_opt_iterator_t object that will be initialized by this function to filter only options with code @p type. This function returns the first option with this type, or @c NULL if not found.

@param pdu The PDU to parse for options. @param type The option type code to search for. @param oi An iterator object to use.

@return A pointer to the first option of type @p type, or @c NULL if not found.