# otPlatDnssdService Struct Reference

# otPlatDnssdService


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

Represents a DNS-SD service.

## Summary

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

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1a16767147110079ee660ef029207f4de7` | `const char *` The host name (does not include domain name). |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1a0222ca29b1ee30007b1de6d21af730d3` | `uint32_t` The infrastructure network interface index. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1aa3bae456963fe8b6505694cda86d2d88` | `uint16_t` The service port number. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1a07f55bc7724bc125420f1a859faf347c` | `uint16_t` The service priority. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1a3332296630106d19f036840a3bc4c989` | `const char *` The service instance name label (not the full name). |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1a73ccf557bdd881c5b3d0b2831c842845` | `const char *` The service type (e.g., "_mt._udp", does not include domain name). |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1a7b22710f832b25aa8da42bfeae8d165e` | `const char *const *` Array of sub-type labels (can be NULL if no label). |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1a22f045635daa790e1670645c9521a7a4` | `uint16_t` Length of array of sub-type labels. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1a9b8de0d7eb572479b49171cc5df509f5` | `uint32_t` The service TTL in seconds. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1a5e8d6f369a40c6ce2b03bb37342c26b4` | `const uint8_t *` Encoded TXT data bytes. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1ad27b2e126cc7e912528281611b2c0866` | `uint16_t` Length of TXT data. |
| `https://openthread.io/reference/struct/ot-plat-dnssd-service#structot_plat_dnssd_service_1aac13ac64b0f2e30ca8b46268949df82c` | `uint16_t` The service weight. |

## Public attributes

### mHostName

```
const char * otPlatDnssdService::mHostName
```
The host name (does not include domain name).

### mInfraIfIndex

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

### mPort

```
uint16_t otPlatDnssdService::mPort
```
The service port number.

### mPriority

```
uint16_t otPlatDnssdService::mPriority
```
The service priority.

### mServiceInstance

```
const char * otPlatDnssdService::mServiceInstance
```
The service instance name label (not the full name).

### mServiceType

```
const char * otPlatDnssdService::mServiceType
```
The service type (e.g., "_mt._udp", does not include domain name).

### mSubTypeLabels

```
const char *const * otPlatDnssdService::mSubTypeLabels
```
Array of sub-type labels (can be NULL if no label).

### mSubTypeLabelsLength

```
uint16_t otPlatDnssdService::mSubTypeLabelsLength
```
Length of array of sub-type labels.

### mTtl

```
uint32_t otPlatDnssdService::mTtl
```
The service TTL in seconds.

### mTxtData

```
const uint8_t * otPlatDnssdService::mTxtData
```
Encoded TXT data bytes.

### mTxtDataLength

```
uint16_t otPlatDnssdService::mTxtDataLength
```
Length of TXT data.

### mWeight

```
uint16_t otPlatDnssdService::mWeight
```
The service weight.

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