# Network Diagnostics

This module includes configuration variables for Network Diagnostics.

## Summary

| ### Macros ||
|---|---|
| `https://openthread.io/reference/config/group/config-network-diagnostic#group__config-network-diagnostic_1ga3d1e6fc81448d4c9144def5663304ee0 ""` | Specifies the default Vendor App URL string. |
| `https://openthread.io/reference/config/group/config-network-diagnostic#group__config-network-diagnostic_1gabd56737b974150db4575bd87e92b6b18 OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` | Define as 1 to add APIs to allow Vendor Name, Model, SW Version to change at run-time. |
| `https://openthread.io/reference/config/group/config-network-diagnostic#group__config-network-diagnostic_1ga82a175cae1b2e4139edb742ddd1fbc8c ""` | Specifies the default Vendor Model string. |
| `https://openthread.io/reference/config/group/config-network-diagnostic#group__config-network-diagnostic_1ga6a17d73e5b57d159155eefe3d5c54ac2 ""` | Specifies the default Vendor Name string. |
| `https://openthread.io/reference/config/group/config-network-diagnostic#group__config-network-diagnostic_1ga89ec957dde4548ed1fc29ade5e071ae1 (0xffffffff)` | Specifies the default Vendor OUI (Organizationally Unique Identifier) value. |
| `https://openthread.io/reference/config/group/config-network-diagnostic#group__config-network-diagnostic_1ga8e7a3b2749a2dd9afab8eb161c15ba5f ""` | Specifies the default Vendor SW Version string. |

## Macros

### OPENTHREAD_CONFIG_NET_DIAG_VENDOR_APP_URL

```
 OPENTHREAD_CONFIG_NET_DIAG_VENDOR_APP_URL ""
```
Specifies the default Vendor App URL string.

### OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE

```
 OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
```
Define as 1 to add APIs to allow Vendor Name, Model, SW Version to change at run-time.

It is recommended that Vendor Name, Model, and SW Version are set at build time using the OpenThread configurations `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_*`. This way they are treated as constants and won't consume RAM.

However, for situations where the OpenThread stack is integrated as a library into different projects/products, this config can be used to add API to change Vendor Name, Model, and SW Version at run-time. In this case, the strings in `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_*` are treated as the default values (used when OT stack is initialized).

Enabled by default for reference devices, when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is defined.

### OPENTHREAD_CONFIG_NET_DIAG_VENDOR_MODEL

```
 OPENTHREAD_CONFIG_NET_DIAG_VENDOR_MODEL ""
```
Specifies the default Vendor Model string.

### OPENTHREAD_CONFIG_NET_DIAG_VENDOR_NAME

```
 OPENTHREAD_CONFIG_NET_DIAG_VENDOR_NAME ""
```
Specifies the default Vendor Name string.

If `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled, the Vendor Name string MUST start with the "RD:" prefix to ensure reference devices are identifiable. This is checked and enforced at build-time (`static_assert`).

### OPENTHREAD_CONFIG_NET_DIAG_VENDOR_OUI

```
 OPENTHREAD_CONFIG_NET_DIAG_VENDOR_OUI (0xffffffff)
```
Specifies the default Vendor OUI (Organizationally Unique Identifier) value.

This configuration supports multiple layout formats to maintain backward compatibility:


- 24-bit OUI (MA-L): Hexadecimal representation of a 24-bit value (e.g., OUI 64-16-66 is represented as `0x641666`). Values \<= `0xffffff` are implicitly treated as a 24-bit OUI.
- Explicit OUI with various lengths (24, 28, or 36 bits): A 48-bit hexadecimal value where the most significant byte (bits 40-47) represents the prefix bit-length, and the lower 5 bytes (bits 0-39) represent the OUI bytes in big-endian order:
  - 28-bit OUI `00-1A-2B-3` is represented as `0x1c001a2b3000ULL`.
  - 36-bit OUI `00-1A-2B-3C-4` is represented as `0x24001a2b3c40ULL`.

<br />

The value of `0xffffffff` (UINT32_MAX) is used to indicate the Vendor OUI is not specified.

The configured value is validated at compile-time to ensure it conforms to one of the supported prefix lengths.

### OPENTHREAD_CONFIG_NET_DIAG_VENDOR_SW_VERSION

```
 OPENTHREAD_CONFIG_NET_DIAG_VENDOR_SW_VERSION ""
```
Specifies the default Vendor SW Version string.

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