Border Router
This module includes functions to manage local network data with the OpenThread Border Router.
Summary
Functions |
|
---|---|
otBorderRouterAddOnMeshPrefix(otInstance *aInstance, const otBorderRouterConfig *aConfig)
|
Add a border router configuration to the local network data.
|
otBorderRouterAddRoute(otInstance *aInstance, const otExternalRouteConfig *aConfig)
|
Add an external route configuration to the local network data.
|
otBorderRouterGetNetData(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength)
|
This method provides a full or stable copy of the local Thread Network Data.
|
otBorderRouterGetNextOnMeshPrefix(otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig)
|
This function gets the next On Mesh Prefix in the local Network Data.
|
otBorderRouterGetNextRoute(otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig)
|
This function gets the next external route in the local Network Data.
|
otBorderRouterRegister(otInstance *aInstance)
|
Immediately register the local network data with the Leader.
|
otBorderRouterRemoveOnMeshPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix)
|
Remove a border router configuration from the local network data.
|
otBorderRouterRemoveRoute(otInstance *aInstance, const otIp6Prefix *aPrefix)
|
Remove an external route configuration from the local network data.
|
otBorderRoutingGetNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefix)
|
This function returns the local NAT64 prefix.
|
otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix)
|
This method returns the off-mesh-routable (OMR) prefix.
|
otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix)
|
This method returns the on-link prefix for the adjacent infrastructure link.
|
otBorderRoutingInit(otInstance *aInstance, uint32_t aInfraIfIndex, bool aInfraIfIsRunning)
|
This method initializes the Border Routing Manager on given infrastructure interface.
|
otBorderRoutingSetEnabled(otInstance *aInstance, bool aEnabled)
|
This method enables/disables the Border Routing Manager.
|
Functions
otBorderRouterAddOnMeshPrefix
otError otBorderRouterAddOnMeshPrefix( otInstance *aInstance, const otBorderRouterConfig *aConfig )
Add a border router configuration to the local network data.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otBorderRouterRemoveOnMeshPrefix
otBorderRouterRegister
otBorderRouterAddRoute
otError otBorderRouterAddRoute( otInstance *aInstance, const otExternalRouteConfig *aConfig )
Add an external route configuration to the local network data.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otBorderRouterRemoveRoute
otBorderRouterRegister
otBorderRouterGetNetData
otError otBorderRouterGetNetData( otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength )
This method provides a full or stable copy of the local Thread Network Data.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otBorderRouterGetNextOnMeshPrefix
otError otBorderRouterGetNextOnMeshPrefix( otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig )
This function gets the next On Mesh Prefix in the local Network Data.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otBorderRouterGetNextRoute
otError otBorderRouterGetNextRoute( otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig )
This function gets the next external route in the local Network Data.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otBorderRouterRegister
otError otBorderRouterRegister( otInstance *aInstance )
Immediately register the local network data with the Leader.
Details | |||
---|---|---|---|
Parameters |
|
||
Return Values |
|
otBorderRouterAddOnMeshPrefix
otBorderRouterRemoveOnMeshPrefix
otBorderRouterAddRoute
otBorderRouterRemoveRoute
otBorderRouterRemoveOnMeshPrefix
otError otBorderRouterRemoveOnMeshPrefix( otInstance *aInstance, const otIp6Prefix *aPrefix )
Remove a border router configuration from the local network data.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otBorderRouterAddOnMeshPrefix
otBorderRouterRegister
otBorderRouterRemoveRoute
otError otBorderRouterRemoveRoute( otInstance *aInstance, const otIp6Prefix *aPrefix )
Remove an external route configuration from the local network data.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otBorderRouterAddRoute
otBorderRouterRegister
otBorderRoutingGetNat64Prefix
otError otBorderRoutingGetNat64Prefix( otInstance *aInstance, otIp6Prefix *aPrefix )
This function returns the local NAT64 prefix.
This prefix might not be advertised in the Thread network.
This function is only available when OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
is enabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otBorderRoutingGetOmrPrefix
otError otBorderRoutingGetOmrPrefix( otInstance *aInstance, otIp6Prefix *aPrefix )
This method returns the off-mesh-routable (OMR) prefix.
The randomly generated 64-bit prefix will be published in the Thread network if there isn't already an OMR prefix.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otBorderRoutingGetOnLinkPrefix
otError otBorderRoutingGetOnLinkPrefix( otInstance *aInstance, otIp6Prefix *aPrefix )
This method returns the on-link prefix for the adjacent infrastructure link.
The randomly generated 64-bit prefix will be advertised on the infrastructure link if there isn't already a usable on-link prefix being advertised on the link.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otBorderRoutingInit
otError otBorderRoutingInit( otInstance *aInstance, uint32_t aInfraIfIndex, bool aInfraIfIsRunning )
This method initializes the Border Routing Manager on given infrastructure interface.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatInfraIfStateChanged.
otBorderRoutingSetEnabled
otError otBorderRoutingSetEnabled( otInstance *aInstance, bool aEnabled )
This method enables/disables the Border Routing Manager.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
Resources
OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.