# otMdnsLocalHostAddress Struct Reference

# otMdnsLocalHostAddress


`#include <openthread/mdns.h>`

Represents a local host IPv4 or IPv6 address entry.

## Summary

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-mdns-local-host-address#structot_mdns_local_host_address_1a209b8a510ee550657fc25c9eb260abb9` | `union otMdnsLocalHostAddress::@5` The address. |
| `https://openthread.io/reference/struct/ot-mdns-local-host-address#structot_mdns_local_host_address_1abc8d2575ef619de241cb2899043c1aa8` | `uint32_t` The infrastructure network interface index. |
| `https://openthread.io/reference/struct/ot-mdns-local-host-address#structot_mdns_local_host_address_1aa4f0f21c9b04dc6ebf2499b6a2bd6bd8` | `https://openthread.io/reference/struct/ot-ip4-address` The IPv4 address (valid when `mIsIp6` is false). |
| `https://openthread.io/reference/struct/ot-mdns-local-host-address#structot_mdns_local_host_address_1ad364e1b9a094572faadf5537ef758570` | `https://openthread.io/reference/struct/ot-ip6-address` The IPv6 address (valid when `mIsIp6` is true). |
| `https://openthread.io/reference/struct/ot-mdns-local-host-address#structot_mdns_local_host_address_1a40df59bb3dd4ad22cee4a6c6dd3ecd21` | `bool` Indicates whether the address is IPv6 (`true`) or IPv4 (`false`). |

## Public attributes

### mAddress

```
union otMdnsLocalHostAddress::@5 otMdnsLocalHostAddress::mAddress
```
The address.

### mInfraIfIndex

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

### mIp4

```
otIp4Address otMdnsLocalHostAddress::mIp4
```
The IPv4 address (valid when `mIsIp6` is false).

### mIp6

```
otIp6Address otMdnsLocalHostAddress::mIp6
```
The IPv6 address (valid when `mIsIp6` is true).

### mIsIp6

```
bool otMdnsLocalHostAddress::mIsIp6
```
Indicates whether the address is IPv6 (`true`) or IPv4 (`false`).

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