Function otDnsClientQueryRecord

Source
pub unsafe extern "C" fn otDnsClientQueryRecord(
    aInstance: *mut otInstance,
    aRecordType: u16,
    aFirstLabel: *const c_char,
    aNextLabels: *const c_char,
    aCallback: otDnsRecordCallback,
    aContext: *mut c_void,
    aConfig: *const otDnsQueryConfig,
) -> otError
Expand description

Sends a DNS query for a given record type and name.

Requires OPENTHREAD_CONFIG_DNS_CLIENT_ARBITRARY_RECORD_QUERY_ENABLE.

The @p aConfig can be NULL. In this case the default config (from otDnsClientGetDefaultConfig()) will be used as the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.

@param[in] aInstance A pointer to an OpenThread instance. @param[in] aRecordType The resource record type to query. @param[in] aFirstLabel The first label of the name to be queried (can be NULL if not needed). @param[in] aNextLabels The next labels of the name to be queried (MUST NOT be NULL). @param[in] aCallback A function pointer that shall be called on response reception or time-out. @param[in] aContext A pointer to arbitrary context information used when @p aCallback is invoked. @param[in] aConfig A pointer to the config to use for this query.

@retval OT_ERROR_NONE Query sent successfully. @p aCallback will be invoked to report the outcome. @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query. @retval OT_ERROR_INVALID_STATE Cannot send query since Thread interface is not up.