Google is committed to advancing racial equity for Black communities. See how.

Backbone Router

This module includes functions for the OpenThread Backbone Router Service.

Summary

Enumerations

otBackboneRouterMulticastListenerEvent{
  OT_BACKBONE_ROUTER_MULTICAST_LISTENER_ADDED = 0,
  OT_BACKBONE_ROUTER_MULTICAST_LISTENER_REMOVED = 1
}
enum
Represents the Multicast Listener 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
This structure represents Backbone Router configuration.
otBackboneRouterMulticastListenerCallback)(void *aContext, otBackboneRouterMulticastListenerEvent aEvent, const otIp6Address *aAddress) typedef
void(*
This function pointer is called whenever the Multicast Listeners change.
otBackboneRouterMulticastListenerInfo typedef
This structure represents a Backbone Router Multicast Listener info.
otBackboneRouterMulticastListenerIterator typedef
uint16_t
Used to iterate through Multicast Listeners.

Functions

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

Structs

otBackboneRouterConfig

This structure represents Backbone Router configuration.

otBackboneRouterMulticastListenerInfo

This structure represents a Backbone Router Multicast Listener info.

Enumerations

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.

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

This structure represents Backbone Router configuration.

otBackboneRouterMulticastListenerCallback

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

This function 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 Ip6 multicast address of the Multicast Listener.

otBackboneRouterMulticastListenerInfo

struct otBackboneRouterMulticastListenerInfo otBackboneRouterMulticastListenerInfo

This structure represents a Backbone Router Multicast Listener info.

otBackboneRouterMulticastListenerIterator

uint16_t otBackboneRouterMulticastListenerIterator

Used to iterate through Multicast Listeners.

Functions

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.

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
)

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.

Details
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.

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
)

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

otBackboneRouterGetPrimary

otError otBackboneRouterGetPrimary(
  otInstance *aInstance,
  otBackboneRouterConfig *aConfig
)

This function 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
)

This method returns the Backbone Router registration jitter value.

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

otBackboneRouterGetState

otBackboneRouterState otBackboneRouterGetState(
  otInstance *aInstance
)

This function gets the Backbone Router state.

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
)

This method adds a Multicast Listener.

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

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
)

This method clears the Multicast Listeners.

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

Details
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.

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
)

This function explicitly registers local Backbone Router configuration.

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
)

This function sets the local Backbone Router configuration.

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

otBackboneRouterSetEnabled

void otBackboneRouterSetEnabled(
  otInstance *aInstance,
  bool aEnable
)

This function enables or disables Backbone functionality.

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
)

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

otBackboneRouterSetRegistrationJitter

void otBackboneRouterSetRegistrationJitter(
  otInstance *aInstance,
  uint8_t aJitter
)

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