# otNetworkDiagEnhRouteData Struct Reference

# otNetworkDiagEnhRouteData


`#include <openthread/netdiag.h>`

Represents a Network Diagnostic Enhanced Route data.

## Summary

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-network-diag-enh-route-data#structot_network_diag_enh_route_data_1a1ea7a01424345fefb56434eb61b54fe6` | `bool` Indicates whether the queried device has a direct link with router. |
| `https://openthread.io/reference/struct/ot-network-diag-enh-route-data#structot_network_diag_enh_route_data_1a9efc7f41e336f373cc10c097094627eb` | `bool` This is the queried device itself. If set, the other fields should be ignored. |
| `https://openthread.io/reference/struct/ot-network-diag-enh-route-data#structot_network_diag_enh_route_data_1a37039d63cc016c7ab3ad261fd2804f4a` | `uint8_t` Link Quality In (applicable when `mHasLink`). |
| `https://openthread.io/reference/struct/ot-network-diag-enh-route-data#structot_network_diag_enh_route_data_1a406ec13e2fb221fee0c8ba9312c1aada` | `uint8_t` Link Quality Out (applicable when `mHasLink`). |
| `https://openthread.io/reference/struct/ot-network-diag-enh-route-data#structot_network_diag_enh_route_data_1ae964d287d07f92f04f4aaa99fd73ae60` | `uint8_t` The next hop Router ID tracked towards this router. |
| `https://openthread.io/reference/struct/ot-network-diag-enh-route-data#structot_network_diag_enh_route_data_1ac5a84bfa28b42e32a600f5896efc4931` | `uint8_t` The route cost associated with forwarding to `mRouterId` using `mNextHop` (when valid). |
| `https://openthread.io/reference/struct/ot-network-diag-enh-route-data#structot_network_diag_enh_route_data_1ae1c9dccd68a03660eb56a015c5270275` | `uint8_t` The Router ID. |

## Public attributes

### mHasLink

```
bool otNetworkDiagEnhRouteData::mHasLink
```
Indicates whether the queried device has a direct link with router.

### mIsSelf

```
bool otNetworkDiagEnhRouteData::mIsSelf
```
This is the queried device itself. If set, the other fields should be ignored.

### mLinkQualityIn

```
uint8_t otNetworkDiagEnhRouteData::mLinkQualityIn
```
Link Quality In (applicable when `mHasLink`).

### mLinkQualityOut

```
uint8_t otNetworkDiagEnhRouteData::mLinkQualityOut
```
Link Quality Out (applicable when `mHasLink`).

### mNextHop

```
uint8_t otNetworkDiagEnhRouteData::mNextHop
```
The next hop Router ID tracked towards this router.

This field indicates the next hop router towards `mRouterId` when using multi-hop forwarding.

If the device has no direct link with the router (`mHasLink == false`), this field indicates the next hop router that would be used to forward messages destined to `mRouterId`.

If the device has a direct link with the router (`mHasLink == true`), this field indicates the alternate multi-hop path that may be used. Note that whether the direct link or this alternate path through the next hop is used to forward messages depends on their associated total path costs.

If there is no next hop, then `OT_NETWORK_MAX_ROUTER_ID + 1` is used.

### mNextHopCost

```
uint8_t otNetworkDiagEnhRouteData::mNextHopCost
```
The route cost associated with forwarding to `mRouterId` using `mNextHop` (when valid).

This is the route cost `mNextHop` has claimed to have towards `mRouterId`. Importantly, it does not include the link cost to send to `mNextHop` itself.

### mRouterId

```
uint8_t otNetworkDiagEnhRouteData::mRouterId
```
The Router ID.

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