[][src]Type Definition openthread_sys::otDnsResponseHandler

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

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.