mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[network-data] always support service registration at Leader (#4360)
A Leader should always be able to process service registration. This commit: - removes the OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE feature flag around code for handling service registrations by the leader. - support service ALOC forwarding by all router-capable devices. - adds ability for any device to read service information from the network data.
This commit is contained in:
+2
-3
@@ -42,6 +42,7 @@
|
||||
#include <openthread/icmp6.h>
|
||||
#include <openthread/link.h>
|
||||
#include <openthread/ncp.h>
|
||||
#include <openthread/netdata.h>
|
||||
#include <openthread/thread.h>
|
||||
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
|
||||
#include <openthread/network_time.h>
|
||||
@@ -167,9 +168,7 @@ const struct Command Interpreter::sCommands[] = {
|
||||
#if OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE || OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
|
||||
{"netdataregister", &Interpreter::ProcessNetworkDataRegister},
|
||||
#endif
|
||||
#if OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
|
||||
{"netdatashow", &Interpreter::ProcessNetworkDataShow},
|
||||
#endif
|
||||
#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
|
||||
{"networkdiagnostic", &Interpreter::ProcessNetworkDiagnostic},
|
||||
#endif // OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
|
||||
@@ -1723,7 +1722,6 @@ exit:
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
|
||||
void Interpreter::ProcessNetworkDataShow(int argc, char *argv[])
|
||||
{
|
||||
OT_UNUSED_VARIABLE(argc);
|
||||
@@ -1742,6 +1740,7 @@ exit:
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
|
||||
void Interpreter::ProcessService(int argc, char *argv[])
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
|
||||
Reference in New Issue
Block a user