Border Router
This module includes functions to manage local network data with the OpenThread Border Router.
Summary
Typedefs |
|
---|---|
otBorderRouterNetDataFullCallback)(void *aContext)
|
typedefvoid(*
Function pointer callback which is invoked when Network Data (local or leader) gets full. |
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)
|
Provides a full or stable copy of the local Thread Network Data.
|
otBorderRouterGetNextOnMeshPrefix(otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig)
|
Gets the next On Mesh Prefix in the local Network Data.
|
otBorderRouterGetNextRoute(otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig)
|
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.
|
otBorderRouterSetNetDataFullCallback(otInstance *aInstance, otBorderRouterNetDataFullCallback aCallback, void *aContext)
|
void
Sets the callback to indicate when Network Data gets full.
|
Typedefs
otBorderRouterNetDataFullCallback
void(* otBorderRouterNetDataFullCallback)(void *aContext)
Function pointer callback which is invoked when Network Data (local or leader) gets full.
Details | |||
---|---|---|---|
Parameters |
|
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 )
Provides a full or stable copy of the local Thread Network Data.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otBorderRouterGetNextOnMeshPrefix
otError otBorderRouterGetNextOnMeshPrefix( otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig )
Gets the next On Mesh Prefix in the local Network Data.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otBorderRouterGetNextRoute
otError otBorderRouterGetNextRoute( otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig )
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
otBorderRouterSetNetDataFullCallback
void otBorderRouterSetNetDataFullCallback( otInstance *aInstance, otBorderRouterNetDataFullCallback aCallback, void *aContext )
Sets the callback to indicate when Network Data gets full.
Requires OPENTHREAD_CONFIG_BORDER_ROUTER_SIGNAL_NETWORK_DATA_FULL
.
The callback is invoked whenever:
- The device is acting as a leader and receives a Network Data registration from a Border Router (BR) that it cannot add to Network Data (running out of space).
- The device is acting as a BR and new entries cannot be added to its local Network Data.
- The device is acting as a BR and tries to register its local Network Data entries with the leader, but determines that its local entries will not fit.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
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.