Type Alias otDnsResponseHandler

Source
pub type otDnsResponseHandler = Option<unsafe extern "C" fn(aContext: *mut c_void, aHostname: *const c_char, aAddress: *const otIp6Address, aTtl: u32, aResult: otError)>;
Expand description

This function pointer is called when a DNS response is received.

@param[in] aContext A pointer to application-specific context. @param[in] aHostname Identifies hostname related with DNS response. @param[in] aAddress A pointer to the IPv6 address received in DNS response. May be null. @param[in] aTtl Specifies the maximum time in seconds that the resource record may be cached. @param[in] aResult A result of the DNS transaction.

@retval OT_ERROR_NONE A response was received successfully and IPv6 address is provided in @p aAddress. @retval OT_ERROR_ABORT A DNS transaction was aborted by stack. @retval OT_ERROR_RESPONSE_TIMEOUT No DNS response has been received within timeout. @retval OT_ERROR_NOT_FOUND A response was received but no IPv6 address has been found. @retval OT_ERROR_FAILED A response was received but status code is different than success.

Aliased Type§

enum otDnsResponseHandler {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: *const i8, _: *const otIp6Address, _: u32, _: u32)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *const i8, _: *const otIp6Address, _: u32, _: u32))

Some value of type T.