Backbone Router

This module includes functions for the OpenThread Backbone Router Service.

Summary

Enumerations

otBackboneRouterDomainPrefixEvent{
  OT_BACKBONE_ROUTER_DOMAIN_PREFIX_ADDED = 0,
  OT_BACKBONE_ROUTER_DOMAIN_PREFIX_REMOVED = 1,
  OT_BACKBONE_ROUTER_DOMAIN_PREFIX_CHANGED = 2
}
enum
Represents the Domain Prefix events.
otBackboneRouterMulticastListenerEvent{
  OT_BACKBONE_ROUTER_MULTICAST_LISTENER_ADDED = 0,
  OT_BACKBONE_ROUTER_MULTICAST_LISTENER_REMOVED = 1
}
enum
Represents the Multicast Listener events.
otBackboneRouterNdProxyEvent{
  OT_BACKBONE_ROUTER_NDPROXY_ADDED = 0,
  OT_BACKBONE_ROUTER_NDPROXY_REMOVED = 1,
  OT_BACKBONE_ROUTER_NDPROXY_RENEWED = 2,
  OT_BACKBONE_ROUTER_NDPROXY_CLEARED = 3
}
enum
Represents the ND Proxy events.
otBackboneRouterState{
  OT_BACKBONE_ROUTER_STATE_DISABLED = 0,
  OT_BACKBONE_ROUTER_STATE_SECONDARY = 1,
  OT_BACKBONE_ROUTER_STATE_PRIMARY = 2
}
enum
Represents the Backbone Router Status.

Typedefs

otBackboneRouterConfig typedef
Represents Backbone Router configuration.
otBackboneRouterDomainPrefixCallback)(void *aContext, otBackboneRouterDomainPrefixEvent aEvent, const otIp6Prefix *aDomainPrefix) typedef
void(*
Pointer is called whenever the Domain Prefix changed.
otBackboneRouterMulticastListenerCallback)(void *aContext, otBackboneRouterMulticastListenerEvent aEvent, const otIp6Address *aAddress) typedef
void(*
Pointer is called whenever the Multicast Listeners change.
otBackboneRouterMulticastListenerInfo typedef
Represents a Backbone Router Multicast Listener info.
otBackboneRouterMulticastListenerIterator typedef
uint16_t
Used to iterate through Multicast Listeners.
otBackboneRouterNdProxyCallback)(void *aContext, otBackboneRouterNdProxyEvent aEvent, const otIp6Address *aDua) typedef
void(*
Pointer is called whenever the Nd Proxy changed.
otBackboneRouterNdProxyInfo typedef
Represents the Backbone Router ND Proxy info.

Functions

otBackboneRouterConfigNextDuaRegistrationResponse(otInstance *aInstance, const otIp6InterfaceIdentifier *aMlIid, uint8_t aStatus)
void
Configures response status for next DUA registration.
otBackboneRouterConfigNextMulticastListenerRegistrationResponse(otInstance *aInstance, uint8_t aStatus)
void
Configures the response status for the next Multicast Listener Registration.
otBackboneRouterGetConfig(otInstance *aInstance, otBackboneRouterConfig *aConfig)
void
Gets the local Backbone Router configuration.
otBackboneRouterGetDomainPrefix(otInstance *aInstance, otBorderRouterConfig *aConfig)
Gets the local Domain Prefix configuration.
otBackboneRouterGetNdProxyInfo(otInstance *aInstance, const otIp6Address *aDua, otBackboneRouterNdProxyInfo *aNdProxyInfo)
Gets the Backbone Router ND Proxy info.
otBackboneRouterGetPrimary(otInstance *aInstance, otBackboneRouterConfig *aConfig)
Gets the Primary Backbone Router information in the Thread Network.
otBackboneRouterGetRegistrationJitter(otInstance *aInstance)
uint8_t
Returns the Backbone Router registration jitter value.
otBackboneRouterGetState(otInstance *aInstance)
Gets the Backbone Router otBackboneRouterState.
otBackboneRouterMulticastListenerAdd(otInstance *aInstance, const otIp6Address *aAddress, uint32_t aTimeout)
Adds a Multicast Listener with a timeout value, in seconds.
otBackboneRouterMulticastListenerClear(otInstance *aInstance)
void
Clears the Multicast Listeners.
otBackboneRouterMulticastListenerGetNext(otInstance *aInstance, otBackboneRouterMulticastListenerIterator *aIterator, otBackboneRouterMulticastListenerInfo *aListenerInfo)
Gets the next Multicast Listener info (using an iterator).
otBackboneRouterRegister(otInstance *aInstance)
Explicitly registers local Backbone Router configuration.
otBackboneRouterSetConfig(otInstance *aInstance, const otBackboneRouterConfig *aConfig)
Sets the local Backbone Router configuration otBackboneRouterConfig.
otBackboneRouterSetDomainPrefixCallback(otInstance *aInstance, otBackboneRouterDomainPrefixCallback aCallback, void *aContext)
void
Sets the Backbone Router Domain Prefix callback.
otBackboneRouterSetEnabled(otInstance *aInstance, bool aEnable)
void
Enables or disables Backbone functionality.
otBackboneRouterSetMulticastListenerCallback(otInstance *aInstance, otBackboneRouterMulticastListenerCallback aCallback, void *aContext)
void
Sets the Backbone Router Multicast Listener callback.
otBackboneRouterSetNdProxyCallback(otInstance *aInstance, otBackboneRouterNdProxyCallback aCallback, void *aContext)
void
Sets the Backbone Router ND Proxy callback.
otBackboneRouterSetRegistrationJitter(otInstance *aInstance, uint8_t aJitter)
void
Sets the Backbone Router registration jitter value.

Macros

OT_BACKBONE_ROUTER_MULTICAST_LISTENER_ITERATOR_INIT 0
Initializer for otBackboneRouterMulticastListenerIterator.

Structs

otBackboneRouterConfig

Represents Backbone Router configuration.

otBackboneRouterMulticastListenerInfo

Represents a Backbone Router Multicast Listener info.

otBackboneRouterNdProxyInfo

Represents the Backbone Router ND Proxy info.

Enumerations

otBackboneRouterDomainPrefixEvent

 otBackboneRouterDomainPrefixEvent

Represents the Domain Prefix events.

Properties
OT_BACKBONE_ROUTER_DOMAIN_PREFIX_ADDED

Domain Prefix was added.

OT_BACKBONE_ROUTER_DOMAIN_PREFIX_CHANGED

Domain Prefix was changed.

OT_BACKBONE_ROUTER_DOMAIN_PREFIX_REMOVED

Domain Prefix was removed.

otBackboneRouterMulticastListenerEvent

 otBackboneRouterMulticastListenerEvent

Represents the Multicast Listener events.

Properties
OT_BACKBONE_ROUTER_MULTICAST_LISTENER_ADDED

Multicast Listener was added.

OT_BACKBONE_ROUTER_MULTICAST_LISTENER_REMOVED

Multicast Listener was removed or expired.

otBackboneRouterNdProxyEvent

 otBackboneRouterNdProxyEvent

Represents the ND Proxy events.

Properties
OT_BACKBONE_ROUTER_NDPROXY_ADDED

ND Proxy was added.

OT_BACKBONE_ROUTER_NDPROXY_CLEARED

All ND Proxies were cleared.

OT_BACKBONE_ROUTER_NDPROXY_REMOVED

ND Proxy was removed.

OT_BACKBONE_ROUTER_NDPROXY_RENEWED

ND Proxy was renewed.

otBackboneRouterState

 otBackboneRouterState

Represents the Backbone Router Status.

Properties
OT_BACKBONE_ROUTER_STATE_DISABLED

Backbone function is disabled.

OT_BACKBONE_ROUTER_STATE_PRIMARY

The Primary Backbone Router.

OT_BACKBONE_ROUTER_STATE_SECONDARY

Secondary Backbone Router.

Typedefs

otBackboneRouterConfig

struct otBackboneRouterConfig otBackboneRouterConfig

Represents Backbone Router configuration.

otBackboneRouterDomainPrefixCallback

void(* otBackboneRouterDomainPrefixCallback)(void *aContext, otBackboneRouterDomainPrefixEvent aEvent, const otIp6Prefix *aDomainPrefix)

Pointer is called whenever the Domain Prefix changed.

Details
Parameters
[in] aContext
The user context pointer.
[in] aEvent
The Domain Prefix event.
[in] aDomainPrefix
The new Domain Prefix if added or changed, nullptr otherwise.

otBackboneRouterMulticastListenerCallback

void(* otBackboneRouterMulticastListenerCallback)(void *aContext, otBackboneRouterMulticastListenerEvent aEvent, const otIp6Address *aAddress)

Pointer is called whenever the Multicast Listeners change.

Details
Parameters
[in] aContext
The user context pointer.
[in] aEvent
The Multicast Listener event.
[in] aAddress
The IPv6 multicast address of the Multicast Listener.

otBackboneRouterMulticastListenerInfo

struct otBackboneRouterMulticastListenerInfo otBackboneRouterMulticastListenerInfo

Represents a Backbone Router Multicast Listener info.

otBackboneRouterMulticastListenerIterator

uint16_t otBackboneRouterMulticastListenerIterator

Used to iterate through Multicast Listeners.

otBackboneRouterNdProxyCallback

void(* otBackboneRouterNdProxyCallback)(void *aContext, otBackboneRouterNdProxyEvent aEvent, const otIp6Address *aDua)

Pointer is called whenever the Nd Proxy changed.

Details
Parameters
[in] aContext
The user context pointer.
[in] aEvent
The ND Proxy event.
[in] aDua
The Domain Unicast Address of the ND Proxy, or nullptr if aEvent is OT_BACKBONE_ROUTER_NDPROXY_CLEARED.

otBackboneRouterNdProxyInfo

struct otBackboneRouterNdProxyInfo otBackboneRouterNdProxyInfo

Represents the Backbone Router ND Proxy info.

Functions

otBackboneRouterConfigNextDuaRegistrationResponse

void otBackboneRouterConfigNextDuaRegistrationResponse(
  otInstance *aInstance,
  const otIp6InterfaceIdentifier *aMlIid,
  uint8_t aStatus
)

Configures response status for next DUA registration.

Note: available only when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE is enabled. Only used for test and certification.

TODO: (DUA) support coap error code and corresponding process for certification purpose.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aMlIid
A pointer to the Mesh Local IID. If NULL, respond with aStatus for any coming DUA.req, otherwise only respond the one with matching aMlIid.
[in] aStatus
The status to respond.

otBackboneRouterConfigNextMulticastListenerRegistrationResponse

void otBackboneRouterConfigNextMulticastListenerRegistrationResponse(
  otInstance *aInstance,
  uint8_t aStatus
)

Configures the response status for the next Multicast Listener Registration.

Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE, OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE, and OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE are enabled.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aStatus
The status to respond.

otBackboneRouterGetConfig

void otBackboneRouterGetConfig(
  otInstance *aInstance,
  otBackboneRouterConfig *aConfig
)

Gets the local Backbone Router configuration.

Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is enabled.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[out] aConfig
A pointer where to put local Backbone Router configuration.
See also:
otBackboneRouterSetEnabled
otBackboneRouterGetState
otBackboneRouterSetConfig
otBackboneRouterRegister

otBackboneRouterGetDomainPrefix

otError otBackboneRouterGetDomainPrefix(
  otInstance *aInstance,
  otBorderRouterConfig *aConfig
)

Gets the local Domain Prefix configuration.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[out] aConfig
A pointer to the Domain Prefix configuration.
Return Values
OT_ERROR_NONE
Successfully got the Domain Prefix configuration.
OT_ERROR_NOT_FOUND
No Domain Prefix was configured.

otBackboneRouterGetNdProxyInfo

otError otBackboneRouterGetNdProxyInfo(
  otInstance *aInstance,
  const otIp6Address *aDua,
  otBackboneRouterNdProxyInfo *aNdProxyInfo
)

Gets the Backbone Router ND Proxy info.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aDua
The Domain Unicast Address.
[out] aNdProxyInfo
A pointer to the ND Proxy info.
Return Values
OT_ERROR_NONE
Successfully got the ND Proxy info.
OT_ERROR_NOT_FOUND
Failed to find the Domain Unicast Address in the ND Proxy table.

otBackboneRouterGetPrimary

otError otBackboneRouterGetPrimary(
  otInstance *aInstance,
  otBackboneRouterConfig *aConfig
)

Gets the Primary Backbone Router information in the Thread Network.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[out] aConfig
A pointer to where to put Primary Backbone Router information.
Return Values
OT_ERROR_NONE
Successfully got Primary Backbone Router information.
OT_ERROR_NOT_FOUND
No Primary Backbone Router exists.

otBackboneRouterGetRegistrationJitter

uint8_t otBackboneRouterGetRegistrationJitter(
  otInstance *aInstance
)

Returns the Backbone Router registration jitter value.

Details
Returns
The Backbone Router registration jitter value.
See also:
otBackboneRouterSetRegistrationJitter

otBackboneRouterGetState

otBackboneRouterState otBackboneRouterGetState(
  otInstance *aInstance
)

Gets the Backbone Router otBackboneRouterState.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Return Values
OT_BACKBONE_ROUTER_STATE_DISABLED
Backbone functionality is disabled.
OT_BACKBONE_ROUTER_STATE_SECONDARY
Secondary Backbone Router.
OT_BACKBONE_ROUTER_STATE_PRIMARY
The Primary Backbone Router.
See also:
otBackboneRouterSetEnabled
otBackboneRouterGetConfig
otBackboneRouterSetConfig
otBackboneRouterRegister

otBackboneRouterMulticastListenerAdd

otError otBackboneRouterMulticastListenerAdd(
  otInstance *aInstance,
  const otIp6Address *aAddress,
  uint32_t aTimeout
)

Adds a Multicast Listener with a timeout value, in seconds.

Pass 0 to use the default MLR timeout.

Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE, OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE, and OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE are enabled.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aAddress
The Multicast Listener address.
[in] aTimeout
The timeout (in seconds) of the Multicast Listener, or 0 to use the default MLR timeout.
Return Values
OT_ERROR_NONE
If the Multicast Listener was successfully added.
OT_ERROR_INVALID_ARGS
If the Multicast Listener address was invalid.
OT_ERROR_NO_BUFS
No space available to save the Multicast Listener.
See also:
otBackboneRouterMulticastListenerClear
otBackboneRouterMulticastListenerGetNext

otBackboneRouterMulticastListenerClear

void otBackboneRouterMulticastListenerClear(
  otInstance *aInstance
)

Clears the Multicast Listeners.

Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE, OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE, and OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE are enabled.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
See also:
otBackboneRouterMulticastListenerAdd
otBackboneRouterMulticastListenerGetNext

otBackboneRouterMulticastListenerGetNext

otError otBackboneRouterMulticastListenerGetNext(
  otInstance *aInstance,
  otBackboneRouterMulticastListenerIterator *aIterator,
  otBackboneRouterMulticastListenerInfo *aListenerInfo
)

Gets the next Multicast Listener info (using an iterator).

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in,out] aIterator
A pointer to the iterator. On success the iterator will be updated to point to next Multicast Listener. To get the first entry the iterator should be set to OT_BACKBONE_ROUTER_MULTICAST_LISTENER_ITERATOR_INIT.
[out] aListenerInfo
A pointer to an otBackboneRouterMulticastListenerInfo where information of next Multicast Listener is placed (on success).
Return Values
OT_ERROR_NONE
Successfully found the next Multicast Listener info (aListenerInfo was successfully updated).
OT_ERROR_NOT_FOUND
No subsequent Multicast Listener info was found.
See also:
otBackboneRouterMulticastListenerClear
otBackboneRouterMulticastListenerAdd

otBackboneRouterRegister

otError otBackboneRouterRegister(
  otInstance *aInstance
)

Explicitly registers local Backbone Router configuration.

A Server Data Request message SRV_DATA.ntf is triggered for the attached device.

Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is enabled.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
Return Values
OT_ERROR_NO_BUFS
Insufficient space to add the Backbone Router service.
OT_ERROR_NONE
Successfully queued a Server Data Request message for delivery.
See also:
otBackboneRouterSetEnabled
otBackboneRouterGetState
otBackboneRouterGetConfig
otBackboneRouterSetConfig

otBackboneRouterSetConfig

otError otBackboneRouterSetConfig(
  otInstance *aInstance,
  const otBackboneRouterConfig *aConfig
)

Sets the local Backbone Router configuration otBackboneRouterConfig.

A Server Data Request message SRV_DATA.ntf is initiated automatically if BBR Dataset changes for Primary Backbone Router.

Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is enabled.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aConfig
A pointer to the Backbone Router configuration to take effect.
Return Values
OT_ERROR_NONE
Successfully updated configuration.
OT_ERROR_INVALID_ARGS
The configuration in aConfig is invalid.
See also:
otBackboneRouterSetEnabled
otBackboneRouterGetState
otBackboneRouterGetConfig
otBackboneRouterRegister

otBackboneRouterSetDomainPrefixCallback

void otBackboneRouterSetDomainPrefixCallback(
  otInstance *aInstance,
  otBackboneRouterDomainPrefixCallback aCallback,
  void *aContext
)

Sets the Backbone Router Domain Prefix callback.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aCallback
A pointer to the Domain Prefix callback.
[in] aContext
A user context pointer.

otBackboneRouterSetEnabled

void otBackboneRouterSetEnabled(
  otInstance *aInstance,
  bool aEnable
)

Enables or disables Backbone functionality.

If enabled, a Server Data Request message SRV_DATA.ntf is triggered for the attached device if there is no Backbone Router Service in the Thread Network Data.

If disabled, SRV_DATA.ntf is triggered if the Backbone Router is in the Primary state.

Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is enabled.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aEnable
TRUE to enable Backbone functionality, FALSE otherwise.
See also:
otBackboneRouterGetState
otBackboneRouterGetConfig
otBackboneRouterSetConfig
otBackboneRouterRegister

otBackboneRouterSetMulticastListenerCallback

void otBackboneRouterSetMulticastListenerCallback(
  otInstance *aInstance,
  otBackboneRouterMulticastListenerCallback aCallback,
  void *aContext
)

Sets the Backbone Router Multicast Listener callback.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aCallback
A pointer to the Multicast Listener callback.
[in] aContext
A user context pointer.

otBackboneRouterSetNdProxyCallback

void otBackboneRouterSetNdProxyCallback(
  otInstance *aInstance,
  otBackboneRouterNdProxyCallback aCallback,
  void *aContext
)

Sets the Backbone Router ND Proxy callback.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aCallback
A pointer to the ND Proxy callback.
[in] aContext
A user context pointer.

otBackboneRouterSetRegistrationJitter

void otBackboneRouterSetRegistrationJitter(
  otInstance *aInstance,
  uint8_t aJitter
)

Sets the Backbone Router registration jitter value.

Details
Parameters
[in] aJitter
the Backbone Router registration jitter value to set.
See also:
otBackboneRouterGetRegistrationJitter

Macros

OT_BACKBONE_ROUTER_MULTICAST_LISTENER_ITERATOR_INIT

 OT_BACKBONE_ROUTER_MULTICAST_LISTENER_ITERATOR_INIT 0

Initializer for otBackboneRouterMulticastListenerIterator.

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.