Backbone Router

This module includes functions for the OpenThread Backbone Router Service.

Classes

struct  otBackboneRouterConfig
 This structure represents Backbone Router configuration.
 
struct  otBackboneRouterMulticastListenerInfo
 This structure represents a Backbone Router Multicast Listener info.
 
struct  otBackboneRouterNdProxyInfo
 Represents the Backbone Router ND Proxy info.

Macros

#define OT_BACKBONE_ROUTER_MULTICAST_LISTENER_ITERATOR_INIT   0
 Initializer for otBackboneRouterMulticastListenerIterator.

Typedefs

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

Enumerations

enum  otBackboneRouterState {
  OT_BACKBONE_ROUTER_STATE_DISABLED = 0,
  OT_BACKBONE_ROUTER_STATE_SECONDARY = 1,
  OT_BACKBONE_ROUTER_STATE_PRIMARY = 2
}
 Represents the Backbone Router Status.
 
enum  otBackboneRouterMulticastListenerEvent {
  OT_BACKBONE_ROUTER_MULTICAST_LISTENER_ADDED = 0,
  OT_BACKBONE_ROUTER_MULTICAST_LISTENER_REMOVED = 1
}
 Represents the Multicast Listener events.
 
enum  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
}
 Represents the ND Proxy events.
 
enum  otBackboneRouterDomainPrefixEvent {
  OT_BACKBONE_ROUTER_DOMAIN_PREFIX_ADDED = 0,
  OT_BACKBONE_ROUTER_DOMAIN_PREFIX_REMOVED = 1,
  OT_BACKBONE_ROUTER_DOMAIN_PREFIX_CHANGED = 2
}
 Represents the Domain Prefix events.

Functions

otError otBackboneRouterGetPrimary (otInstance *aInstance, otBackboneRouterConfig *aConfig)
 This function gets the Primary Backbone Router information in the Thread Network.
 
void otBackboneRouterSetEnabled (otInstance *aInstance, bool aEnable)
 This function enables or disables Backbone functionality.
 
otBackboneRouterState otBackboneRouterGetState (otInstance *aInstance)
 This function gets the Backbone Router state.
 
void otBackboneRouterGetConfig (otInstance *aInstance, otBackboneRouterConfig *aConfig)
 This function gets the local Backbone Router configuration.
 
otError otBackboneRouterSetConfig (otInstance *aInstance, const otBackboneRouterConfig *aConfig)
 This function sets the local Backbone Router configuration.
 
otError otBackboneRouterRegister (otInstance *aInstance)
 This function explicitly registers local Backbone Router configuration.
 
uint8_t otBackboneRouterGetRegistrationJitter (otInstance *aInstance)
 This method returns the Backbone Router registration jitter value.
 
void otBackboneRouterSetRegistrationJitter (otInstance *aInstance, uint8_t aJitter)
 This method sets the Backbone Router registration jitter value.
 
otError otBackboneRouterGetDomainPrefix (otInstance *aInstance, otBorderRouterConfig *aConfig)
 This method gets the local Domain Prefix configuration.
 
void otBackboneRouterConfigNextDuaRegistrationResponse (otInstance *aInstance, const otIp6InterfaceIdentifier *aMlIid, uint8_t aStatus)
 This method configures response status for next DUA registration.
 
void otBackboneRouterConfigNextMulticastListenerRegistrationResponse (otInstance *aInstance, uint8_t aStatus)
 This method configures response status for next Multicast Listener Registration.
 
void otBackboneRouterSetMulticastListenerCallback (otInstance *aInstance, otBackboneRouterMulticastListenerCallback aCallback, void *aContext)
 This method sets the Backbone Router Multicast Listener callback.
 
void otBackboneRouterMulticastListenerClear (otInstance *aInstance)
 This method clears the Multicast Listeners.
 
otError otBackboneRouterMulticastListenerAdd (otInstance *aInstance, const otIp6Address *aAddress, uint32_t aTimeout)
 This method adds a Multicast Listener.
 
otError otBackboneRouterMulticastListenerGetNext (otInstance *aInstance, otBackboneRouterMulticastListenerIterator *aIterator, otBackboneRouterMulticastListenerInfo *aListenerInfo)
 This function gets the next Multicast Listener info (using an iterator).
 
void otBackboneRouterSetNdProxyCallback (otInstance *aInstance, otBackboneRouterNdProxyCallback aCallback, void *aContext)
 This method sets the Backbone Router ND Proxy callback.
 
otError otBackboneRouterGetNdProxyInfo (otInstance *aInstance, const otIp6Address *aDua, otBackboneRouterNdProxyInfo *aNdProxyInfo)
 This method gets the Backbone Router ND Proxy info.
 
void otBackboneRouterSetDomainPrefixCallback (otInstance *aInstance, otBackboneRouterDomainPrefixCallback aCallback, void *aContext)
 This method sets the Backbone Router Domain Prefix callback.

Detailed Description

This module includes functions for the OpenThread Backbone Router Service.

Typedef Documentation

◆ otBackboneRouterDomainPrefixCallback

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

This function pointer is called whenever the Domain Prefix changed.

Parameters
[in]aContextThe user context pointer.
[in]aEventThe Domain Prefix event.
[in]aDomainPrefixThe new Domain Prefix if added or changed, nullptr otherwise.

◆ otBackboneRouterMulticastListenerCallback

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

This function pointer is called whenever the Multicast Listeners change.

Parameters
[in]aContextThe user context pointer.
[in]aEventThe Multicast Listener event.
[in]aAddressThe IPv6 multicast address of the Multicast Listener.

◆ otBackboneRouterNdProxyCallback

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

This function pointer is called whenever the Nd Proxy changed.

Parameters
[in]aContextThe user context pointer.
[in]aEventThe ND Proxy event.
[in]aDuaThe Domain Unicast Address of the ND Proxy, or nullptr if aEvent is OT_BACKBONE_ROUTER_NDPROXY_CLEARED.

Enumeration Type Documentation

◆ otBackboneRouterDomainPrefixEvent

Represents the Domain Prefix events.

Enumerator
OT_BACKBONE_ROUTER_DOMAIN_PREFIX_ADDED 

Domain Prefix was added.

OT_BACKBONE_ROUTER_DOMAIN_PREFIX_REMOVED 

Domain Prefix was removed.

OT_BACKBONE_ROUTER_DOMAIN_PREFIX_CHANGED 

Domain Prefix was changed.

◆ otBackboneRouterMulticastListenerEvent

Represents the Multicast Listener events.

Enumerator
OT_BACKBONE_ROUTER_MULTICAST_LISTENER_ADDED 

Multicast Listener was added.

OT_BACKBONE_ROUTER_MULTICAST_LISTENER_REMOVED 

Multicast Listener was removed or expired.

◆ otBackboneRouterNdProxyEvent

Represents the ND Proxy events.

Enumerator
OT_BACKBONE_ROUTER_NDPROXY_ADDED 

ND Proxy was added.

OT_BACKBONE_ROUTER_NDPROXY_REMOVED 

ND Proxy was removed.

OT_BACKBONE_ROUTER_NDPROXY_RENEWED 

ND Proxy was renewed.

OT_BACKBONE_ROUTER_NDPROXY_CLEARED 

All ND Proxies were cleared.

◆ otBackboneRouterState

Represents the Backbone Router Status.

Enumerator
OT_BACKBONE_ROUTER_STATE_DISABLED 

Backbone function is disabled.

OT_BACKBONE_ROUTER_STATE_SECONDARY 

Secondary Backbone Router.

OT_BACKBONE_ROUTER_STATE_PRIMARY 

The Primary Backbone Router.

Function Documentation

◆ otBackboneRouterConfigNextDuaRegistrationResponse()

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

This method 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.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aMlIidA 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]aStatusThe status to respond.

◆ otBackboneRouterConfigNextMulticastListenerRegistrationResponse()

void otBackboneRouterConfigNextMulticastListenerRegistrationResponse ( otInstance aInstance,
uint8_t  aStatus 
)

This method configures response status for next Multicast Listener Registration.

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

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aStatusThe status to respond.

◆ otBackboneRouterGetConfig()

void otBackboneRouterGetConfig ( otInstance aInstance,
otBackboneRouterConfig aConfig 
)

This function gets the local Backbone Router configuration.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aConfigA pointer where to put local Backbone Router configuration.
See also
otBackboneRouterSetEnabled
otBackboneRouterGetState
otBackboneRouterSetConfig
otBackboneRouterRegister

◆ otBackboneRouterGetDomainPrefix()

otError otBackboneRouterGetDomainPrefix ( otInstance aInstance,
otBorderRouterConfig aConfig 
)

This method gets the local Domain Prefix configuration.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aConfigA pointer to the Domain Prefix configuration.
Return values
OT_ERROR_NONESuccessfully got the Domain Prefix configuration.
OT_ERROR_NOT_FOUNDNo Domain Prefix was configured.

◆ otBackboneRouterGetNdProxyInfo()

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

This method gets the Backbone Router ND Proxy info.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aDuaThe Domain Unicast Address.
[out]aNdProxyInfoA pointer to the ND Proxy info.
Return values
OT_ERROR_NONESuccessfully got the ND Proxy info.
OT_ERROR_NOT_FOUNDFailed to find the Domain Unicast Address in the ND Proxy table.

◆ otBackboneRouterGetPrimary()

otError otBackboneRouterGetPrimary ( otInstance aInstance,
otBackboneRouterConfig aConfig 
)

This function gets the Primary Backbone Router information in the Thread Network.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[out]aConfigA pointer to where to put Primary Backbone Router information.
Return values
OT_ERROR_NONESuccessfully got Primary Backbone Router information.
OT_ERROR_NOT_FOUNDNo Primary Backbone Router exists.

◆ otBackboneRouterGetRegistrationJitter()

uint8_t otBackboneRouterGetRegistrationJitter ( otInstance aInstance)

This method returns the Backbone Router registration jitter value.

Returns
The Backbone Router registration jitter value.
See also
otBackboneRouterSetRegistrationJitter

◆ otBackboneRouterGetState()

otBackboneRouterState otBackboneRouterGetState ( otInstance aInstance)

This function gets the Backbone Router state.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
OT_BACKBONE_ROUTER_STATE_DISABLEDBackbone functionality is disabled.
OT_BACKBONE_ROUTER_STATE_SECONDARYSecondary Backbone Router.
OT_BACKBONE_ROUTER_STATE_PRIMARYThe Primary Backbone Router.
See also
otBackboneRouterSetEnabled
otBackboneRouterGetConfig
otBackboneRouterSetConfig
otBackboneRouterRegister

◆ otBackboneRouterMulticastListenerAdd()

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

This method adds a Multicast Listener.

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

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aAddressThe Multicast Listener address.
[in]aTimeoutThe timeout (in seconds) of the Multicast Listener, or 0 to use the default MLR timeout.
Return values
OT_ERROR_NONEIf the Multicast Listener was successfully added.
OT_ERROR_INVALID_ARGSIf the Multicast Listener address was invalid.
OT_ERROR_NO_BUFSNo space available to save the Multicast Listener.
See also
otBackboneRouterMulticastListenerClear
otBackboneRouterMulticastListenerGetNext

◆ otBackboneRouterMulticastListenerClear()

void otBackboneRouterMulticastListenerClear ( otInstance aInstance)

This method clears the Multicast Listeners.

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

Parameters
[in]aInstanceA pointer to an OpenThread instance.
See also
otBackboneRouterMulticastListenerAdd
otBackboneRouterMulticastListenerGetNext

◆ otBackboneRouterMulticastListenerGetNext()

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

This function gets the next Multicast Listener info (using an iterator).

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in,out]aIteratorA 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]aListenerInfoA pointer to an otBackboneRouterMulticastListenerInfo where information of next Multicast Listener is placed (on success).
Return values
OT_ERROR_NONESuccessfully found the next Multicast Listener info (aListenerInfo was successfully updated).
OT_ERROR_NOT_FOUNDNo subsequent Multicast Listener info was found.
See also
otBackboneRouterMulticastListenerClear
otBackboneRouterMulticastListenerAdd

◆ otBackboneRouterRegister()

otError otBackboneRouterRegister ( otInstance aInstance)

This function explicitly registers local Backbone Router configuration.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
Return values
OT_ERROR_NO_BUFSInsufficient space to add the Backbone Router service.
OT_ERROR_NONESuccessfully queued a Server Data Request message for delivery.
See also
otBackboneRouterSetEnabled
otBackboneRouterGetState
otBackboneRouterGetConfig
otBackboneRouterSetConfig

◆ otBackboneRouterSetConfig()

otError otBackboneRouterSetConfig ( otInstance aInstance,
const otBackboneRouterConfig aConfig 
)

This function sets the local Backbone Router configuration.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aConfigA pointer to the Backbone Router configuration to take effect.
Return values
OT_ERROR_NONESuccessfully updated configuration.
OT_ERROR_INVALID_ARGSThe configuration in aConfig is invalid.
See also
otBackboneRouterSetEnabled
otBackboneRouterGetState
otBackboneRouterGetConfig
otBackboneRouterRegister

◆ otBackboneRouterSetDomainPrefixCallback()

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

This method sets the Backbone Router Domain Prefix callback.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aCallbackA pointer to the Domain Prefix callback.
[in]aContextA user context pointer.

◆ otBackboneRouterSetEnabled()

void otBackboneRouterSetEnabled ( otInstance aInstance,
bool  aEnable 
)

This function enables or disables Backbone functionality.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aEnableTRUE to enable Backbone functionality, FALSE otherwise.
See also
otBackboneRouterGetState
otBackboneRouterGetConfig
otBackboneRouterSetConfig
otBackboneRouterRegister

◆ otBackboneRouterSetMulticastListenerCallback()

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

This method sets the Backbone Router Multicast Listener callback.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aCallbackA pointer to the Multicast Listener callback.
[in]aContextA user context pointer.

◆ otBackboneRouterSetNdProxyCallback()

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

This method sets the Backbone Router ND Proxy callback.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aCallbackA pointer to the ND Proxy callback.
[in]aContextA user context pointer.

◆ otBackboneRouterSetRegistrationJitter()

void otBackboneRouterSetRegistrationJitter ( otInstance aInstance,
uint8_t  aJitter 
)

This method sets the Backbone Router registration jitter value.

Parameters
[in]aJitterthe Backbone Router registration jitter value to set.
See also
otBackboneRouterGetRegistrationJitter