Skip to content

Commit

Permalink
[net-diag] introduce Server and Client classes (openthread#8936)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
abtink committed Apr 7, 2023
1 parent d9ea37a commit 0f94f26
Show file tree
Hide file tree
Showing 26 changed files with 276 additions and 225 deletions.
16 changes: 15 additions & 1 deletion etc/cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ ot_option(OT_MESH_DIAG OPENTHREAD_CONFIG_MESH_DIAG_ENABLE "mesh diag")
ot_option(OT_MESSAGE_USE_HEAP OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE "heap allocator for message buffers")
ot_option(OT_MLE_LONG_ROUTES OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE "MLE long routes extension (experimental)")
ot_option(OT_MLR OPENTHREAD_CONFIG_MLR_ENABLE "Multicast Listener Registration (MLR)")
ot_option(OT_MTD_NETDIAG OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE "TMF network diagnostics on MTDs")
ot_option(OT_MULTIPLE_INSTANCE OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE "multiple instances")
ot_option(OT_NAT64_BORDER_ROUTING OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE "border routing NAT64")
ot_option(OT_NAT64_TRANSLATOR OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE "NAT64 translator support")
ot_option(OT_NEIGHBOR_DISCOVERY_AGENT OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE "neighbor discovery agent")
ot_option(OT_NETDATA_PUBLISHER OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE "Network Data publisher")
ot_option(OT_NETDIAG_CLIENT OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE "Network Diagnostic client")
ot_option(OT_OTNS OPENTHREAD_CONFIG_OTNS_ENABLE "OTNS")
ot_option(OT_PING_SENDER OPENTHREAD_CONFIG_PING_SENDER_ENABLE "ping sender" ${OT_APP_CLI})
ot_option(OT_PLATFORM_NETIF OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE "platform netif")
Expand Down Expand Up @@ -210,3 +210,17 @@ endif()
if(OT_POSIX_SETTINGS_PATH)
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH=${OT_POSIX_SETTINGS_PATH}")
endif()

#-----------------------------------------------------------------------------------------------------------------------
# Check removed/replaced options

macro(ot_removed_option name error)
# This macro checks for a remove option and emits an error
# if the option is set.
get_property(is_set CACHE ${name} PROPERTY VALUE SET)
if (is_set)
message(FATAL_ERROR "Removed option ${name} is set - ${error}")
endif()
endmacro()

ot_removed_option(OT_MTD_NETDIAG "- Use OT_NETDIAG_CLIENT instead - note that server function is always supported")
4 changes: 2 additions & 2 deletions etc/gn/openthread.gni
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ if (openthread_enable_core_config_args) {
# Enable MLE long routes extension (experimental, breaks Thread conformance]
openthread_config_mle_long_routes_enable = false

# Enable TMF network diagnostics on MTDs
openthread_config_tmf_network_diag_mtd_enable = false
# Enable TMF network diagnostics client
openthread_config_tmf_netdiag_client_enable = false

# Enable multiple instances
openthread_config_multiple_instance_enable = false
Expand Down
2 changes: 1 addition & 1 deletion examples/Makefile-simulation
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ JAM_DETECTION ?= 1
JOINER ?= 1
LINK_RAW ?= 1
MAC_FILTER ?= 1
MTD_NETDIAG ?= 1
NEIGHBOR_DISCOVERY_AGENT ?= 1
NETDATA_PUBLISHER ?= 1
NETDIAG_CLIENT ?= 1
PING_SENDER ?= 1
REFERENCE_DEVICE ?= 1
SERVICE ?= 1
Expand Down
8 changes: 7 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ This page lists the available common switches with description. Unless stated ot
| MAC_FILTER | OT_MAC_FILTER | Enables support for the MAC filter. |
| MLE_LONG_ROUTES | OT_MLE_LONG_ROUTES | Enables the MLE long routes extension. **Note: Enabling this feature breaks conformance to the Thread Specification.** |
| MLR | OT_MLR | Enables Multicast Listener Registration feature for Thread 1.2. |
| MTD_NETDIAG | OT_MTD_NETDIAG | Enables the TMF network diagnostics on MTDs. |
| MULTIPLE_INSTANCE | OT_MULTIPLE_INSTANCE | Enables multiple OpenThread instances. |
| NAT64_BORDER_ROUTING | OT_NAT64_BORDER_ROUTING | Enables NAT64 border routing support for Border Router. |
| NAT64_TRANSLATOR | OT_NAT64_TRANSLATOR | Enables NAT64 translator for Border Router. |
| NETDATA_PUBLISHER | OT_NETDATA_PUBLISHER | Enables support for Thread Network Data publisher. |
| NETDIAG_CLIENT | OT_NETDIAG_CLIENT | Enables Network Diagnostics client functionality. |
| PING_SENDER | OT_PING_SENDER | Enables support for ping sender. |
| OTNS | OT_OTNS | Enables support for [OpenThread Network Simulator](https://github.com/openthread/ot-ns). Enable this switch if you are building OpenThread for OpenThread Network Simulator. |
| PLATFORM_UDP | OT_PLATFORM_UDP | Enables platform UDP support. |
Expand All @@ -73,3 +73,9 @@ This page lists the available common switches with description. Unless stated ot
| TREL | OT_TREL | Enables TREL radio link for Thread over Infrastructure feature. |
| UDP_FORWARD | OT_UDP_FORWARD | Enables support for UDP forward. Enable this switch on the Border Router device (running on the NCP design) with External Commissioning support to service Thread Commissioner packets on the NCP side. |
| UPTIME | OT_UPTIME | Enables support for tracking OpenThread instance's uptime. |

Removed or replaced switches:

| Makefile switch | CMake switch | Description |
| --- | --- | --- |
| MTD_NETDIAG | OT_MTD_NETDIAG | Use NEDIAG_CLIENT to enable client functionality. Server functionality is always supported. |
8 changes: 8 additions & 0 deletions examples/common-switches.mk
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ NAT64_BORDER_ROUTING ?= 0
NAT64_TRANSLATOR ?= 0
NEIGHBOR_DISCOVERY_AGENT ?= 0
NETDATA_PUBLISHER ?= 0
NETDIAG_CLIENT ?= 0
OTNS ?= 0
PING_SENDER ?= 1
PLATFORM_UDP ?= 0
Expand Down Expand Up @@ -286,6 +287,9 @@ ifeq ($(MLR),1)
COMMONCFLAGS += -DOPENTHREAD_CONFIG_MLR_ENABLE=1
endif

# This config is removed but we still check and add the
# `OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE` so to
# get an error during build if `MTD_NETDIAG` is used.
ifeq ($(MTD_NETDIAG),1)
COMMONCFLAGS += -DOPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1
endif
Expand All @@ -302,6 +306,10 @@ ifeq ($(NETDATA_PUBLISHER),1)
COMMONCFLAGS += -DOPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE=1
endif

ifeq ($(NETDIAG_CLIENT),1)
COMMONCFLAGS += -DOPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE=1
endif

ifeq ($(PING_SENDER),1)
COMMONCFLAGS += -DOPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
endif
Expand Down
2 changes: 1 addition & 1 deletion include/openthread/instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern "C" {
* @note This number versions both OpenThread platform and user APIs.
*
*/
#define OPENTHREAD_API_VERSION (307)
#define OPENTHREAD_API_VERSION (308)

/**
* @addtogroup api-instance
Expand Down
2 changes: 2 additions & 0 deletions include/openthread/netdiag.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ extern "C" {
*
* @{
*
*
* Network Dianostics APIs require OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE.
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion script/check-arm-build
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion script/check-scan-build
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion script/check-simulation-build-autotools
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion script/check-size
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion script/cmake-build
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion script/make-pretty
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 3 additions & 3 deletions src/cli/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7950,7 +7950,7 @@ template <> otError Interpreter::Process<Cmd("trel")>(Arg aArgs[])
}
#endif

#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#if OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE
template <> otError Interpreter::Process<Cmd("networkdiagnostic")>(Arg aArgs[])
{
otError error = OT_ERROR_NONE;
Expand Down Expand Up @@ -8175,7 +8175,7 @@ void Interpreter::OutputChildTableEntry(uint8_t aIndentSize, const otNetworkDiag
OutputLine(aIndentSize, "Mode:");
OutputMode(aIndentSize + kIndentSize, aChildEntry.mMode);
}
#endif // OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#endif // OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE

void Interpreter::HandleDetachGracefullyResult(void *aContext)
{
Expand Down Expand Up @@ -8394,7 +8394,7 @@ otError Interpreter::ProcessCommand(Arg aArgs[])
#endif
CmdEntry("netdata"),
CmdEntry("netstat"),
#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#if OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE
CmdEntry("networkdiagnostic"),
#endif
#if OPENTHREAD_FTD
Expand Down
2 changes: 1 addition & 1 deletion src/cli/cli.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ class Interpreter : public OutputImplementer, public Output
static void HandleEnergyScanResult(otEnergyScanResult *aResult, void *aContext);
static void HandleLinkPcapReceive(const otRadioFrame *aFrame, bool aIsTx, void *aContext);

#if OPENTHREAD_FTD || (OPENTHREAD_MTD && OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE)
#if OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE
void HandleDiagnosticGetResponse(otError aError, const otMessage *aMessage, const Ip6::MessageInfo *aMessageInfo);
static void HandleDiagnosticGetResponse(otError aError,
otMessage *aMessage,
Expand Down
9 changes: 5 additions & 4 deletions src/core/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,19 @@ if (openthread_enable_core_config_args) {
defines += [ "OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=1" ]
}

if (openthread_config_tmf_network_diag_mtd_enable) {
defines += [ "OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1" ]
}

if (openthread_config_multiple_instance_enable) {
defines += [ "OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=1" ]
}

if (openthread_config_tmf_netdiag_client_enable) {
defines += [ "OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE=1" ]
}

if (openthread_config_platform_netif_enable) {
defines += [ "OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=1" ]
}


if (openthread_config_platform_udp_enable) {
defines += [ "OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=1" ]
}
Expand Down
12 changes: 6 additions & 6 deletions src/core/api/netdiag_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include "openthread-core-config.h"

#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#if OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE

#include <openthread/netdiag.h>

Expand All @@ -49,7 +49,7 @@ otError otThreadGetNextDiagnosticTlv(const otMessage *aMessage,
AssertPointerIsNotNull(aIterator);
AssertPointerIsNotNull(aNetworkDiagTlv);

return NetworkDiagnostic::NetworkDiagnostic::GetNextDiagTlv(AsCoapMessage(aMessage), *aIterator, *aNetworkDiagTlv);
return NetworkDiagnostic::Client::GetNextDiagTlv(AsCoapMessage(aMessage), *aIterator, *aNetworkDiagTlv);
}

otError otThreadSendDiagnosticGet(otInstance *aInstance,
Expand All @@ -59,7 +59,7 @@ otError otThreadSendDiagnosticGet(otInstance *aInstance,
otReceiveDiagnosticGetCallback aCallback,
void *aCallbackContext)
{
return AsCoreType(aInstance).Get<NetworkDiagnostic::NetworkDiagnostic>().SendDiagnosticGet(
return AsCoreType(aInstance).Get<NetworkDiagnostic::Client>().SendDiagnosticGet(
AsCoreType(aDestination), aTlvTypes, aCount, aCallback, aCallbackContext);
}

Expand All @@ -68,8 +68,8 @@ otError otThreadSendDiagnosticReset(otInstance *aInstance,
const uint8_t aTlvTypes[],
uint8_t aCount)
{
return AsCoreType(aInstance).Get<NetworkDiagnostic::NetworkDiagnostic>().SendDiagnosticReset(
AsCoreType(aDestination), aTlvTypes, aCount);
return AsCoreType(aInstance).Get<NetworkDiagnostic::Client>().SendDiagnosticReset(AsCoreType(aDestination),
aTlvTypes, aCount);
}

#endif // OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#endif // OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE
5 changes: 3 additions & 2 deletions src/core/common/instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ Instance::Instance(void)
, mNetworkDataPublisher(*this)
#endif
, mNetworkDataServiceManager(*this)
#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
, mNetworkDiagnostic(*this)
, mNetworkDiagnosticServer(*this)
#if OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE
, mNetworkDiagnosticClient(*this)
#endif
#if OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
, mBorderAgent(*this)
Expand Down
11 changes: 7 additions & 4 deletions src/core/common/instance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,9 @@ class Instance : public otInstance, private NonCopyable

NetworkData::Service::Manager mNetworkDataServiceManager;

#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
NetworkDiagnostic::NetworkDiagnostic mNetworkDiagnostic;
NetworkDiagnostic::Server mNetworkDiagnosticServer;
#if OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE
NetworkDiagnostic::Client mNetworkDiagnosticClient;
#endif

#if OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
Expand Down Expand Up @@ -824,8 +825,10 @@ template <> inline Dns::ServiceDiscovery::Server &Instance::Get(void) { return m
template <> inline Dns::Dso &Instance::Get(void) { return mDnsDso; }
#endif

#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
template <> inline NetworkDiagnostic::NetworkDiagnostic &Instance::Get(void) { return mNetworkDiagnostic; }
template <> inline NetworkDiagnostic::Server &Instance::Get(void) { return mNetworkDiagnosticServer; }

#if OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE
template <> inline NetworkDiagnostic::Client &Instance::Get(void) { return mNetworkDiagnosticClient; }
#endif

#if OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE
Expand Down
6 changes: 6 additions & 0 deletions src/core/config/openthread-core-config-check.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,4 +648,10 @@
#error "OPENTHREAD_CONFIG_CHILD_SUPERVISION_MSG_NO_ACK_REQUEST is removed".
#endif

#ifdef OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#error "OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE is removed. "\
"Use OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE to enable client functionality."\
"Netdiag server functionality is always supported."
#endif

#endif // OPENTHREAD_CORE_CONFIG_CHECK_H_
11 changes: 7 additions & 4 deletions src/core/config/tmf.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,16 @@
#endif

/**
* @def OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
* @def OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE
*
* Define to 1 to enable TMF network diagnostics on MTDs.
* Define to 1 to enable TMF network diagnostics client.
*
* The network diagnostic client add API to send diagnostic requests and queries to other node and process the response.
* It is enabled by default on Border Routers.
*
*/
#ifndef OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#define OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE 0
#ifndef OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE
#define OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE
#endif

/**
Expand Down
Loading

0 comments on commit 0f94f26

Please sign in to comment.