Type Alias otDnsRecordCallback

Source
pub type otDnsRecordCallback = Option<unsafe extern "C" fn(aError: otError, aResponse: *const otDnsRecordResponse, aContext: *mut c_void)>;
Expand description

Pointer is called when a DNS response is received for a DNS query to an arbitrary record type.

Within this callback the user can use otDnsRecordResponseGet{Item}() functions along with the @p aResponse pointer to get more info about the response.

The @p aResponse pointer can only be used within this callback and after returning from this function it will not stay valid, so the user MUST NOT retain the @p aResponse pointer for later use.

@param[in] aError The result of the DNS transaction. @param[in] aResponse A pointer to the response (it is always non-NULL). @param[in] aContext A pointer to application-specific context.

The @p aError can have the following:

  • OT_ERROR_NONE A response was received successfully.
  • OT_ERROR_ABORT A DNS transaction was aborted by the stack.
  • OT_ERROR_RESPONSE_TIMEOUT No DNS response has been received within timeout.

Aliased Type§

pub enum otDnsRecordCallback {
    None,
    Some(unsafe extern "C" fn(u32, *const otDnsRecordResponse, *mut c_void)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(u32, *const otDnsRecordResponse, *mut c_void))

Some value of type T.