Border Router Multi AIL Detection#
This module includes functions for the OpenThread Multi-AIL Detection feature.
All the functions in this module require both the OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE and OPENTHREAD_CONFIG_BORDER_ROUTING_MULTI_AIL_DETECTION_ENABLE to be enabled.
Typedefs#
A callback function pointer called when the multi-AIL detection state changes.
Functions#
Enables or disables the Multi-AIL Detector.
Checks if the Multi-AIL Detector is enabled.
Checks if the Multi-AIL Detector is running.
Gets the current detected state regarding multiple Adjacent Infrastructure Links (AILs).
Sets a callback function to be notified of changes in the multi-AIL detection state.
Typedef Documentation#
otBorderRoutingMultiAilCallback#
typedef void(* otBorderRoutingMultiAilCallback) (bool aDetected, void *aContext) )(bool aDetected, void *aContext)
A callback function pointer called when the multi-AIL detection state changes.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| [in] | aDetected |
| |
| [in] | aContext | A pointer to arbitrary context information provided when the callback was registered using |
This callback function is invoked by the OpenThread stack whenever the detector determines a change in whether Border Routers on the Thread mesh might be connected to different Adjacent Infrastructure Links (AILs).
See otBorderRoutingIsMultiAilDetected() for more details.
Function Documentation#
otBorderRoutingSetMultiAilDetectionEnabled#
void otBorderRoutingSetMultiAilDetectionEnabled (otInstance * aInstance, bool aEnable)
Enables or disables the Multi-AIL Detector.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| bool | [in] | aEnable | TRUE to enable the detector, FALSE to disable. |
If OPENTHREAD_CONFIG_BORDER_ROUTING_MULTI_AIL_DETECTION_AUTO_ENABLE_MODE is enabled, the detector is enabled by default and starts running when the infra-if network is initialized and becomes active (running).
otBorderRoutingIsMultiAilDetectionEnabled#
bool otBorderRoutingIsMultiAilDetectionEnabled (otInstance * aInstance)
Checks if the Multi-AIL Detector is enabled.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
otBorderRoutingIsMultiAilDetectionRunning#
bool otBorderRoutingIsMultiAilDetectionRunning (otInstance * aInstance)
Checks if the Multi-AIL Detector is running.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
The detector runs when it is enabled and the infrastructure interface is also active.
otBorderRoutingIsMultiAilDetected#
bool otBorderRoutingIsMultiAilDetected (otInstance * aInstance)
Gets the current detected state regarding multiple Adjacent Infrastructure Links (AILs).
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
It returns whether the detector currently believes that Border Routers (BRs) on the Thread mesh may be connected to different AILs.
The detection mechanism operates as follows: The detector monitors the number of peer BRs listed in the Thread Network Data (see otBorderRoutingCountPeerBrs()) and compares this count with the number of peer BRs discovered by processing received Router Advertisement (RA) messages on its connected AIL. If the count derived from Network Data consistently exceeds the count derived from RAs for a detection duration of 10 minutes, it concludes that BRs are likely connected to different AILs. To clear state a shorter window of 1 minute is used.
The detection window of 10 minutes helps to avoid false positives due to transient changes. The detector uses 200 seconds for reachability checks of peer BRs (sending Neighbor Solicitation). Stale Network Data entries are also expected to age out within a few minutes. So a 10-minute detection time accommodates both cases.
While generally effective, this detection mechanism may get less reliable in scenarios with a large number of BRs, particularly exceeding ten. This is related to the "Network Data Publisher" mechanism, where BRs might refrain from publishing their external route information in the Network Data to conserve its limited size, potentially skewing the Network Data BR count.
otBorderRoutingSetMultiAilCallback#
void otBorderRoutingSetMultiAilCallback (otInstance * aInstance, otBorderRoutingMultiAilCallback aCallback, void * aContext)
Sets a callback function to be notified of changes in the multi-AIL detection state.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to the OpenThread instance. |
| otBorderRoutingMultiAilCallback | [in] | aCallback | A pointer to the function ( |
| void * | [in] | aContext | A pointer to application-specific context that will be passed back in the |
Subsequent calls to this function will overwrite the previous callback setting. Using NULL for aCallback will disable the callback.