[net-diag] introduce Server and Client classes (#8936)

This commit introduces `Server` and `Client` classes breaking the
`NetworkDiagnostic` module into two components. The `Server` responds
to queries and requests (handling Net Diag TMF commands), while
`Client` issues queries/requests and processes responses. The
`Server` is available under both FTD and MTD (which follows the
requirement of Thread spec). The client is enabled using newly added
`OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE` config option which is
also available as `OT_NETDIAG_CLIENT` CMake option or the autoconf
build switch `NETDIAG_CLIENT`. The client functionality is by default
enabled on Border Routers (tied to `CONFIG_BORDER_ROUTING_ENABLE`
config).

The previous `TMF_NETWORK_DIAG_MTD_ENABLE` config is now removed
along with its CMake `OT_MTD_NETDIAG` and autoconf switch. This
commit adds checks to trigger build error if the previous config
and/or its related CMake option are used.
This commit is contained in:
Abtin Keshavarzian
2023-04-07 15:58:07 -07:00
committed by GitHub
parent d9ea37a3bb
commit 0f94f26a20
26 changed files with 276 additions and 225 deletions
+1 -1
View File
@@ -65,8 +65,8 @@ build_nrf52840()
"-DOT_MAC_FILTER=ON"
"-DOT_MESSAGE_USE_HEAP=ON"
"-DOT_MLR=ON"
"-DOT_MTD_NETDIAG=ON"
"-DOT_NETDATA_PUBLISHER=ON"
"-DOT_NETDIAG_CLIENT=ON"
"-DOT_PING_SENDER=ON"
"-DOT_SERVICE=ON"
"-DOT_SLAAC=ON"
+1 -1
View File
@@ -62,10 +62,10 @@ OT_BUILD_OPTIONS=(
"-DOT_LOG_LEVEL_DYNAMIC=ON"
"-DOT_MAC_FILTER=ON"
"-DOT_MESH_DIAG=ON"
"-DOT_MTD_NETDIAG=ON"
"-DOT_NAT64_BORDER_ROUTING=ON"
"-DOT_NAT64_TRANSLATOR=ON"
"-DOT_NEIGHBOR_DISCOVERY_AGENT=ON"
"-DOT_NETDIAG_CLIENT=ON"
"-DOT_PING_SENDER=ON"
"-DOT_PLATFORM=external"
"-DOT_RCP_RESTORATION_MAX_COUNT=2"
+1 -1
View File
@@ -86,7 +86,7 @@ build_all_features()
"-DOPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1"
"-DOPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1"
"-DOPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1"
"-DOPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1"
"-DOPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE=1"
"-DOPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1"
"-DOPENTHREAD_CONFIG_MAC_BEACON_PAYLOAD_PARSING_ENABLE=1"
"-DOPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE=1"
-1
View File
@@ -142,7 +142,6 @@ size_nrf52840_version()
"-DOT_LINK_RAW=ON"
"-DOT_MAC_FILTER=ON"
"-DOT_MESSAGE_USE_HEAP=ON"
"-DOT_MTD_NETDIAG=ON"
"-DOT_NETDATA_PUBLISHER=ON"
"-DOT_PING_SENDER=ON"
"-DOT_SERVICE=ON"
+1 -1
View File
@@ -92,9 +92,9 @@ OT_POSIX_SIM_COMMON_OPTIONS=(
"-DOT_JAM_DETECTION=ON"
"-DOT_JOINER=ON"
"-DOT_MAC_FILTER=ON"
"-DOT_MTD_NETDIAG=ON"
"-DOT_NEIGHBOR_DISCOVERY_AGENT=ON"
"-DOT_NETDATA_PUBLISHER=ON"
"-DOT_NETDIAG_CLIENT=ON"
"-DOT_PING_SENDER=ON"
"-DOT_REFERENCE_DEVICE=ON"
"-DOT_SERVICE=ON"
+1 -1
View File
@@ -121,10 +121,10 @@ OT_CLANG_TIDY_BUILD_OPTS=(
'-DOT_LINK_METRICS_SUBJECT=ON'
'-DOT_MAC_FILTER=ON'
'-DOT_MESH_DIAG=ON'
'-DOT_MTD_NETDIAG=ON'
'-DOT_NAT64_BORDER_ROUTING=ON'
'-DOT_NAT64_TRANSLATOR=ON'
'-DOT_NETDATA_PUBLISHER=ON'
'-DOT_NETDIAG_CLIENT=ON'
'-DOT_PING_SENDER=ON'
'-DOT_REFERENCE_DEVICE=ON'
'-DOT_SERVICE=ON'