mirror of
https://github.com/espressif/openthread.git
synced 2026-08-18 16:39:52 +00:00
[tmf] add AnycastLocator module (#6513)
This commit adds a new class `AnycastLocator` which can be used to
locate the closest destination of an anycast IPv6 address (i.e., find
the related mesh local EID and RLOC16). The closest destination is
determined based on the the current routing table and path costs
within the Thread mesh.
The implementation uses a CoAP confirmable post request to a newly
added URI path ("a/yl"). The destination IPv6 address of such as
request message is set to the anycast address to be located. The
receiver of the request message sends a CoAP response which includes
the "Mesh Local EID" and "Thread RLOC16" TLVs.
This commit also adds support this new feature in CLI (adding a new
`locate <anycast-addr>` command).
Finally this commit adds `test_anycast_locator.py` to test behavior of
the new feature.
This commit is contained in:
@@ -32,6 +32,7 @@ set -euxo pipefail
|
||||
readonly OT_SRCDIR="$(pwd)"
|
||||
|
||||
readonly OT_BUILD_OPTIONS=(
|
||||
"-DOT_ANYCAST_LOCATOR=ON"
|
||||
"-DOT_BUILD_EXECUTABLES=OFF"
|
||||
"-DOT_BORDER_AGENT=ON"
|
||||
"-DOT_BORDER_ROUTER=ON"
|
||||
|
||||
@@ -40,6 +40,7 @@ build_all_features()
|
||||
{
|
||||
local options=(
|
||||
"-DOPENTHREAD_CONFIG_ANNOUNCE_SENDER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_ANYCAST_LOCATOR=1"
|
||||
"-DOPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1"
|
||||
"-DOPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1"
|
||||
|
||||
@@ -114,6 +114,7 @@ nm_size()
|
||||
size_nrf52840_version()
|
||||
{
|
||||
local options=(
|
||||
"-DOT_ANYCAST_LOCATOR=ON"
|
||||
"-DOT_BORDER_AGENT=ON"
|
||||
"-DOT_BORDER_ROUTER=ON"
|
||||
"-DOT_CHANNEL_MANAGER=ON"
|
||||
|
||||
@@ -66,6 +66,7 @@ OT_CMAKE_NINJA_TARGET=${OT_CMAKE_NINJA_TARGET:-}
|
||||
readonly OT_SRCDIR="$(pwd)"
|
||||
readonly OT_PLATFORMS=(cc2538 simulation posix)
|
||||
readonly OT_POSIX_SIM_COMMON_OPTIONS=(
|
||||
"-DOT_ANYCAST_LOCATOR=ON"
|
||||
"-DOT_BORDER_AGENT=ON"
|
||||
"-DOT_BORDER_ROUTER=ON"
|
||||
"-DOT_COAP=ON"
|
||||
|
||||
@@ -74,6 +74,7 @@ readonly OT_PYTHON_SOURCES=('*.py')
|
||||
readonly OT_CLANG_TIDY_FIX_DIRS=('examples' 'include' 'src' 'tests')
|
||||
readonly OT_CLANG_TIDY_BUILD_OPTS=(
|
||||
'-DCMAKE_EXPORT_COMPILE_COMMANDS=ON'
|
||||
'-DOT_ANYCAST_LOCATOR=ON'
|
||||
'-DOT_APP_RCP=OFF'
|
||||
'-DOT_MTD=OFF'
|
||||
'-DOT_RCP=OFF'
|
||||
|
||||
@@ -56,6 +56,7 @@ build_simulation()
|
||||
local version="$1"
|
||||
local options=(
|
||||
"-DBUILD_TESTING=ON"
|
||||
"-DOT_ANYCAST_LOCATOR=ON"
|
||||
"-DOT_DNS_CLIENT=ON"
|
||||
"-DOT_DNSSD_SERVER=ON"
|
||||
"-DOT_ECDSA=ON"
|
||||
@@ -268,6 +269,7 @@ do_build_otbr_docker()
|
||||
local otdir
|
||||
local otbrdir
|
||||
local otbr_options=(
|
||||
"-DOT_ANYCAST_LOCATOR=ON"
|
||||
"-DOT_COVERAGE=ON"
|
||||
"-DOT_DNS_CLIENT=ON"
|
||||
"-DOT_DUA=ON"
|
||||
|
||||
Reference in New Issue
Block a user