Add support for wrap_string.h and others (#1642)

This commit is contained in:
DuaneEllis-TI
2017-04-27 10:17:09 -07:00
committed by Jonathan Hui
parent 7705bf4c22
commit d65418c12f
144 changed files with 745 additions and 490 deletions
+12 -24
View File
@@ -349,7 +349,7 @@ NL_ENABLE_TESTS([yes])
AM_CONDITIONAL([OPENTHREAD_BUILD_TESTS], [test "${nl_cv_build_tests}" = "yes"])
#
#
# CLI Library
#
AC_ARG_ENABLE(cli-app,
@@ -1128,34 +1128,27 @@ AC_MSG_NOTICE([checking required package dependencies])
# NL_WITH_PACKAGE(...)
#
# Checks for missing functions
#
AC_DEFUN([CHECK_MISSING_FUNC], [
AC_CHECK_FUNC($1, [], [
nl_cv_missing_$1=yes
MISSING_CPPFLAGS="${MISSING_CPPFLAGS} "'-include $(top_srcdir)/src/missing/$1/$1.h'
MISSING_LIBADD="${MISSING_LIBADD} "'$(top_builddir)/src/missing/$1/lib$1.la'
])
AM_CONDITIONAL(m4_toupper(MISSING_$1), [test "${nl_cv_missing_$1}" = "yes"])
])
AC_SUBST(MISSING_CPPFLAGS)
AC_SUBST(MISSING_LIBADD)
CHECK_MISSING_FUNC([strlcpy])
CHECK_MISSING_FUNC([strlcat])
#
# Check for headers
#
OLD_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -Wno-error=address"
AC_HEADER_STDBOOL
CFLAGS="${OLD_CFLAGS}"
AC_HEADER_STDC
AC_CHECK_HEADERS([stdint.h])
AC_CHECK_HEADERS([string.h])
#
# Missing Functions
#
AC_CHECK_FUNC([strlcpy], [AC_DEFINE([HAVE_STRLCPY], [1], [Define if strlcpy exists.])])
AC_CHECK_FUNC([strlcat], [AC_DEFINE([HAVE_STRLCAT], [1], [Define if strlcpy exists.])])
AC_CHECK_FUNC([strnlen], [AC_DEFINE([HAVE_STRNLEN], [1], [Define if strlcpy exists.])])
#
# Check for types and structures
#
@@ -1204,11 +1197,6 @@ src/cli/Makefile
src/ncp/Makefile
src/core/Makefile
src/diag/Makefile
src/missing/Makefile
src/missing/stdbool/Makefile
src/missing/stdint/Makefile
src/missing/strlcat/Makefile
src/missing/strlcpy/Makefile
third_party/Makefile
third_party/mbedtls/Makefile
examples/Makefile
@@ -49,7 +49,6 @@
..\..\include;
..\..\src;
..\..\src\core;
..\..\src\missing;
</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
@@ -49,7 +49,6 @@
..\..\include;
..\..\src;
..\..\src\core;
..\..\src\missing;
..\..\third_party\mbedtls;
..\..\third_party\mbedtls\repo\include;
</AdditionalIncludeDirectories>
@@ -51,7 +51,6 @@
..\..\include;
..\..\src;
..\..\src\core;
..\..\src\missing;
..\..\third_party\mbedtls;
..\..\third_party\mbedtls\repo\include;
</AdditionalIncludeDirectories>
@@ -51,7 +51,6 @@
..\..\include;
..\..\src;
..\..\src\core;
..\..\src\missing;
..\..\third_party\mbedtls;
..\..\third_party\mbedtls\repo\include;
</AdditionalIncludeDirectories>
@@ -49,7 +49,6 @@
..\..\include;
..\..\examples\platforms;
..\..\src\core;
..\..\src\missing;
</AdditionalIncludeDirectories>
<SDLCheck>true</SDLCheck>
</ClCompile>
+6 -7
View File
@@ -48,9 +48,6 @@
%(AdditionalIncludeDirectories);
..\..\include;
..\..\src\core;
..\..\src\missing;
..\..\src\missing\stdint;
..\..\src\missing\stdbool;
..\..\third_party\mbedtls;
..\..\third_party\mbedtls\repo\include;
</AdditionalIncludeDirectories>
@@ -141,8 +138,9 @@
<ClCompile Include="..\..\src\core\thread\topology.cpp" />
<ClCompile Include="..\..\src\core\utils\slaac_address.cpp" />
<ClCompile Include="..\..\src\core\utils\jam_detector.cpp" />
<ClCompile Include="..\..\src\missing\strlcpy\strlcpy.c" />
<ClCompile Include="..\..\src\missing\strlcat\strlcat.c" />
<ClCompile Include="..\..\src\core\utils\missing_strnlen.c" />
<ClCompile Include="..\..\src\core\utils\missing_strlcat.c" />
<ClCompile Include="..\..\src\core\utils\missing_strlcpy.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\openthread\link_raw.h" />
@@ -227,8 +225,9 @@
<ClInclude Include="..\..\src\core\thread\topology.hpp" />
<ClInclude Include="..\..\src\core\utils\slaac_address.hpp" />
<ClInclude Include="..\..\src\core\utils\jam_detector.hpp" />
<ClInclude Include="..\..\src\missing\strlcpy\strlcpy.h" />
<ClInclude Include="..\..\src\missing\strlcat\strlcat.h" />
<ClInclude Include="..\..\src\core\utils\wrap_string.h" />
<ClInclude Include="..\..\src\core\utils\wrap_stdbool.h" />
<ClInclude Include="..\..\src\core\utils\wrap_stdint.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
+18 -12
View File
@@ -300,6 +300,15 @@
<ClCompile Include="..\..\src\core\utils\jam_detector.cpp">
<Filter>Source Files\utils</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\utils\wrap_strnlen.cpp">
<Filter>Source Files\utils</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\utils\wrap_strlcpy.cpp">
<Filter>Source Files\utils</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\utils\wrap_strlcat.cpp">
<Filter>Source Files\utils</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\meshcop\announce_begin_client.cpp">
<Filter>Source Files\meshcop</Filter>
</ClCompile>
@@ -312,12 +321,6 @@
<ClCompile Include="..\..\src\core\thread\network_diagnostic.cpp">
<Filter>Source Files\thread</Filter>
</ClCompile>
<ClCompile Include="..\..\src\missing\strlcpy\strlcpy.c">
<Filter>Source Files\missing</Filter>
</ClCompile>
<ClCompile Include="..\..\src\missing\strlcat\strlcat.c">
<Filter>Source Files\missing</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\core\coap\coap_base.hpp">
@@ -554,6 +557,15 @@
<ClInclude Include="..\..\src\core\utils\jam_detector.hpp">
<Filter>Header Files\utils</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\utils\wrap_string.hpp">
<Filter>Header Files\utils</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\utils\wrap_stdbool.hpp">
<Filter>Header Files\utils</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\utils\wrap_stdint.hpp">
<Filter>Header Files\utils</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\common\crc16.hpp">
<Filter>Header Files\common</Filter>
</ClInclude>
@@ -566,11 +578,5 @@
<ClInclude Include="..\..\src\core\thread\network_diagnostic_tlvs.hpp">
<Filter>Header Files\thread</Filter>
</ClInclude>
<ClInclude Include="..\..\src\missing\strlcpy\strlcpy.h">
<Filter>Header Files\missing</Filter>
</ClInclude>
<ClInclude Include="..\..\src\missing\strlcat\strlcat.h">
<Filter>Header Files\missing</Filter>
</ClInclude>
</ItemGroup>
</Project>
+9 -7
View File
@@ -44,6 +44,8 @@
WINDOWS_LOGGING;
OPENTHREAD_MULTIPLE_INSTANCE;
OPENTHREAD_FTD=1;
HAVE_STDBOOL_H=1;
HAVE_STDINT_H=1;
OTBUILD;
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
@@ -51,11 +53,9 @@
..\..\include;
..\..\examples\drivers\windows\include;
..\..\src\core;
..\..\src\missing;
..\..\src\missing\stdint;
..\..\src\missing\stdbool;
..\..\third_party\mbedtls;
..\..\third_party\mbedtls\repo\include;
..\..\examples\drivers\windows\include_c99;
</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4100;4706;4748;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
@@ -146,8 +146,9 @@
<ClCompile Include="..\..\src\core\thread\topology.cpp" />
<ClCompile Include="..\..\src\core\utils\slaac_address.cpp" />
<ClCompile Include="..\..\src\core\utils\jam_detector.cpp" />
<ClCompile Include="..\..\src\missing\strlcat\strlcat.c" />
<ClCompile Include="..\..\src\missing\strlcpy\strlcpy.c" />
<ClCompile Include="..\..\src\core\utils\missing_strlcat.c" />
<ClCompile Include="..\..\src\core\utils\missing_strlcpy.c" />
<ClCompile Include="..\..\src\core\utils\missing_strnlen.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\examples\drivers\windows\include\openthread-core-windows-config.h" />
@@ -258,8 +259,9 @@
<ClInclude Include="..\..\src\core\thread\topology.hpp" />
<ClInclude Include="..\..\src\core\utils\slaac_address.hpp" />
<ClInclude Include="..\..\src\core\utils\jam_detector.hpp" />
<ClInclude Include="..\..\src\missing\strlcpy\strlcpy.h" />
<ClInclude Include="..\..\src\missing\strlcat\strlcat.h" />
<ClInclude Include="..\..\src\core\utils\wrap_string.h" />
<ClInclude Include="..\..\src\core\utils\wrap_stdbool.h" />
<ClInclude Include="..\..\src\core\utils\wrap_stdint.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
@@ -309,10 +309,13 @@
<ClCompile Include="..\..\src\core\common\crc16.cpp">
<Filter>Source Files\common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\missing\strlcpy\strlcpy.c">
<ClCompile Include="..\..\src\core\utils\missing_strlcpy.c">
<Filter>Source Files\missing</Filter>
</ClCompile>
<ClCompile Include="..\..\src\missing\strlcat\strlcat.c">
<ClCompile Include="..\..\src\core\utils\missing_strlcat.c">
<Filter>Source Files\missing</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\utils\missing_strnlen.c">
<Filter>Source Files\missing</Filter>
</ClCompile>
</ItemGroup>
@@ -641,10 +644,13 @@
<ClInclude Include="..\..\src\core\api\link_raw.hpp">
<Filter>Header Files\api</Filter>
</ClInclude>
<ClInclude Include="..\..\src\missing\strlcpy\strlcpy.h">
<ClInclude Include="..\..\src\core\utils\wrapper_string.h">
<Filter>Header Files\missing</Filter>
</ClInclude>
<ClInclude Include="..\..\src\missing\strlcat\strlcat.h">
<ClInclude Include="..\..\src\core\utils\wrapper_stdbool.h">
<Filter>Header Files\missing</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\utils\wrapper_stdint.h">
<Filter>Header Files\missing</Filter>
</ClInclude>
</ItemGroup>
+5 -3
View File
@@ -39,15 +39,17 @@
<AdditionalIncludeDirectories>
..\..\include;
..\..\src\core;
..\..\src\missing\stdint;
..\..\src\missing\stdbool;
..\..\third_party\mbedtls;
..\..\third_party\mbedtls\repo\include;
..\..\third_party\mbedtls\repo\include\mbedtls
..\..\third_party\mbedtls\repo\include\mbedtls;
..\..\examples\drivers\windows\include_c99;
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
%(PreprocessorDefinitions);
MBEDTLS_CONFIG_FILE="mbedtls-config.h";
OPENTHREAD_CONFIG_FILE="openthread-windows-config.h";
HAVE_STDBOOL_H=1;
HAVE_STDINT_H=1;
OPENTHREAD_MULTIPLE_INSTANCE;
</PreprocessorDefinitions>
<DisableSpecificWarnings>4132;4242;4245;4603;4627;4986;4987;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+1 -2
View File
@@ -49,11 +49,10 @@
%(AdditionalIncludeDirectories);
..\..\include;
..\..\examples\drivers\windows\include;
..\..\examples\drivers\windows\include_c99;
..\..\examples\drivers\windows\otLwf;
..\..\src;
..\..\src\core;
..\..\src\missing\stdint;
..\..\src\missing\stdbool;
</AdditionalIncludeDirectories>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
+6 -2
View File
@@ -40,13 +40,17 @@
%(PreprocessorDefinitions);
HAVE_STRNLEN=1;
OPENTHREAD_FTD=1;
HAVE_STDBOOL_H=1;
HAVE_STDINT_H=1;
SPINEL_PLATFORM_DOESNT_IMPLEMENT_ERRNO_VAR=1;
OPENTHREAD_CONFIG_FILE="openthread-windows-config.h";
OPENTHREAD_PROJECT_CORE_CONFIG_FILE="openthread-core-windows-config.h";
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
%(AdditionalIncludeDirectories);
..\..\include;
..\..\src\missing\stdint;
..\..\src\missing\stdbool;
..\..\src\core;
..\..\examples\drivers\windows\include_c99;
</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4100;4706;4748;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
+6
View File
@@ -31,6 +31,12 @@
* Platform abstraction for the alarm
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdbool.h>
#include <stdint.h>
#include "openthread/platform/alarm.h"
+6
View File
@@ -26,6 +26,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <assert.h>
#include <fcntl.h>
#include <stdlib.h>
+10
View File
@@ -32,6 +32,16 @@
*
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
// NRF tools use #define PACKAGE - for other purposes
// ie: the physical package the chip comes in
// This conflicts with the GNU Autoconf "PACAKGE" define
#undef PACKAGE
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
+1 -1
View File
@@ -34,7 +34,7 @@
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include "utils/wrap_string.h"
#include <assert.h>
#include <openthread-core-config.h>
-5
View File
@@ -107,11 +107,6 @@
// Redefine rand to random for test code
#define random rand
#ifdef OTBUILD
#include <strlcat/strlcat.h>
#include <strlcpy/strlcpy.h>
#endif
// Disable a few warnings that we don't care about
#pragma warning(disable:4200) // nonstandard extension used: zero-sized array in struct/union
#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
-3
View File
@@ -31,7 +31,6 @@ include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
# Always package (e.g. for 'make dist') these subdirectories.
DIST_SUBDIRS = \
missing \
core \
cli \
ncp \
@@ -41,7 +40,6 @@ DIST_SUBDIRS = \
# Always build (e.g. for 'make all') these subdirectories.
SUBDIRS = \
missing \
core \
$(NULL)
@@ -62,7 +60,6 @@ endif
PRETTY_SUBDIRS = \
cli \
core \
missing \
$(NULL)
include $(abs_top_nlbuild_autotools_dir)/automake/post.am
-1
View File
@@ -118,7 +118,6 @@ CPPFLAGS_COMMON = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/core \
$(OPENTHREAD_TARGET_DEFINES) \
$(MISSING_CPPFLAGS) \
$(NULL)
+1 -1
View File
@@ -39,7 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils/wrap_string.h"
#ifdef OTDLL
#include <assert.h>
+6
View File
@@ -31,6 +31,12 @@
* This file implements a simple CLI coap server and client.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <ctype.h>
#include <cli/cli.hpp>
+7 -1
View File
@@ -31,10 +31,16 @@
* This file implements the CLI server on the CONSOLE service.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils/wrap_string.h"
#include <cli/cli.hpp>
#include <cli/cli_console.hpp>
+1 -1
View File
@@ -39,7 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils/wrap_string.h"
#include "openthread/openthread.h"
+1 -1
View File
@@ -39,7 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils/wrap_string.h"
#include <assert.h>
#include "openthread/openthread.h"
+7 -1
View File
@@ -31,10 +31,16 @@
* This file implements the CLI server on the UART service.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils/wrap_string.h"
#include "openthread/cli.h"
#include "openthread/platform/logging.h"
+7 -1
View File
@@ -31,9 +31,15 @@
* This file implements the CLI server on a UDP socket.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "utils/wrap_string.h"
#include <cli/cli.hpp>
#include <cli/cli_udp.hpp>
+6 -42
View File
@@ -37,7 +37,6 @@ CPPFLAGS_COMMON = \
-I$(top_srcdir)/include \
-I${abs_top_srcdir}/third_party/mbedtls/repo/include \
$(MBEDTLS_CPPFLAGS) \
$(MISSING_CPPFLAGS) \
$(OPENTHREAD_TARGET_DEFINES) \
$(NULL)
@@ -180,57 +179,19 @@ SOURCES_COMMON = \
thread/thread_netif.cpp \
thread/topology.cpp \
utils/jam_detector.cpp \
utils/missing_strlcpy.c \
utils/missing_strlcat.c \
utils/missing_strnlen.c \
utils/slaac_address.cpp \
$(NULL)
SOURCES_MISSING = \
$(NULL)
if MISSING_STRLCPY
###############################################################
# You'll see something similar to the next four lines in all
# of these `MISSING_*` blocks. These makefile gynmastics are
# to work around some unfortunate bugs in automake which
# prevent a more elegant solution. We can't just pull in the
# convenience libraries in `$(MISSING_LIBADD)` because that
# doesn't seem to work on some platforms. Also, we can't
# just include `$(top_srcdir)/src/missing/X/X.c` directly
# because a bug in automake causes the `clean` target to
# break. The following code may look ugly, but it gets the
# job done. It does this by copying the source file to the
# local build directory as an intermediate target. We then
# compile that file. We have to add the path in CPPFLAGS
# because the file might include headers from that directory.
# Because the copied source file is explicitly labeled as
# an intermediate target, it will always get deleted (unless
# it already existed in the first place). -- RQ 2017-03-22
strlcpy.c: $(top_srcdir)/src/missing/strlcpy/strlcpy.c
$(AM_V_GEN)cp $< $@
.INTERMEDIATE: strlcpy.c
CPPFLAGS_COMMON += -I$(top_srcdir)/src/missing/strlcpy
SOURCES_MISSING += strlcpy.c
endif
if MISSING_STRLCAT
# See comment above for explanation.
strlcat.c: $(top_srcdir)/src/missing/strlcat/strlcat.c
$(AM_V_GEN)cp $< $@
.INTERMEDIATE: strlcat.c
CPPFLAGS_COMMON += -I$(top_srcdir)/src/missing/strlcat
SOURCES_MISSING += strlcat.c
endif
libopenthread_mtd_a_SOURCES = \
$(SOURCES_COMMON) \
$(SOURCES_MISSING) \
$(NULL)
libopenthread_ftd_a_SOURCES = \
$(SOURCES_COMMON) \
$(SOURCES_MISSING) \
$(NULL)
HEADERS_COMMON = \
@@ -336,6 +297,9 @@ HEADERS_COMMON = \
thread/topology.hpp \
utils/slaac_address.hpp \
utils/jam_detector.hpp \
utils/wrap_stdbool.h \
utils/wrap_stdint.h \
utils/wrap_string.h \
$(NULL)
noinst_HEADERS = \
+6
View File
@@ -26,6 +26,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <common/code_utils.hpp>
#include <coap/coap_base.hpp>
+7 -1
View File
@@ -26,7 +26,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <string.h>
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "utils/wrap_string.h"
#include "openthread/platform/random.h"
+6
View File
@@ -31,6 +31,12 @@
* This file implements the CoAP header generation and parsing.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "openthread/platform/random.h"
#include <coap/coap_header.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef COAP_HEADER_HPP_
#define COAP_HEADER_HPP_
#include <string.h>
#include "utils/wrap_string.h"
#include "openthread/coap.h"
+6
View File
@@ -31,6 +31,12 @@
* This file implements the CoAP server message dispatch.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <coap/coap_server.hpp>
#include <common/code_utils.hpp>
#include <net/ip6.hpp>
+6
View File
@@ -28,6 +28,12 @@
#define WPP_NAME "secure_coap_client.tmh"
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <coap/secure_coap_client.hpp>
#include <common/logging.hpp>
#include <meshcop/dtls.hpp>
+6
View File
@@ -28,6 +28,12 @@
#define WPP_NAME "secure_coap_server.tmh"
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <coap/secure_coap_server.hpp>
#include <common/logging.hpp>
#include <meshcop/dtls.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef CODE_UTILS_HPP_
#define CODE_UTILS_HPP_
#include <stdbool.h>
#include "utils/wrap_stdbool.h"
// Calculates the aligned variable size.
#define otALIGNED_VAR_SIZE(size, align_type) \
+6
View File
@@ -31,6 +31,12 @@
* This file implements CRC16 computations.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <common/crc16.hpp>
namespace Thread {
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef CRC16_HPP_
#define CRC16_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
namespace Thread {
+1 -1
View File
@@ -37,7 +37,7 @@
#include <openthread-core-config.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include "utils/wrap_string.h"
#if defined(OPENTHREAD_TARGET_DARWIN) || defined(OPENTHREAD_TARGET_LINUX)
+1 -1
View File
@@ -35,7 +35,7 @@
#define ENCODING_HPP_
#include <limits.h>
#include <stdint.h>
#include "utils/wrap_stdint.h"
namespace Thread {
namespace Encoding {
+1 -1
View File
@@ -36,7 +36,7 @@
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include "utils/wrap_string.h"
#include <openthread-core-config.h>
#include "openthread/types.h"
+6
View File
@@ -33,6 +33,12 @@
#define WPP_NAME "message.tmh"
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <common/code_utils.hpp>
#include <common/debug.hpp>
#include <common/logging.hpp>
+2 -2
View File
@@ -40,8 +40,8 @@
#include <openthread-config.h>
#endif
#include <stdint.h>
#include <string.h>
#include "utils/wrap_stdint.h"
#include "utils/wrap_string.h"
#include "openthread/message.h"
#include "openthread/platform/messagepool.h"
+6
View File
@@ -31,6 +31,12 @@
* This file implements the tasklet scheduler.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "openthread/openthread.h"
#include <common/code_utils.hpp>
+6
View File
@@ -33,6 +33,12 @@
#define WPP_NAME "timer.tmh"
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "openthread/platform/alarm.h"
#include <common/code_utils.hpp>
+1 -1
View File
@@ -35,7 +35,7 @@
#define TIMER_HPP_
#include <stddef.h>
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include "openthread/types.h"
#include "openthread/platform/alarm.h"
+6
View File
@@ -31,6 +31,12 @@
* This file implements common methods for manipulating MLE TLVs.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <common/code_utils.hpp>
#include <common/message.hpp>
#include <thread/mle_tlvs.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef TLVS_HPP_
#define TLVS_HPP_
#include <string.h>
#include "utils/wrap_string.h"
#include "openthread/types.h"
+6
View File
@@ -31,6 +31,12 @@
* This file implements the trickle timer logic.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "openthread/platform/random.h"
#include <common/code_utils.hpp>
+6
View File
@@ -31,6 +31,12 @@
* This file implements AES-CCM.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <common/code_utils.hpp>
#include <common/debug.hpp>
#include <crypto/aes_ccm.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef AES_CCM_HPP_
#define AES_CCM_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include "openthread/types.h"
+6
View File
@@ -31,6 +31,12 @@
* This file implements AES-ECB.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <crypto/aes_ecb.hpp>
namespace Thread {
+6
View File
@@ -31,6 +31,12 @@
* This file implements HMAC SHA-256.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <crypto/hmac_sha256.hpp>
namespace Thread {
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef HMAC_SHA256_HPP_
#define HMAC_SHA256_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include <mbedtls/md.h>
+6
View File
@@ -31,6 +31,12 @@
* This file implements the use of mbedTLS.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <crypto/mbedtls.hpp>
namespace Thread {
+1 -1
View File
@@ -37,7 +37,7 @@
#include <openthread-config.h>
#endif
#include <string.h>
#include "utils/wrap_string.h"
#include <crypto/pbkdf2_cmac.h>
#include <mbedtls/cmac.h>
+2 -2
View File
@@ -35,8 +35,8 @@
#ifndef PBKDF2_CMAC_H_
#define PBKDF2_CMAC_H_
#include <stdint.h>
#include <stdbool.h>
#include "utils/wrap_stdint.h"
#include "utils/wrap_stdbool.h"
#ifdef __cplusplus
extern "C" {
+6
View File
@@ -31,6 +31,12 @@
* This file implements SHA-256.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <crypto/sha256.hpp>
namespace Thread {
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef SHA256_HPP_
#define SHA256_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include <mbedtls/sha256.h>
+1 -1
View File
@@ -39,7 +39,7 @@
#include <openthread-config.h>
#endif
#include <string.h>
#include "utils/wrap_string.h"
#include "openthread/platform/random.h"
#include "openthread/platform/usec-alarm.h"
+7 -1
View File
@@ -31,7 +31,13 @@
* This file implements blacklist IEEE 802.15.4 frame filtering based on MAC address.
*/
#include <string.h>
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "utils/wrap_string.h"
#include <common/code_utils.hpp>
#include <mac/mac_blacklist.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef MAC_BLACKLIST_HPP_
#define MAC_BLACKLIST_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include "openthread/types.h"
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef MAC_BLACKLIST_HPP_
#define MAC_BLACKLIST_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include "openthread/types.h"
+1 -1
View File
@@ -38,7 +38,7 @@
#endif
#include <stdio.h>
#include <string.h>
#include "utils/wrap_string.h"
#include <common/code_utils.hpp>
#include <common/debug.hpp>
+2 -2
View File
@@ -37,8 +37,8 @@
#include <openthread-core-config.h>
#include <limits.h>
#include <stdint.h>
#include <string.h>
#include "utils/wrap_stdint.h"
#include "utils/wrap_string.h"
#include "openthread/types.h"
#include "openthread/platform/radio.h"
+7 -1
View File
@@ -31,7 +31,13 @@
* This file implements whitelist IEEE 802.15.4 frame filtering based on MAC address.
*/
#include <string.h>
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "utils/wrap_string.h"
#include <common/code_utils.hpp>
#include <mac/mac_whitelist.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef MAC_WHITELIST_HPP_
#define MAC_WHITELIST_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include "openthread/types.h"
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef MAC_WHITELIST_HPP_
#define MAC_WHITELIST_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include "openthread/types.h"
+1 -1
View File
@@ -40,7 +40,7 @@
#endif
#include <stdio.h>
#include <string.h>
#include "utils/wrap_string.h"
#include "openthread/platform/random.h"
+6
View File
@@ -32,6 +32,12 @@
*
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdio.h>
#include "openthread/platform/settings.h"
+6
View File
@@ -34,6 +34,12 @@
#define WPP_NAME "dataset_manager.tmh"
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdio.h>
#include "openthread/platform/random.h"
+7 -1
View File
@@ -31,7 +31,13 @@
* This file implements common MeshCoP timestamp processing.
*/
#include <string.h>
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "utils/wrap_string.h"
#include "openthread/types.h"
+1 -1
View File
@@ -35,7 +35,7 @@
#ifndef MESHCOP_TLVS_HPP_
#define MESHCOP_TLVS_HPP_
#include <string.h>
#include "utils/wrap_string.h"
#include "openthread/types.h"
+6
View File
@@ -33,6 +33,12 @@
#define WPP_NAME "dhcp6_client.tmh"
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "openthread/types.h"
#include "openthread/platform/random.h"
+1 -1
View File
@@ -32,7 +32,7 @@
#include <openthread-config.h>
#endif
#include <string.h>
#include "utils/wrap_string.h"
#include <common/debug.hpp>
#include <common/code_utils.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef DNS_HEADER_HPP_
#define DNS_HEADER_HPP_
#include <string.h>
#include "utils/wrap_string.h"
#include <openthread/types.h>
+1 -1
View File
@@ -39,7 +39,7 @@
#include <openthread-config.h>
#endif
#include <string.h>
#include "utils/wrap_string.h"
#include <common/code_utils.hpp>
#include <common/debug.hpp>
+6
View File
@@ -33,6 +33,12 @@
#define WPP_NAME "ip6.tmh"
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <common/code_utils.hpp>
#include <common/debug.hpp>
#include <common/logging.hpp>
+1 -1
View File
@@ -38,7 +38,7 @@
#endif
#include <stdio.h>
#include <string.h>
#include "utils/wrap_string.h"
#include <common/code_utils.hpp>
#include <common/encoding.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef IP6_ADDRESS_HPP_
#define IP6_ADDRESS_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include "openthread/types.h"
+6
View File
@@ -31,6 +31,12 @@
* This file implements IPv6 datagram filtering.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdio.h>
#include <common/code_utils.hpp>
+6
View File
@@ -31,6 +31,12 @@
* This file implements MPL.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "openthread/platform/random.h"
#include <common/code_utils.hpp>
+6
View File
@@ -31,6 +31,12 @@
* This file implements IPv6 route tables.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <net/ip6.hpp>
#include <net/ip6_routes.hpp>
#include <net/netif.hpp>
+5
View File
@@ -30,6 +30,11 @@
* @file
* This file implements IPv6 network interfaces.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <common/code_utils.hpp>
#include <common/debug.hpp>
+6
View File
@@ -31,6 +31,12 @@
* This file implements UDP/IPv6 sockets.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <stdio.h>
#include <common/code_utils.hpp>
+2 -2
View File
@@ -35,8 +35,8 @@
#ifndef OPENTHREADINSTANCE_H_
#define OPENTHREADINSTANCE_H_
#include <stdint.h>
#include <stdbool.h>
#include "utils/wrap_stdint.h"
#include "utils/wrap_stdbool.h"
#include <openthread-core-config.h>
+6
View File
@@ -31,6 +31,12 @@
* This file implements data poll (mac data request command) manager class.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#define WPP_NAME "data_poll_manager.tmh"
#include "openthread/platform/random.h"
+6
View File
@@ -31,6 +31,12 @@
* This file implements the Energy Scan Server.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#define WPP_NAME "energy_scan_server.tmh"
#include "openthread/platform/random.h"
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef KEY_MANAGER_HPP_
#define KEY_MANAGER_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include "openthread/types.h"
+1 -1
View File
@@ -38,7 +38,7 @@
#endif
#include <stdio.h>
#include <string.h>
#include "utils/wrap_string.h"
#include "openthread/types.h"
+6
View File
@@ -31,6 +31,12 @@
* This file implements 6LoWPAN header compression.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include <common/code_utils.hpp>
#include <common/debug.hpp>
#include <common/encoding.hpp>
+6
View File
@@ -33,6 +33,12 @@
#define WPP_NAME "mesh_forwarder.tmh"
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "openthread/platform/random.h"
#include <common/code_utils.hpp>
+6
View File
@@ -31,6 +31,12 @@
* This file implements MLE functionality required for the Thread Child, Router and Leader roles.
*/
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#define WPP_NAME "mle.tmh"
#include "openthread/platform/radio.h"
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef MLE_ROUTER_HPP_
#define MLE_ROUTER_HPP_
#include <string.h>
#include "utils/wrap_string.h"
#include <coap/coap_header.hpp>
#include <coap/coap_server.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef MLE_ROUTER_HPP_
#define MLE_ROUTER_HPP_
#include <string.h>
#include "utils/wrap_string.h"
#include <thread/mle.hpp>
#include <thread/mle_tlvs.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef MLE_TLVS_HPP_
#define MLE_TLVS_HPP_
#include <string.h>
#include "utils/wrap_string.h"
#include "openthread/types.h"
+6
View File
@@ -33,6 +33,12 @@
#define WPP_NAME "network_data.tmh"
#ifdef OPENTHREAD_CONFIG_FILE
#include OPENTHREAD_CONFIG_FILE
#else
#include <openthread-config.h>
#endif
#include "openthread/platform/random.h"
#include <coap/coap_header.hpp>
+1 -1
View File
@@ -34,7 +34,7 @@
#ifndef NETWORK_DATA_LEADER_HPP_
#define NETWORK_DATA_LEADER_HPP_
#include <stdint.h>
#include "utils/wrap_stdint.h"
#include <coap/coap_server.hpp>
#include <common/timer.hpp>

Some files were not shown because too many files have changed in this diff Show More