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] aContext The user context pointer.
[in] aEvent The Domain Prefix event.
[in] aDomainPrefix The 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] aContext The user context pointer.
[in] aEvent The Multicast Listener event.
[in] aAddress The Ip6 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] 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 .

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] 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
)

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] aInstance A pointer to an OpenThread instance.
[in] aStatus The status to respond.

otBackboneRouterGetConfig()

void otBackboneRouterGetConfig ( otInstance * aInstance,
otBackboneRouterConfig * aConfig
)

This function gets the local Backbone Router configuration.

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
)

This method gets the local Domain Prefix configuration.

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
)

This method gets the Backbone Router ND Proxy info.

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
)

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

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 )

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] 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
)

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] 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 )

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] aInstance A 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).

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

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 )

This function explicitly registers local Backbone Router configuration.

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
)

This function sets the local Backbone Router configuration.

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
)

This method sets the Backbone Router Domain Prefix callback.

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
)

This function enables or disables Backbone functionality.

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
)

This method sets the Backbone Router Multicast Listener callback.

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
)

This method sets the Backbone Router ND Proxy callback.

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
)

This method sets the Backbone Router registration jitter value.

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