mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
3fec404eff
This commit introduces Seeker APIs in OpenThread. An earlier commit extracted the discovery and candidate selection logic from the `Joiner` role into a new, standalone `Seeker` module. The `Seeker` is responsible for performing MLE Discover Scans to find nearby Joiner Router candidates. It prioritizes these candidates based on RSSI and steering data (indicating whether the Joiner is preferred) and manages the list of candidates for connection attempts. This separation allows the `Seeker` functionality to be utilized independently of the full `Joiner` role, enabling the development of custom joining mechanisms over Thread. A new configuration option `OPENTHREAD_CONFIG_SEEKER_ENABLE` has been added to control the presence of `otSeeker` APIs.
224 lines
8.3 KiB
C
224 lines
8.3 KiB
C
/*
|
|
* Copyright (c) 2020, The OpenThread Authors.
|
|
* All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
* 3. Neither the name of the copyright holder nor the
|
|
* names of its contributors may be used to endorse or promote products
|
|
* derived from this software without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief
|
|
* This file defines the Doxygen group structure for OpenThread documentation.
|
|
*/
|
|
|
|
/**
|
|
* @defgroup api API
|
|
* @brief
|
|
* This module includes the application programming interface to the OpenThread stack.
|
|
*
|
|
* Important note: The OpenThread stack is not re-entrant. All OpenThread public APIs, platform APIs, and callbacks
|
|
* MUST be invoked from the same OS context (e.g., the same thread/process or the same task in an RTOS).
|
|
* Any exceptions to this rule, where an API can be called from a different context, will be explicitly documented
|
|
* in that API's reference. Failure to follow this rule can lead to undefined and unexpected behaviors.
|
|
*
|
|
* If an API call returns an error status (any value other than success), the caller MUST assume any of the output
|
|
* parameters passed to the API may have been modified and are in an indeterminate state. Assuming that an output
|
|
* parameter remains unchanged upon error is invalid. If an API deviates from this default behavior (e.g., by
|
|
* guaranteeing parameters are untouched on error), it will be explicitly documented. Otherwise, developers
|
|
* MUST NOT make this assumption.
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup api-error Error
|
|
*
|
|
* @defgroup api-execution Execution
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup api-instance Instance
|
|
* @defgroup api-tasklets Tasklets
|
|
*
|
|
* @}
|
|
*
|
|
* @defgroup api-net IPv6 Networking
|
|
* @{
|
|
*
|
|
* @defgroup api-ble-secure BLE Secure
|
|
* @defgroup api-dns DNS
|
|
* @defgroup api-dnssd-server DNS-SD Server
|
|
* @defgroup api-icmp6 ICMPv6
|
|
* @defgroup api-ip6 IPv6
|
|
* @defgroup api-mdns Multicast DNS
|
|
* @defgroup api-nat64 NAT64
|
|
* @defgroup api-srp SRP
|
|
* @defgroup api-ping-sender Ping Sender
|
|
*
|
|
* @defgroup api-tcp-group TCP
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup api-tcp TCP
|
|
* @defgroup api-tcp-ext TCP Abstractions
|
|
*
|
|
* @}
|
|
*
|
|
* @defgroup api-udp-group UDP
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup api-udp UDP
|
|
* @defgroup api-udp-forward UDP Forward
|
|
*
|
|
* @}
|
|
*
|
|
* @}
|
|
*
|
|
* @defgroup api-link Link
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup api-link-link Link
|
|
* @defgroup api-link-metrics Link Metrics
|
|
* @defgroup api-link-raw Raw Link
|
|
*
|
|
* @}
|
|
*
|
|
* @defgroup api-message Message
|
|
*
|
|
* @defgroup api-multi-radio Multi Radio Link
|
|
* @defgroup api-trel TREL - Thread Stack
|
|
*
|
|
* @defgroup api-thread Thread
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup api-backbone-router Backbone Router
|
|
* @defgroup api-border-agent Border Agent
|
|
* @defgroup api-border-agent-tracker Border Agent Tracker
|
|
* @defgroup api-border-agent-txt-data Border Agent TXT Data Parser
|
|
* @defgroup api-border-router Border Router
|
|
* @defgroup api-border-routing Border Routing Manager
|
|
* @defgroup api-multi-ail-detection Border Router Multi AIL Detection
|
|
* @defgroup api-commissioner Commissioner
|
|
* @defgroup api-thread-general General
|
|
* @brief This module includes functions for all Thread roles.
|
|
* @defgroup api-joiner Joiner
|
|
* @defgroup api-operational-dataset Operational Dataset
|
|
* @brief Includes functions for the Operational Dataset API.
|
|
* @defgroup api-thread-router Router/Leader
|
|
* @brief This module includes functions for Thread Routers and Leaders.
|
|
* @defgroup api-seeker Seeker
|
|
* @defgroup api-server Server
|
|
* @defgroup api-steering-data Steering Data
|
|
*
|
|
* @}
|
|
*
|
|
* @defgroup api-addons Add-Ons
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup api-channel-manager Channel Manager
|
|
* @defgroup api-channel-monitor Channel Monitoring
|
|
* @defgroup api-child-supervision Child Supervision
|
|
* @defgroup api-coap-group CoAP
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup api-coap CoAP
|
|
* @defgroup api-coap-secure CoAP Secure
|
|
*
|
|
* @}
|
|
*
|
|
* @defgroup api-cli Command Line Interface
|
|
* @defgroup api-crypto Crypto - Thread Stack
|
|
* @defgroup api-factory-diagnostics Factory Diagnostics - Thread Stack
|
|
* @defgroup api-heap Heap
|
|
* @defgroup api-history-tracker History Tracker
|
|
* @defgroup api-jam-detection Jam Detection
|
|
* @defgroup api-logging Logging - Thread Stack
|
|
* @defgroup api-mesh-diag Mesh Diagnostics
|
|
* @defgroup api-ncp Network Co-Processor
|
|
* @defgroup api-network-time Network Time Synchronization
|
|
* @defgroup api-radio Radio Statistics
|
|
* @defgroup api-random-group Random Number Generator
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup api-random-crypto RNG Cryptographic
|
|
* @defgroup api-random-non-crypto RNG Non-cryptographic
|
|
*
|
|
* @}
|
|
*
|
|
* @defgroup api-sntp SNTP
|
|
* @defgroup api-verhoeff-checksum Verhoeff Checksum
|
|
*
|
|
* @}
|
|
*
|
|
* @defgroup api-provisional Provisional
|
|
* @brief
|
|
* This module includes the OpenThread provisional APIs. These APIs are not stable and users should use them with
|
|
* caution.
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup api-provisional-link Link
|
|
* @defgroup api-provisional-p2p Peer-to-Peer
|
|
*
|
|
* @}
|
|
*
|
|
* @}
|
|
*/
|
|
|
|
/**
|
|
* @defgroup platform Platform Abstraction
|
|
* @brief
|
|
* This module includes the platform abstraction used by the OpenThread stack.
|
|
*
|
|
* @{
|
|
*
|
|
* @defgroup plat-alarm Alarm
|
|
* @defgroup plat-ble BLE
|
|
* @defgroup plat-crypto Crypto - Platform
|
|
* @defgroup plat-dns DNS - Platform
|
|
* @defgroup plat-dns-sd DNS-SD (mDNS)
|
|
* @defgroup plat-entropy Entropy
|
|
* @defgroup plat-factory-diagnostics Factory Diagnostics - Platform
|
|
* @defgroup plat-infra-if Infrastructure Interface
|
|
* @defgroup plat-logging Logging - Platform
|
|
* @defgroup plat-memory Memory
|
|
* @defgroup plat-messagepool Message Pool
|
|
* @defgroup plat-misc Miscellaneous
|
|
* @defgroup plat-mdns Multicast DNS
|
|
* @defgroup plat-multipan Multipan
|
|
* @defgroup plat-otns Network Simulator
|
|
* @defgroup plat-radio Radio
|
|
* @defgroup plat-settings Settings
|
|
* @defgroup plat-spi-slave SPI Slave
|
|
* @defgroup plat-time Time Service
|
|
* @defgroup plat-toolchain Toolchain
|
|
* @defgroup plat-trel TREL - Platform
|
|
*
|
|
* @}
|
|
*/
|