mirror of
https://github.com/espressif/openthread.git
synced 2026-09-13 04:30:08 +00:00
[dhcp] remove dhcp server api (#3476)
This commit is contained in:
@@ -91,7 +91,6 @@ LOCAL_SRC_FILES := \
|
|||||||
src/core/api/crypto_api.cpp \
|
src/core/api/crypto_api.cpp \
|
||||||
src/core/api/dataset_api.cpp \
|
src/core/api/dataset_api.cpp \
|
||||||
src/core/api/dataset_ftd_api.cpp \
|
src/core/api/dataset_ftd_api.cpp \
|
||||||
src/core/api/dhcp6_api.cpp \
|
|
||||||
src/core/api/dns_api.cpp \
|
src/core/api/dns_api.cpp \
|
||||||
src/core/api/icmp6_api.cpp \
|
src/core/api/icmp6_api.cpp \
|
||||||
src/core/api/instance_api.cpp \
|
src/core/api/instance_api.cpp \
|
||||||
|
|||||||
@@ -60,7 +60,6 @@
|
|||||||
<ClCompile Include="..\..\src\core\api\border_router_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\border_router_api.cpp" />
|
||||||
<ClCompile Include="..\..\src\core\api\dataset_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\dataset_api.cpp" />
|
||||||
<ClCompile Include="..\..\src\core\api\dataset_ftd_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\dataset_ftd_api.cpp" />
|
||||||
<ClCompile Include="..\..\src\core\api\dhcp6_api.cpp" />
|
|
||||||
<ClCompile Include="..\..\src\core\api\icmp6_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\icmp6_api.cpp" />
|
||||||
<ClCompile Include="..\..\src\core\api\ip6_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\ip6_api.cpp" />
|
||||||
<ClCompile Include="..\..\src\core\api\instance_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\instance_api.cpp" />
|
||||||
|
|||||||
@@ -81,9 +81,6 @@
|
|||||||
<ClCompile Include="..\..\src\core\api\dataset_ftd_api.cpp">
|
<ClCompile Include="..\..\src\core\api\dataset_ftd_api.cpp">
|
||||||
<Filter>Source Files\api</Filter>
|
<Filter>Source Files\api</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\core\api\dhcp6_api.cpp">
|
|
||||||
<Filter>Source Files\api</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\src\core\api\icmp6_api.cpp">
|
<ClCompile Include="..\..\src\core\api\icmp6_api.cpp">
|
||||||
<Filter>Source Files\api</Filter>
|
<Filter>Source Files\api</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|||||||
@@ -71,7 +71,6 @@
|
|||||||
<ClCompile Include="..\..\src\core\api\border_router_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\border_router_api.cpp" />
|
||||||
<ClCompile Include="..\..\src\core\api\dataset_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\dataset_api.cpp" />
|
||||||
<ClCompile Include="..\..\src\core\api\dataset_ftd_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\dataset_ftd_api.cpp" />
|
||||||
<ClCompile Include="..\..\src\core\api\dhcp6_api.cpp" />
|
|
||||||
<ClCompile Include="..\..\src\core\api\icmp6_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\icmp6_api.cpp" />
|
||||||
<ClCompile Include="..\..\src\core\api\ip6_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\ip6_api.cpp" />
|
||||||
<ClCompile Include="..\..\src\core\api\instance_api.cpp" />
|
<ClCompile Include="..\..\src\core\api\instance_api.cpp" />
|
||||||
@@ -175,8 +174,6 @@
|
|||||||
<ClInclude Include="..\..\include\openthread\border_router.h" />
|
<ClInclude Include="..\..\include\openthread\border_router.h" />
|
||||||
<ClInclude Include="..\..\include\openthread\dataset.h" />
|
<ClInclude Include="..\..\include\openthread\dataset.h" />
|
||||||
<ClInclude Include="..\..\include\openthread\dataset_ftd.h" />
|
<ClInclude Include="..\..\include\openthread\dataset_ftd.h" />
|
||||||
<ClInclude Include="..\..\include\openthread\dhcp6_client.h" />
|
|
||||||
<ClInclude Include="..\..\include\openthread\dhcp6_server.h" />
|
|
||||||
<ClInclude Include="..\..\include\openthread\error.h" />
|
<ClInclude Include="..\..\include\openthread\error.h" />
|
||||||
<ClInclude Include="..\..\include\openthread\icmp6.h" />
|
<ClInclude Include="..\..\include\openthread\icmp6.h" />
|
||||||
<ClInclude Include="..\..\include\openthread\instance.h" />
|
<ClInclude Include="..\..\include\openthread\instance.h" />
|
||||||
|
|||||||
@@ -84,9 +84,6 @@
|
|||||||
<ClCompile Include="..\..\src\core\api\dataset_ftd_api.cpp">
|
<ClCompile Include="..\..\src\core\api\dataset_ftd_api.cpp">
|
||||||
<Filter>Source Files\api</Filter>
|
<Filter>Source Files\api</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\core\api\dhcp6_api.cpp">
|
|
||||||
<Filter>Source Files\api</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\src\core\api\icmp6_api.cpp">
|
<ClCompile Include="..\..\src\core\api\icmp6_api.cpp">
|
||||||
<Filter>Source Files\api</Filter>
|
<Filter>Source Files\api</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -333,7 +330,7 @@
|
|||||||
<ClCompile Include="..\..\src\core\crypto\sha256.cpp">
|
<ClCompile Include="..\..\src\core\crypto\sha256.cpp">
|
||||||
<Filter>Source Files\crypto</Filter>
|
<Filter>Source Files\crypto</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\core\utils\child_supervision.cpp">
|
<ClCompile Include="..\..\src\core\utils\child_supervision.cpp">
|
||||||
<Filter>Source Files\utils</Filter>
|
<Filter>Source Files\utils</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\src\core\utils\parse_cmdline.cpp">
|
<ClCompile Include="..\..\src\core\utils\parse_cmdline.cpp">
|
||||||
@@ -656,12 +653,6 @@
|
|||||||
<ClInclude Include="..\..\include\openthread\dataset_ftd.h">
|
<ClInclude Include="..\..\include\openthread\dataset_ftd.h">
|
||||||
<Filter>Header Files\openthread</Filter>
|
<Filter>Header Files\openthread</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\include\openthread\dhcp6_client.h">
|
|
||||||
<Filter>Header Files\openthread</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\include\openthread\dhcp6_server.h">
|
|
||||||
<Filter>Header Files\openthread</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\include\openthread\error.h">
|
<ClInclude Include="..\..\include\openthread\error.h">
|
||||||
<Filter>Header Files\openthread</Filter>
|
<Filter>Header Files\openthread</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ RtlCopyBufferToMdl(
|
|||||||
#include <openthread/tasklet.h>
|
#include <openthread/tasklet.h>
|
||||||
#include <openthread/commissioner.h>
|
#include <openthread/commissioner.h>
|
||||||
#include <openthread/joiner.h>
|
#include <openthread/joiner.h>
|
||||||
#include <openthread/dhcp6_server.h>
|
|
||||||
#include <common/code_utils.hpp>
|
#include <common/code_utils.hpp>
|
||||||
#include <openthread/platform/logging.h>
|
#include <openthread/platform/logging.h>
|
||||||
#include <openthread/platform/logging-windows.h>
|
#include <openthread/platform/logging-windows.h>
|
||||||
|
|||||||
@@ -543,10 +543,6 @@ void otLwfStateChangedCallback(uint32_t aFlags, _In_ void *aContext)
|
|||||||
{
|
{
|
||||||
LogVerbose(DRIVER_DEFAULT, "Filter %p received OT_CHANGED_THREAD_NETDATA", pFilter);
|
LogVerbose(DRIVER_DEFAULT, "Filter %p received OT_CHANGED_THREAD_NETDATA", pFilter);
|
||||||
otIp6SlaacUpdate(pFilter->otCtx, pFilter->otAutoAddresses, ARRAYSIZE(pFilter->otAutoAddresses), otIp6CreateRandomIid, NULL);
|
otIp6SlaacUpdate(pFilter->otCtx, pFilter->otAutoAddresses, ARRAYSIZE(pFilter->otAutoAddresses), otIp6CreateRandomIid, NULL);
|
||||||
|
|
||||||
#if OPENTHREAD_ENABLE_DHCP6_SERVER
|
|
||||||
otDhcp6ServerUpdate(pFilter->otCtx);
|
|
||||||
#endif // OPENTHREAD_ENABLE_DHCP6_SERVER
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((aFlags & OT_CHANGED_THREAD_ML_ADDR) != 0)
|
if ((aFlags & OT_CHANGED_THREAD_ML_ADDR) != 0)
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ openthread_headers = \
|
|||||||
dataset.h \
|
dataset.h \
|
||||||
dataset_ftd.h \
|
dataset_ftd.h \
|
||||||
diag.h \
|
diag.h \
|
||||||
dhcp6_server.h \
|
|
||||||
dns.h \
|
dns.h \
|
||||||
error.h \
|
error.h \
|
||||||
icmp6.h \
|
icmp6.h \
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016, 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 includes the platform abstraction for the Thread DHCPv6 server.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef OPENTHREAD_DHCP6_SERVER_H_
|
|
||||||
#define OPENTHREAD_DHCP6_SERVER_H_
|
|
||||||
|
|
||||||
#include <openthread/instance.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @addtogroup api-dhcp6
|
|
||||||
*
|
|
||||||
* @{
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates DHCP Agents and DHCP Alocs.
|
|
||||||
*
|
|
||||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void otDhcp6ServerUpdate(otInstance *aInstance);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} // end of extern "C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // OPENTHREAD_DHCP6_SERVER_H_
|
|
||||||
@@ -64,7 +64,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef OTDLL
|
#ifndef OTDLL
|
||||||
#include <openthread/dhcp6_server.h>
|
|
||||||
#include <openthread/diag.h>
|
#include <openthread/diag.h>
|
||||||
#include <openthread/icmp6.h>
|
#include <openthread/icmp6.h>
|
||||||
#include <openthread/platform/uart.h>
|
#include <openthread/platform/uart.h>
|
||||||
@@ -3821,10 +3820,6 @@ void Interpreter::HandleNetifStateChanged(otChangedFlags aFlags)
|
|||||||
|
|
||||||
#ifndef OTDLL
|
#ifndef OTDLL
|
||||||
otIp6SlaacUpdate(mInstance, mSlaacAddresses, OT_ARRAY_LENGTH(mSlaacAddresses), otIp6CreateRandomIid, NULL);
|
otIp6SlaacUpdate(mInstance, mSlaacAddresses, OT_ARRAY_LENGTH(mSlaacAddresses), otIp6CreateRandomIid, NULL);
|
||||||
#if OPENTHREAD_ENABLE_DHCP6_SERVER
|
|
||||||
otDhcp6ServerUpdate(mInstance);
|
|
||||||
#endif // OPENTHREAD_ENABLE_DHCP6_SERVER
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ SOURCES_COMMON = \
|
|||||||
api/crypto_api.cpp \
|
api/crypto_api.cpp \
|
||||||
api/dataset_api.cpp \
|
api/dataset_api.cpp \
|
||||||
api/dataset_ftd_api.cpp \
|
api/dataset_ftd_api.cpp \
|
||||||
api/dhcp6_api.cpp \
|
|
||||||
api/dns_api.cpp \
|
api/dns_api.cpp \
|
||||||
api/icmp6_api.cpp \
|
api/icmp6_api.cpp \
|
||||||
api/instance_api.cpp \
|
api/instance_api.cpp \
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016, 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
|
|
||||||
* This file implements the OpenThread DHCPv6 API.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "openthread-core-config.h"
|
|
||||||
|
|
||||||
#include <openthread/dhcp6_server.h>
|
|
||||||
|
|
||||||
#include "common/instance.hpp"
|
|
||||||
|
|
||||||
using namespace ot;
|
|
||||||
|
|
||||||
#if OPENTHREAD_ENABLE_DHCP6_SERVER
|
|
||||||
void otDhcp6ServerUpdate(otInstance *aInstance)
|
|
||||||
{
|
|
||||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
|
||||||
|
|
||||||
instance.GetThreadNetif().GetDhcp6Server().UpdateService();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -1510,6 +1510,10 @@ void Mle::HandleStateChanged(otChangedFlags aFlags)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if OPENTHREAD_ENABLE_DHCP6_SERVER
|
||||||
|
GetNetif().GetDhcp6Server().UpdateService();
|
||||||
|
#endif // OPENTHREAD_ENABLE_DHCP6_SERVER
|
||||||
|
|
||||||
#if OPENTHREAD_ENABLE_DHCP6_CLIENT
|
#if OPENTHREAD_ENABLE_DHCP6_CLIENT
|
||||||
GetNetif().GetDhcp6Client().UpdateAddresses();
|
GetNetif().GetDhcp6Client().UpdateAddresses();
|
||||||
#endif // OPENTHREAD_ENABLE_DHCP6_CLIENT
|
#endif // OPENTHREAD_ENABLE_DHCP6_CLIENT
|
||||||
|
|||||||
@@ -43,9 +43,6 @@
|
|||||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||||
#include <openthread/child_supervision.h>
|
#include <openthread/child_supervision.h>
|
||||||
#endif
|
#endif
|
||||||
#if OPENTHREAD_ENABLE_DHCP6_SERVER
|
|
||||||
#include <openthread/dhcp6_server.h>
|
|
||||||
#endif
|
|
||||||
#include <openthread/diag.h>
|
#include <openthread/diag.h>
|
||||||
#include <openthread/icmp6.h>
|
#include <openthread/icmp6.h>
|
||||||
#if OPENTHREAD_ENABLE_JAM_DETECTION
|
#if OPENTHREAD_ENABLE_JAM_DETECTION
|
||||||
@@ -3428,10 +3425,6 @@ void NcpBase::ProcessThreadChangedFlags(void)
|
|||||||
{
|
{
|
||||||
mChangedPropsSet.AddProperty(SPINEL_PROP_THREAD_ON_MESH_NETS);
|
mChangedPropsSet.AddProperty(SPINEL_PROP_THREAD_ON_MESH_NETS);
|
||||||
mChangedPropsSet.AddProperty(SPINEL_PROP_THREAD_OFF_MESH_ROUTES);
|
mChangedPropsSet.AddProperty(SPINEL_PROP_THREAD_OFF_MESH_ROUTES);
|
||||||
|
|
||||||
#if OPENTHREAD_ENABLE_DHCP6_SERVER
|
|
||||||
otDhcp6ServerUpdate(mInstance);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mThreadChangedFlags &= ~threadFlag;
|
mThreadChangedFlags &= ~threadFlag;
|
||||||
|
|||||||
Reference in New Issue
Block a user