# otDnsRecordInfo Struct Reference

# otDnsRecordInfo


`#include <openthread/dns_client.h>`

Represents info for a record in an `otDnsRecordResponse`.

## Summary

This struct is used as input to `https://openthread.io/reference/group/api-dns#group__api-dns_1ga53862620158f479faf3b16037d68abc9`.

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-dns-record-info#structot_dns_record_info_1a98c7dc03ea74b5091c6f28ea67bd4c2e` | `uint8_t *` Buffer to output the data (Can be NULL if data not needed). |
| `https://openthread.io/reference/struct/ot-dns-record-info#structot_dns_record_info_1adbfb067b860f580e4b3e1f04d0dfcd4d` | `uint16_t` On input, size of `mDataBuffer`. On output number of bytes written. |
| `https://openthread.io/reference/struct/ot-dns-record-info#structot_dns_record_info_1ad6761651f5585fbb668392b7b2e185e8` | `char *` Buffer to output the name (MUST NOT be NULL). |
| `https://openthread.io/reference/struct/ot-dns-record-info#structot_dns_record_info_1a242d416f650c0e76436b0a82e37a5190` | `uint16_t` Size of `mNameBuffer`. |
| `https://openthread.io/reference/struct/ot-dns-record-info#structot_dns_record_info_1aa3f7bddc83eea373374b1869c1cb42ce` | `uint16_t` The record data length (in bytes). |
| `https://openthread.io/reference/struct/ot-dns-record-info#structot_dns_record_info_1a09dd94f01100b02a647af075a36b0791` | `uint16_t` The record type. |
| `https://openthread.io/reference/struct/ot-dns-record-info#structot_dns_record_info_1a9f7a956b945b6f58585229e9d35571db` | `https://openthread.io/reference/group/api-dns#group__api-dns_1ga8412585153e15488e7ea798aab839a7c` Indicates the section of the record. |
| `https://openthread.io/reference/struct/ot-dns-record-info#structot_dns_record_info_1ac9e1e344437a73bac4d49246906204ed` | `uint32_t` Record TTL (in seconds). |

## Public attributes

### mDataBuffer

```
uint8_t * otDnsRecordInfo::mDataBuffer
```
Buffer to output the data (Can be NULL if data not needed).

### mDataBufferSize

```
uint16_t otDnsRecordInfo::mDataBufferSize
```
On input, size of `mDataBuffer`. On output number of bytes written.

### mNameBuffer

```
char * otDnsRecordInfo::mNameBuffer
```
Buffer to output the name (MUST NOT be NULL).

### mNameBufferSize

```
uint16_t otDnsRecordInfo::mNameBufferSize
```
Size of `mNameBuffer`.

### mRecordLength

```
uint16_t otDnsRecordInfo::mRecordLength
```
The record data length (in bytes).

### mRecordType

```
uint16_t otDnsRecordInfo::mRecordType
```
The record type.

### mSection

```
otDnsRecordSection otDnsRecordInfo::mSection
```
Indicates the section of the record.

### mTtl

```
uint32_t otDnsRecordInfo::mTtl
```
Record TTL (in seconds).

## 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).