# otDnsQueryConfig Struct Reference

# otDnsQueryConfig


`#include <openthread/dns_client.h>`

Represents a DNS query configuration.

## Summary

Any of the fields in this structure can be set to zero to indicate that it is not specified. How the unspecified fields are treated is determined by the function which uses the instance of `https://openthread.io/reference/struct/ot-dns-query-config`.

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-dns-query-config#structot_dns_query_config_1a0901ae5b76feaba6e99d4a82b82982bb` | `uint8_t` Maximum tx attempts before reporting failure. Zero for unspecified value. |
| `https://openthread.io/reference/struct/ot-dns-query-config#structot_dns_query_config_1a54bf1edc0b3f8f2c6cce84f9fceb8a4f` | `https://openthread.io/reference/group/api-dns#group__api-dns_1gab0b5f6e49609e780d0cb7c9a87f6377a` Allow/Disallow NAT64 address translation during address resolution. |
| `https://openthread.io/reference/struct/ot-dns-query-config#structot_dns_query_config_1af87630645dee9d9e71a0c39d295879a6` | `https://openthread.io/reference/group/api-dns#group__api-dns_1ga6754474ea5deb76d9a035903a88b4314` Indicates whether the server can resolve the query recursively or not. |
| `https://openthread.io/reference/struct/ot-dns-query-config#structot_dns_query_config_1a6ba1fafd301ec957a9287a44f3092110` | `uint32_t` Wait time (in msec) to rx response. Zero indicates unspecified value. |
| `https://openthread.io/reference/struct/ot-dns-query-config#structot_dns_query_config_1a5a4ff559e66255eab5bf78266a3a91a2` | `https://openthread.io/reference/struct/ot-sock-addr` Server address (IPv6 addr/port). All zero or zero port for unspecified. |
| `https://openthread.io/reference/struct/ot-dns-query-config#structot_dns_query_config_1add3c5035ca71515dd60d5bad83b02b98` | `https://openthread.io/reference/group/api-dns#group__api-dns_1gaf4fe63bece26b49d6425501b4ce327db` Determines which records to query during service resolution. |
| `https://openthread.io/reference/struct/ot-dns-query-config#structot_dns_query_config_1a4b4ce1fc37c5f53460cd03da2b0b0dc7` | `https://openthread.io/reference/group/api-dns#group__api-dns_1gaba76aae698b8670b56fb59a6a2e5b4ce` Select default transport protocol. |

## Public attributes

### mMaxTxAttempts

```
uint8_t otDnsQueryConfig::mMaxTxAttempts
```
Maximum tx attempts before reporting failure. Zero for unspecified value.

### mNat64Mode

```
otDnsNat64Mode otDnsQueryConfig::mNat64Mode
```
Allow/Disallow NAT64 address translation during address resolution.

### mRecursionFlag

```
otDnsRecursionFlag otDnsQueryConfig::mRecursionFlag
```
Indicates whether the server can resolve the query recursively or not.

### mResponseTimeout

```
uint32_t otDnsQueryConfig::mResponseTimeout
```
Wait time (in msec) to rx response. Zero indicates unspecified value.

### mServerSockAddr

```
otSockAddr otDnsQueryConfig::mServerSockAddr
```
Server address (IPv6 addr/port). All zero or zero port for unspecified.

### mServiceMode

```
otDnsServiceMode otDnsQueryConfig::mServiceMode
```
Determines which records to query during service resolution.

### mTransportProto

```
otDnsTransportProto otDnsQueryConfig::mTransportProto
```
Select default transport protocol.

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).