# otPlatDnssdKey Struct Reference

# otPlatDnssdKey


`#include <openthread/platform/dnssd.h>`

Represents a DNS-SD key record.

## Summary

See `https://openthread.io/reference/group/plat-dns-sd#group__plat-dns-sd_1gaf1f534e92391539679c1114805f7cfcf`, `https://openthread.io/reference/group/plat-dns-sd#group__plat-dns-sd_1gaef09d752d81a9004b3e80637389262ee` for more details about fields in each case.

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-plat-dnssd-key#structot_plat_dnssd_key_1ab3cc7fb5973c362fd227a6e213659fcc` | `uint16_t` The resource record class. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-key#structot_plat_dnssd_key_1aff9cb4221af33e32558a76660f28302c` | `uint32_t` The infrastructure network interface index. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-key#structot_plat_dnssd_key_1a3dadf33d3d6e8d3939cd6c3372535239` | `const uint8_t *` Byte array containing the key record data. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-key#structot_plat_dnssd_key_1ac5f9f2fe9cb164cd00dbd86591c10e5b` | `uint16_t` Length of `mKeyData` in bytes. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-key#structot_plat_dnssd_key_1abeff38ed5e88fade29b6d7bd80681dd1` | `const char *` A host or a service instance name (does not include domain name). |
| `https://openthread.io/reference/struct/ot-plat-dnssd-key#structot_plat_dnssd_key_1a69a15349bb20832f90eb5e2381b0669d` | `const char *` The service type if key is for a service (does not include domain name). |
| `https://openthread.io/reference/struct/ot-plat-dnssd-key#structot_plat_dnssd_key_1a882c86eb1ad3f64062b69f26db207687` | `uint32_t` The TTL in seconds. |

## Public attributes

### mClass

```
uint16_t otPlatDnssdKey::mClass
```
The resource record class.

### mInfraIfIndex

```
uint32_t otPlatDnssdKey::mInfraIfIndex
```
The infrastructure network interface index.

### mKeyData

```
const uint8_t * otPlatDnssdKey::mKeyData
```
Byte array containing the key record data.

### mKeyDataLength

```
uint16_t otPlatDnssdKey::mKeyDataLength
```
Length of `mKeyData` in bytes.

### mName

```
const char * otPlatDnssdKey::mName
```
A host or a service instance name (does not include domain name).

### mServiceType

```
const char * otPlatDnssdKey::mServiceType
```
The service type if key is for a service (does not include domain name).

### mTtl

```
uint32_t otPlatDnssdKey::mTtl
```
The 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).