Function otBorderRoutingCountPeerBrs

Source
pub unsafe extern "C" fn otBorderRoutingCountPeerBrs(
    aInstance: *mut otInstance,
    aMinAge: *mut u32,
) -> u16
Expand description

Returns the number of peer BRs found in the Network Data.

Requires OPENTHREAD_CONFIG_BORDER_ROUTING_TRACK_PEER_BR_INFO_ENABLE.

Peer BRs are other devices within the Thread mesh that provide external IP connectivity. A device is considered to provide external IP connectivity if at least one of the following conditions is met regarding its Network Data entries:

  • It has added at least one external route entry.
  • It has added at least one prefix entry with both the default-route and on-mesh flags set.
  • It has added at least one domain prefix (with both the domain and on-mesh flags set).

The list of peer BRs specifically excludes the current device, even if it is itself acting as a BR.

@param[in] aInstance The OpenThread instance. @param[out] aMinAge Pointer to an uint32_t to return the minimum age among all peer BRs. Can be NULL if the caller does not need this information. Age is represented as seconds since appearance of the BR entry in the Network Data.

@returns The number of peer BRs.