# Border Agent

# Border Agent

This module includes configuration variables for Border Agent.

## Summary

This module includes configuration variables for the Border Agent Admitter.

| ### Macros ||
|---|---|
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1ga5e2cb9924c449997ed4bcfafca965c48 0` | Specifies the default Joiner UDP port used by the Border Admitter. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1ga2bf35198ce7b2c4bf017b5141e6e8c58 0` | Define to 1 to enable Border Agent's Admitter feature. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1ga166d485fe299b5d121eb4133f77cb547 0` | Define to 1 to enable the Border Admitter by default upon OpenThread stack initialization. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1ga9bf5df5ad364b9fc96ae63f3a9bbcefa 0` | Define to 1 to enable the `otBorderAgentEvictActiveCommissioner()` API. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1ga2a9c93d61934ed3f7367f27c51cb26ca 0` | Define to 1 to enable Border Agent support. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1gaae6ae1cba2e4f3576e67dba6c8594c15 (OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE && (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_4))` | Define to 1 to enable ephemeral key mechanism and its APIs in Border Agent. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1gaf9a36f0f386390c79a0652f1be1851cf OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE` | Whether or not the ephemeral key feature is enabled by default at run-time. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1ga6d7ed82850ee1c366f484b7281afc86f 1` | Define to 1 to enable Border Agent ID support. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1ga4bd9defaeb7d138f4158cc265549a1f6 "OpenThread BR (unspecified vendor)"` | Specifies the base name to construct the service instance name used when advertising the mDNS `_meshcop._udp` service by the Border Agent. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1ga4921c0aadea506bc93fffc18893832de (OPENTHREAD_CONFIG_PLATFORM_DNSSD_ENABLE || OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE)` | Define to 1 to enable Border Agent to manage registering/updating of the mDNS MeshCoP service(s) on the infrastructure link. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1ga8f684041787fad5cb0aaa32e12006cef 0` | Define to 1 to enable the Border Agent Tracker feature. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1gae5c687ed7fadab0877f81cdcd3819920 0` | Define to 1 to enable the Border Agent TXT Data Parser feature. |
| `https://openthread.io/reference/config/group/config-border-agent#group__config-border-agent_1gaa86df85ba5734c1935ed8f7c0358ddd6 0` | Specifies the Border Agent UDP port, and use 0 for ephemeral port. |

## Macros

### OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_DEFAULT_JOINER_UDP_PORT

```
 OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_DEFAULT_JOINER_UDP_PORT 0
```
Specifies the default Joiner UDP port used by the Border Admitter.

A value of zero indicates that the Joiner UDP port is not specified/fixed by the Admitter, allowing Joiner Routers to pick.

Applicable when `OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_ENABLE` is enabled.

### OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_ENABLE

```
 OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_ENABLE 0
```
Define to 1 to enable Border Agent's Admitter feature.

### OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_ENABLED_BY_DEFAULT

```
 OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_ENABLED_BY_DEFAULT 0
```
Define to 1 to enable the Border Admitter by default upon OpenThread stack initialization.

Applicable when `OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_ENABLE` is enabled.

### OPENTHREAD_CONFIG_BORDER_AGENT_COMMISSIONER_EVICTION_API_ENABLE

```
 OPENTHREAD_CONFIG_BORDER_AGENT_COMMISSIONER_EVICTION_API_ENABLE 0
```
Define to 1 to enable the `otBorderAgentEvictActiveCommissioner()` API.

This API provides a mechanism to evict the active Thread Commissioner from the network. This is primarily intended for administrative use to handle misbehaving or stale commissioner sessions.

### OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE

```
 OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0
```
Define to 1 to enable Border Agent support.

### OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE

```
 OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE (OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE && (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_4))
```
Define to 1 to enable ephemeral key mechanism and its APIs in Border Agent.

### OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_FEATURE_ENABLED_BY_DEFAULT

```
 OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_FEATURE_ENABLED_BY_DEFAULT OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE
```
Whether or not the ephemeral key feature is enabled by default at run-time.

### OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE

```
 OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE 1
```
Define to 1 to enable Border Agent ID support.

### OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_BASE_NAME

```
 OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_BASE_NAME "OpenThread BR (unspecified vendor)"
```
Specifies the base name to construct the service instance name used when advertising the mDNS `_meshcop._udp` service by the Border Agent.

Applicable when the `OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_ENABLE` feature is enabled.

The name can also be configured using the `otBorderAgentSetMeshCoPServiceBaseName()` API at run-time.

Per the Thread specification, the service instance should be a user-friendly name identifying the device model or product. A recommended format is "VendorName ProductName".

The name MUST have a length less than or equal to `OT_BORDER_AGENT_MESHCOP_SERVICE_BASE_NAME_MAX_LENGTH`.

### OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_ENABLE

```
 OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_ENABLE (OPENTHREAD_CONFIG_PLATFORM_DNSSD_ENABLE || OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE)
```
Define to 1 to enable Border Agent to manage registering/updating of the mDNS MeshCoP service(s) on the infrastructure link.

This includes the ephemeral key service when the `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE` is enabled.

### OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE

```
 OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE 0
```
Define to 1 to enable the Border Agent Tracker feature.

The Border Agent Tracker feature discovers and tracks Border Agents on the infrastructure network. This feature requires either `OPENTHREAD_CONFIG_PLATFORM_DNSSD_ENABLE` or `OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE` to be enabled.

### OPENTHREAD_CONFIG_BORDER_AGENT_TXT_DATA_PARSER_ENABLE

```
 OPENTHREAD_CONFIG_BORDER_AGENT_TXT_DATA_PARSER_ENABLE 0
```
Define to 1 to enable the Border Agent TXT Data Parser feature.

### OPENTHREAD_CONFIG_BORDER_AGENT_UDP_PORT

```
 OPENTHREAD_CONFIG_BORDER_AGENT_UDP_PORT 0
```
Specifies the Border Agent UDP port, and use 0 for ephemeral port.

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