diff --git a/STYLE_GUIDE.md b/STYLE_GUIDE.md
index ddde09409..eca349446 100644
--- a/STYLE_GUIDE.md
+++ b/STYLE_GUIDE.md
@@ -123,11 +123,11 @@
- Case
- C preprocessor symbols should be all uppercase.
- All OpenThread names in the C language shall be in *snake case*.
- - All OpenThread class, namespace, structure, method, function, enumeration, and type names in the C++ language shall be in *upper camel case*.
+ - All OpenThread class, namespace, structure, method, function, enumeration, and type names in the C++ language shall be in *upper camel case*. Exception: the top level OpenThread namespace 'ot'.
- All OpenThread instantiated names of instances of classes, namespaces, structures, methods, functions, enumerations, and types as well as method and function parameters in the C++ language shall be in *lower camel case*.
- Symbol Qualification
- All OpenThread C public data types and free functions should have `ot` prepended to their name.
- - All OpenThread C++ code should be in the ‘OpenThread’ top-level namespace.
+ - All OpenThread C++ code should be in the ‘ot’ top-level namespace.
- Scope
- All global data shall have a `g` prepended to the name to denote global scope.
- All static data shall have a `s` prepended to the name to denote static scope.
diff --git a/etc/visual-studio/OpenThread.vcxproj b/etc/visual-studio/OpenThread.vcxproj
index ba8beba6b..021279d46 100644
--- a/etc/visual-studio/OpenThread.vcxproj
+++ b/etc/visual-studio/OpenThread.vcxproj
@@ -3,7 +3,7 @@
{f8c22844-9b93-4978-80df-8af2b37a7abb}
- Thread
+ ot
en-US
14.0
true
diff --git a/etc/visual-studio/UnitTests.vcxproj b/etc/visual-studio/UnitTests.vcxproj
index cb6b197a6..d44a0235f 100644
--- a/etc/visual-studio/UnitTests.vcxproj
+++ b/etc/visual-studio/UnitTests.vcxproj
@@ -4,7 +4,7 @@
{FD64BF17-8D36-4578-8D13-77B123BE30D3}
Win32Proj
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
diff --git a/etc/visual-studio/libopenthread-cli-windows.vcxproj b/etc/visual-studio/libopenthread-cli-windows.vcxproj
index d3cd68dfb..818e2851b 100644
--- a/etc/visual-studio/libopenthread-cli-windows.vcxproj
+++ b/etc/visual-studio/libopenthread-cli-windows.vcxproj
@@ -4,7 +4,7 @@
{28834498-3837-44A5-8F67-249ABAB7B97D}
StaticLibrary
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
diff --git a/etc/visual-studio/libopenthread-cli.vcxproj b/etc/visual-studio/libopenthread-cli.vcxproj
index b62fec851..06e1a5658 100644
--- a/etc/visual-studio/libopenthread-cli.vcxproj
+++ b/etc/visual-studio/libopenthread-cli.vcxproj
@@ -4,7 +4,7 @@
{41B32069-632E-4578-855B-A36EBFA80B56}
StaticLibrary
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
diff --git a/etc/visual-studio/libopenthread-ncp-spi.vcxproj b/etc/visual-studio/libopenthread-ncp-spi.vcxproj
index a03590ad5..d8a63d3c1 100644
--- a/etc/visual-studio/libopenthread-ncp-spi.vcxproj
+++ b/etc/visual-studio/libopenthread-ncp-spi.vcxproj
@@ -4,7 +4,7 @@
{B92F449E-0FD9-44FC-ACFA-6521A3240CA2}
StaticLibrary
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
diff --git a/etc/visual-studio/libopenthread-ncp-uart.vcxproj b/etc/visual-studio/libopenthread-ncp-uart.vcxproj
index 641503c07..c5339c0b7 100644
--- a/etc/visual-studio/libopenthread-ncp-uart.vcxproj
+++ b/etc/visual-studio/libopenthread-ncp-uart.vcxproj
@@ -4,7 +4,7 @@
{D94867D2-6DAE-47E2-962A-5E8E658134D1}
StaticLibrary
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
@@ -75,4 +75,4 @@
-
\ No newline at end of file
+
diff --git a/etc/visual-studio/libopenthread-windows.vcxproj b/etc/visual-studio/libopenthread-windows.vcxproj
index 3d1980a4f..07a1c0a55 100644
--- a/etc/visual-studio/libopenthread-windows.vcxproj
+++ b/etc/visual-studio/libopenthread-windows.vcxproj
@@ -4,7 +4,7 @@
{30723C38-BA3B-44C9-8D64-C5861A26934F}
StaticLibrary
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
diff --git a/etc/visual-studio/libopenthread.vcxproj b/etc/visual-studio/libopenthread.vcxproj
index ec8140caf..27beb76fb 100644
--- a/etc/visual-studio/libopenthread.vcxproj
+++ b/etc/visual-studio/libopenthread.vcxproj
@@ -4,7 +4,7 @@
{DD5018BE-54C6-4FD4-9F8D-08D52FC0CD40}
StaticLibrary
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
diff --git a/etc/visual-studio/libopenthread_k.vcxproj b/etc/visual-studio/libopenthread_k.vcxproj
index 5b5a9c7e6..7b44163d6 100644
--- a/etc/visual-studio/libopenthread_k.vcxproj
+++ b/etc/visual-studio/libopenthread_k.vcxproj
@@ -8,7 +8,7 @@
12.0
Debug
Win32
- Thread
+ ot
KMDF
Universal
diff --git a/etc/visual-studio/mbedtls_k.vcxproj b/etc/visual-studio/mbedtls_k.vcxproj
index a685c1268..4cf8941ed 100644
--- a/etc/visual-studio/mbedtls_k.vcxproj
+++ b/etc/visual-studio/mbedtls_k.vcxproj
@@ -8,7 +8,7 @@
12.0
Debug
Win32
- Thread
+ ot
KMDF
Universal
diff --git a/etc/visual-studio/ot-cli.vcxproj b/etc/visual-studio/ot-cli.vcxproj
index e21d9e438..7f712b895 100644
--- a/etc/visual-studio/ot-cli.vcxproj
+++ b/etc/visual-studio/ot-cli.vcxproj
@@ -4,7 +4,7 @@
{91D3ADEA-F1FE-4433-95B6-F8F6A7CF7BAF}
Win32Proj
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
diff --git a/etc/visual-studio/ot-ncp-spi.vcxproj b/etc/visual-studio/ot-ncp-spi.vcxproj
index db8ae459a..61e1372a6 100644
--- a/etc/visual-studio/ot-ncp-spi.vcxproj
+++ b/etc/visual-studio/ot-ncp-spi.vcxproj
@@ -4,7 +4,7 @@
{B4C744EC-B662-46C6-A076-FB58FA8FDF1B}
Win32Proj
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
diff --git a/etc/visual-studio/ot-ncp-uart.vcxproj b/etc/visual-studio/ot-ncp-uart.vcxproj
index bb8fff8e5..c9dc78e1d 100644
--- a/etc/visual-studio/ot-ncp-uart.vcxproj
+++ b/etc/visual-studio/ot-ncp-uart.vcxproj
@@ -4,7 +4,7 @@
{9EEF9DCD-EA8F-4154-BD02-AB2B31CEC324}
Win32Proj
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
diff --git a/etc/visual-studio/otApi.vcxproj b/etc/visual-studio/otApi.vcxproj
index fe08047a7..38acfef8f 100644
--- a/etc/visual-studio/otApi.vcxproj
+++ b/etc/visual-studio/otApi.vcxproj
@@ -4,7 +4,7 @@
{ED0EA262-C222-42C7-98D3-E70C72978ED2}
Win32Proj
- Thread
+ ot
12.0
Universal
diff --git a/etc/visual-studio/otCli.vcxproj b/etc/visual-studio/otCli.vcxproj
index 70c5229ce..5291045f3 100644
--- a/etc/visual-studio/otCli.vcxproj
+++ b/etc/visual-studio/otCli.vcxproj
@@ -4,7 +4,7 @@
{CAC8A00E-C6C8-4CF0-BA5A-C9A9A601C6DB}
Win32Proj
- Thread
+ ot
Windows Store
14.0
10.0.10586.0
diff --git a/etc/visual-studio/otLwf.vcxproj b/etc/visual-studio/otLwf.vcxproj
index d4f568d47..9c5060584 100644
--- a/etc/visual-studio/otLwf.vcxproj
+++ b/etc/visual-studio/otLwf.vcxproj
@@ -6,7 +6,7 @@
{8b1800b9-d017-4029-9785-13ef5e5b328e}
v4.5
12.0
- Thread
+ ot
KMDF
Universal
diff --git a/etc/visual-studio/otNodeApi.vcxproj b/etc/visual-studio/otNodeApi.vcxproj
index b84edde81..06d6876e3 100644
--- a/etc/visual-studio/otNodeApi.vcxproj
+++ b/etc/visual-studio/otNodeApi.vcxproj
@@ -4,7 +4,7 @@
{B7C6F344-7287-4930-AF38-223622BD8CBB}
Win32Proj
- Thread
+ ot
12.0
Universal
diff --git a/etc/visual-studio/ottmp.vcxproj b/etc/visual-studio/ottmp.vcxproj
index 7d0a8eb5c..96a5e5596 100644
--- a/etc/visual-studio/ottmp.vcxproj
+++ b/etc/visual-studio/ottmp.vcxproj
@@ -6,7 +6,7 @@
{497e31cb-056b-4f31-abb8-447fd55ee5a5}
v4.5
12.0
- Thread
+ ot
Windows10
WindowsKernelModeDriver10.0
Driver
diff --git a/etc/visual-studio/spinel_k.vcxproj b/etc/visual-studio/spinel_k.vcxproj
index 897d79779..ed09929a4 100644
--- a/etc/visual-studio/spinel_k.vcxproj
+++ b/etc/visual-studio/spinel_k.vcxproj
@@ -8,7 +8,7 @@
12.0
Debug
Win32
- Thread
+ ot
KMDF
Universal
diff --git a/examples/apps/windows/App.xaml b/examples/apps/windows/App.xaml
index 45bbb4ff7..10b02c406 100644
--- a/examples/apps/windows/App.xaml
+++ b/examples/apps/windows/App.xaml
@@ -26,10 +26,10 @@
POSSIBILITY OF SUCH DAMAGE.
-->
diff --git a/examples/apps/windows/App.xaml.cpp b/examples/apps/windows/App.xaml.cpp
index 8fffb144d..cf33b5432 100644
--- a/examples/apps/windows/App.xaml.cpp
+++ b/examples/apps/windows/App.xaml.cpp
@@ -29,7 +29,7 @@
#include "pch.h"
#include "MainPage.xaml.h"
-using namespace Thread;
+using namespace ot;
using namespace Platform;
using namespace Windows::ApplicationModel;
diff --git a/examples/apps/windows/App.xaml.h b/examples/apps/windows/App.xaml.h
index 52ef3aab5..0449c8953 100644
--- a/examples/apps/windows/App.xaml.h
+++ b/examples/apps/windows/App.xaml.h
@@ -30,7 +30,7 @@
#include "App.g.h"
-namespace Thread
+namespace ot
{
///
/// Provides application-specific behavior to supplement the default Application class.
diff --git a/examples/apps/windows/ClientArgs.h b/examples/apps/windows/ClientArgs.h
index 6b11c9336..3943a11b2 100644
--- a/examples/apps/windows/ClientArgs.h
+++ b/examples/apps/windows/ClientArgs.h
@@ -28,7 +28,7 @@
#pragma once
-namespace Thread
+namespace ot
{
public ref class ClientArgs sealed
@@ -40,4 +40,4 @@ public:
property Platform::String^ ClientPort;
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/ClientControl.xaml b/examples/apps/windows/ClientControl.xaml
index 927ba48a8..4f00fbbb2 100644
--- a/examples/apps/windows/ClientControl.xaml
+++ b/examples/apps/windows/ClientControl.xaml
@@ -26,10 +26,10 @@
POSSIBILITY OF SUCH DAMAGE.
-->
diff --git a/examples/apps/windows/ClientControl.xaml.cpp b/examples/apps/windows/ClientControl.xaml.cpp
index 9b5c7310a..cc8f40bf7 100644
--- a/examples/apps/windows/ClientControl.xaml.cpp
+++ b/examples/apps/windows/ClientControl.xaml.cpp
@@ -33,7 +33,7 @@
#include "Factory.h"
#include "TalkHelper.h"
-using namespace Thread;
+using namespace ot;
using namespace Concurrency;
using namespace Platform;
diff --git a/examples/apps/windows/ClientControl.xaml.h b/examples/apps/windows/ClientControl.xaml.h
index 305e51527..8c247af2c 100644
--- a/examples/apps/windows/ClientControl.xaml.h
+++ b/examples/apps/windows/ClientControl.xaml.h
@@ -35,7 +35,7 @@
#include "IMainPageUIElements.h"
#include "Protocol.h"
-namespace Thread
+namespace ot
{
[Windows::Foundation::Metadata::WebHostHidden]
@@ -63,4 +63,4 @@ private:
static std::atomic _clientPort;
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/DatagramClientContext.cpp b/examples/apps/windows/DatagramClientContext.cpp
index 8fa94f145..eb23b0dbc 100644
--- a/examples/apps/windows/DatagramClientContext.cpp
+++ b/examples/apps/windows/DatagramClientContext.cpp
@@ -30,7 +30,7 @@
#include
#include "DatagramClientContext.h"
-using namespace Thread;
+using namespace ot;
using namespace Concurrency;
using namespace Platform;
@@ -182,13 +182,13 @@ DatagramClientContext::SetConnected(
}
bool
-Thread::DatagramClientContext::IsConnected() const
+ot::DatagramClientContext::IsConnected() const
{
return _connected;
}
void
-Thread::DatagramClientContext::OnMessage(
+ot::DatagramClientContext::OnMessage(
DatagramSocket^ socket,
MessageReceivedEventArgs^ eventArgs)
{
diff --git a/examples/apps/windows/DatagramClientContext.h b/examples/apps/windows/DatagramClientContext.h
index c9b4f6cfb..6591801bc 100644
--- a/examples/apps/windows/DatagramClientContext.h
+++ b/examples/apps/windows/DatagramClientContext.h
@@ -32,7 +32,7 @@
#include "IAsyncThreadNotify.h"
#include "ClientArgs.h"
-namespace Thread
+namespace ot
{
[Windows::Foundation::Metadata::WebHostHidden]
@@ -75,4 +75,4 @@ private:
DataWriter^ _dataWriter;
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/DatagramListenerContext.cpp b/examples/apps/windows/DatagramListenerContext.cpp
index 16e781481..339e8c67a 100644
--- a/examples/apps/windows/DatagramListenerContext.cpp
+++ b/examples/apps/windows/DatagramListenerContext.cpp
@@ -30,7 +30,7 @@
#include
#include "DatagramListenerContext.h"
-using namespace Thread;
+using namespace ot;
using namespace Concurrency;
using namespace Platform;
diff --git a/examples/apps/windows/DatagramListenerContext.h b/examples/apps/windows/DatagramListenerContext.h
index b4bd22a96..ff8699a5e 100644
--- a/examples/apps/windows/DatagramListenerContext.h
+++ b/examples/apps/windows/DatagramListenerContext.h
@@ -33,7 +33,7 @@
#include "IAsyncThreadNotify.h"
#include "ListenerArgs.h"
-namespace Thread
+namespace ot
{
[Windows::Foundation::Metadata::WebHostHidden]
@@ -76,4 +76,4 @@ private:
IOutputStream^ _outputStream;
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/Factory.cpp b/examples/apps/windows/Factory.cpp
index 0d424cef0..b047ab7a3 100644
--- a/examples/apps/windows/Factory.cpp
+++ b/examples/apps/windows/Factory.cpp
@@ -33,7 +33,7 @@
#include "StreamClientContext.h"
#include "DatagramClientContext.h"
-using namespace Thread;
+using namespace ot;
using namespace Concurrency;
using namespace Platform;
diff --git a/examples/apps/windows/Factory.h b/examples/apps/windows/Factory.h
index c0f85d537..6cdeaf851 100644
--- a/examples/apps/windows/Factory.h
+++ b/examples/apps/windows/Factory.h
@@ -35,7 +35,7 @@
#include "IClientContext.h"
#include "Protocol.h"
-namespace Thread
+namespace ot
{
class Factory
@@ -46,4 +46,4 @@ public:
static IClientContext^ CreateClientContext(IAsyncThreadNotify^, ClientArgs^, Protocol);
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/IAsyncThreadNotify.h b/examples/apps/windows/IAsyncThreadNotify.h
index e2645a071..dc3c900a0 100644
--- a/examples/apps/windows/IAsyncThreadNotify.h
+++ b/examples/apps/windows/IAsyncThreadNotify.h
@@ -28,7 +28,7 @@
#pragma once
-namespace Thread
+namespace ot
{
public enum class NotifyType
@@ -42,4 +42,4 @@ public interface struct IAsyncThreadNotify
void NotifyFromAsyncThread(Platform::String^ message, NotifyType type);
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/IClientContext.h b/examples/apps/windows/IClientContext.h
index d987da2b7..f8c948b21 100644
--- a/examples/apps/windows/IClientContext.h
+++ b/examples/apps/windows/IClientContext.h
@@ -28,7 +28,7 @@
#pragma once
-namespace Thread
+namespace ot
{
public interface struct IClientContext
@@ -40,4 +40,4 @@ public interface struct IClientContext
Windows::Foundation::IAsyncAction^ CancelIO();
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/IListenerContext.h b/examples/apps/windows/IListenerContext.h
index 5ea044947..b5cb89a92 100644
--- a/examples/apps/windows/IListenerContext.h
+++ b/examples/apps/windows/IListenerContext.h
@@ -28,7 +28,7 @@
#pragma once
-namespace Thread
+namespace ot
{
public interface struct IListenerContext
@@ -38,4 +38,4 @@ public interface struct IListenerContext
Windows::Foundation::IAsyncAction^ CancelIO();
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/IMainPageUIElements.h b/examples/apps/windows/IMainPageUIElements.h
index 4c3df16c1..c7cd46f2e 100644
--- a/examples/apps/windows/IMainPageUIElements.h
+++ b/examples/apps/windows/IMainPageUIElements.h
@@ -28,7 +28,7 @@
#pragma once
-namespace Thread
+namespace ot
{
public interface struct IMainPageUIElements
@@ -44,4 +44,4 @@ public interface struct IMainPageUIElements
}
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/ListenerArgs.h b/examples/apps/windows/ListenerArgs.h
index 9ffa21d9d..510c01612 100644
--- a/examples/apps/windows/ListenerArgs.h
+++ b/examples/apps/windows/ListenerArgs.h
@@ -28,7 +28,7 @@
#pragma once
-namespace Thread
+namespace ot
{
public ref class ListenerArgs sealed
@@ -39,4 +39,4 @@ public:
property Platform::String^ ServerPort;
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/MainPage.xaml b/examples/apps/windows/MainPage.xaml
index 7be179d18..03b1e9bee 100644
--- a/examples/apps/windows/MainPage.xaml
+++ b/examples/apps/windows/MainPage.xaml
@@ -26,10 +26,10 @@
POSSIBILITY OF SUCH DAMAGE.
-->
/// An empty page that can be used on its own or navigated to within a Frame.
diff --git a/examples/apps/windows/Package.appxmanifest b/examples/apps/windows/Package.appxmanifest
index e7989ab82..f336f667c 100644
--- a/examples/apps/windows/Package.appxmanifest
+++ b/examples/apps/windows/Package.appxmanifest
@@ -14,7 +14,7 @@
-
+
diff --git a/examples/apps/windows/Protocol.h b/examples/apps/windows/Protocol.h
index afcde2250..c325e4b6a 100644
--- a/examples/apps/windows/Protocol.h
+++ b/examples/apps/windows/Protocol.h
@@ -28,7 +28,7 @@
#pragma once
-namespace Thread
+namespace ot
{
public enum class Protocol
@@ -37,4 +37,4 @@ public enum class Protocol
UDP,
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/ServerControl.xaml b/examples/apps/windows/ServerControl.xaml
index 5c866fc52..5408b2eb9 100644
--- a/examples/apps/windows/ServerControl.xaml
+++ b/examples/apps/windows/ServerControl.xaml
@@ -26,10 +26,10 @@
POSSIBILITY OF SUCH DAMAGE.
-->
diff --git a/examples/apps/windows/ServerControl.xaml.cpp b/examples/apps/windows/ServerControl.xaml.cpp
index d931109a1..37545bd85 100644
--- a/examples/apps/windows/ServerControl.xaml.cpp
+++ b/examples/apps/windows/ServerControl.xaml.cpp
@@ -33,7 +33,7 @@
#include "Factory.h"
#include "TalkHelper.h"
-using namespace Thread;
+using namespace ot;
using namespace Platform;
using namespace Windows::Foundation;
diff --git a/examples/apps/windows/ServerControl.xaml.h b/examples/apps/windows/ServerControl.xaml.h
index 79458a422..6284f4aac 100644
--- a/examples/apps/windows/ServerControl.xaml.h
+++ b/examples/apps/windows/ServerControl.xaml.h
@@ -34,7 +34,7 @@
#include "IMainPageUIElements.h"
#include "Protocol.h"
-namespace Thread
+namespace ot
{
[Windows::Foundation::Metadata::WebHostHidden]
@@ -59,4 +59,4 @@ private:
Protocol _protocol;
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/StreamClientContext.cpp b/examples/apps/windows/StreamClientContext.cpp
index ccce0fa4c..f209e9ccf 100644
--- a/examples/apps/windows/StreamClientContext.cpp
+++ b/examples/apps/windows/StreamClientContext.cpp
@@ -30,7 +30,7 @@
#include
#include "StreamClientContext.h"
-using namespace Thread;
+using namespace ot;
using namespace Concurrency;
using namespace Platform;
@@ -157,7 +157,7 @@ StreamClientContext::Connect_Click(
}
void
-Thread::StreamClientContext::Send_Click(
+ot::StreamClientContext::Send_Click(
Platform::Object^ sender,
Windows::UI::Xaml::RoutedEventArgs^ e,
Platform::String^ input)
@@ -166,7 +166,7 @@ Thread::StreamClientContext::Send_Click(
}
IAsyncAction^
-Thread::StreamClientContext::CancelIO()
+ot::StreamClientContext::CancelIO()
{
return _client->CancelIOAsync();
}
diff --git a/examples/apps/windows/StreamClientContext.h b/examples/apps/windows/StreamClientContext.h
index 892baad74..111182300 100644
--- a/examples/apps/windows/StreamClientContext.h
+++ b/examples/apps/windows/StreamClientContext.h
@@ -32,7 +32,7 @@
#include "IAsyncThreadNotify.h"
#include "ClientArgs.h"
-namespace Thread
+namespace ot
{
[Windows::Foundation::Metadata::WebHostHidden]
@@ -76,4 +76,4 @@ private:
DataWriter^ _dataWriter;
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/StreamListenerContext.cpp b/examples/apps/windows/StreamListenerContext.cpp
index 7bb04b85d..78520294a 100644
--- a/examples/apps/windows/StreamListenerContext.cpp
+++ b/examples/apps/windows/StreamListenerContext.cpp
@@ -30,7 +30,7 @@
#include
#include "StreamListenerContext.h"
-using namespace Thread;
+using namespace ot;
using namespace Concurrency;
using namespace Platform;
diff --git a/examples/apps/windows/StreamListenerContext.h b/examples/apps/windows/StreamListenerContext.h
index 3fd1a51c6..ab9affdc5 100644
--- a/examples/apps/windows/StreamListenerContext.h
+++ b/examples/apps/windows/StreamListenerContext.h
@@ -32,7 +32,7 @@
#include "IAsyncThreadNotify.h"
#include "ListenerArgs.h"
-namespace Thread
+namespace ot
{
[Windows::Foundation::Metadata::WebHostHidden]
@@ -68,4 +68,4 @@ private:
Args^ _args;
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/TalkConsts.h b/examples/apps/windows/TalkConsts.h
index 6b9b29ebe..100faf55d 100644
--- a/examples/apps/windows/TalkConsts.h
+++ b/examples/apps/windows/TalkConsts.h
@@ -28,7 +28,7 @@
#pragma once
-namespace Thread
+namespace ot
{
struct TalkConsts
@@ -37,4 +37,4 @@ struct TalkConsts
static constexpr unsigned short DEF_CLIENT_PORT_INIT = 51100;
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/TalkGrid.xaml b/examples/apps/windows/TalkGrid.xaml
index a391f3366..5d8aa2ed9 100644
--- a/examples/apps/windows/TalkGrid.xaml
+++ b/examples/apps/windows/TalkGrid.xaml
@@ -26,10 +26,10 @@
POSSIBILITY OF SUCH DAMAGE.
-->
diff --git a/examples/apps/windows/TalkGrid.xaml.cpp b/examples/apps/windows/TalkGrid.xaml.cpp
index efc7c8ea8..632c26daf 100644
--- a/examples/apps/windows/TalkGrid.xaml.cpp
+++ b/examples/apps/windows/TalkGrid.xaml.cpp
@@ -31,7 +31,7 @@
#include "ClientControl.xaml.h"
#include "ServerControl.xaml.h"
-using namespace Thread;
+using namespace ot;
using namespace Platform;
using namespace Windows::Foundation;
diff --git a/examples/apps/windows/TalkGrid.xaml.h b/examples/apps/windows/TalkGrid.xaml.h
index 72ea34e48..e387095d1 100644
--- a/examples/apps/windows/TalkGrid.xaml.h
+++ b/examples/apps/windows/TalkGrid.xaml.h
@@ -33,7 +33,7 @@
#include "IMainPageUIElements.h"
#include "Protocol.h"
-namespace Thread
+namespace ot
{
[Windows::Foundation::Metadata::WebHostHidden]
@@ -58,4 +58,4 @@ private:
void Role_Changed(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/TalkHelper.h b/examples/apps/windows/TalkHelper.h
index 96da077e8..d6fb84910 100644
--- a/examples/apps/windows/TalkHelper.h
+++ b/examples/apps/windows/TalkHelper.h
@@ -28,7 +28,7 @@
#pragma once
-namespace Thread
+namespace ot
{
ref class ClientControl;
ref class ServerControl;
@@ -60,4 +60,4 @@ private:
}
};
-}
\ No newline at end of file
+}
diff --git a/examples/apps/windows/otAdapter.h b/examples/apps/windows/otAdapter.h
index 17b0a89c3..66cc56706 100644
--- a/examples/apps/windows/otAdapter.h
+++ b/examples/apps/windows/otAdapter.h
@@ -42,7 +42,7 @@ using namespace Platform::Metadata;
using namespace Windows::Foundation::Collections;
using namespace Windows::Networking;
-namespace Thread
+namespace ot
{
ref class otAdapter;
@@ -609,5 +609,5 @@ private:
}
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/apps/windows/otApi.h b/examples/apps/windows/otApi.h
index 703a05442..3a0a001c8 100644
--- a/examples/apps/windows/otApi.h
+++ b/examples/apps/windows/otApi.h
@@ -38,7 +38,7 @@ using namespace Windows::Foundation::Collections;
#define MAC8_FORMAT L"%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X"
#define MAC8_ARG(mac) mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], mac[6], mac[7]
-namespace Thread
+namespace ot
{
public delegate void otAdapterArrivalDelegate(otAdapter^ aAdapter);
@@ -249,4 +249,4 @@ private:
}
};
-} // namespace Thread
+} // namespace ot
diff --git a/examples/drivers/windows/otLwf/filter.h b/examples/drivers/windows/otLwf/filter.h
index c62d8415a..3734b3bbd 100644
--- a/examples/drivers/windows/otLwf/filter.h
+++ b/examples/drivers/windows/otLwf/filter.h
@@ -127,7 +127,7 @@ enum
kMaxPagesForBufferPools = 64,
kMaxBytesForBufferPools = kPageSize * kMaxPagesForBufferPools,
- kEstimatedBufferSize = 128, // sizeof(Thread::Buffer)
+ kEstimatedBufferSize = 128, // sizeof(ot::Buffer)
kEstimatedBufferPoolSize = ((kPageSize * kPagesPerBufferPool) - sizeof(BufferPool)) / kEstimatedBufferSize,
kEstimatedMaxBuffers = kMaxPagesForBufferPools * kEstimatedBufferPoolSize
};
diff --git a/examples/drivers/windows/ottmp/adapter.hpp b/examples/drivers/windows/ottmp/adapter.hpp
index 100a4b42d..fc51171aa 100644
--- a/examples/drivers/windows/ottmp/adapter.hpp
+++ b/examples/drivers/windows/ottmp/adapter.hpp
@@ -221,4 +221,4 @@ AdapterIndicateEnergyScanComplete(
_In_ NDIS_STATUS Status
);
-EXT_CALLBACK AdapterEnergyScanTimerCallback;
\ No newline at end of file
+EXT_CALLBACK AdapterEnergyScanTimerCallback;
diff --git a/include/openthread/platform/logging-windows.h b/include/openthread/platform/logging-windows.h
index 9d0b45d41..1ea015628 100644
--- a/include/openthread/platform/logging-windows.h
+++ b/include/openthread/platform/logging-windows.h
@@ -468,4 +468,4 @@
// USESUFFIX(otLogFuncExitErr, " %!otError!", EXP);
// end_wpp
-#endif // _LOGGING_WINDOWS_H
\ No newline at end of file
+#endif // _LOGGING_WINDOWS_H
diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp
index 8b456da28..6a18649e0 100644
--- a/src/cli/cli.cpp
+++ b/src/cli/cli.cpp
@@ -75,10 +75,10 @@
#include "cli_coap.hpp"
#endif
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
namespace Cli {
@@ -3065,4 +3065,4 @@ void Interpreter::HandleDiagnosticGetResponse(Message &aMessage, const Ip6::Mess
#endif
} // namespace Cli
-} // namespace Thread
+} // namespace ot
diff --git a/src/cli/cli.hpp b/src/cli/cli.hpp
index 10ceabb2a..e523212fa 100644
--- a/src/cli/cli.hpp
+++ b/src/cli/cli.hpp
@@ -64,10 +64,10 @@
#define MAX_CLI_OT_INSTANCES 64
#endif
-namespace Thread {
+namespace ot {
/**
- * @namespace Thread::Cli
+ * @namespace ot::Cli
*
* @brief
* This namespace contains definitions for the CLI interpreter.
@@ -346,6 +346,6 @@ private:
};
} // namespace Cli
-} // namespace Thread
+} // namespace ot
#endif // CLI_HPP_
diff --git a/src/cli/cli_coap.cpp b/src/cli/cli_coap.cpp
index a536a3ec7..219439161 100644
--- a/src/cli/cli_coap.cpp
+++ b/src/cli/cli_coap.cpp
@@ -45,7 +45,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Cli {
const CoapCommand Coap::sCommands[] =
@@ -335,7 +335,7 @@ ThreadError Coap::ProcessClient(int argc, char *argv[])
}
otCoapHeaderInit(&header, coapType, coapCode);
- otCoapHeaderGenerateToken(&header, Thread::Coap::Header::kDefaultTokenLength);
+ otCoapHeaderGenerateToken(&header, ot::Coap::Header::kDefaultTokenLength);
SuccessOrExit(error = otCoapHeaderAppendUriPathOptions(&header, coapUri));
if (argc > 4)
@@ -408,6 +408,6 @@ void Coap::HandleClientResponse(otCoapHeader *aHeader, otMessage *aMessage, otMe
}
} // namespace Cli
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_APPLICATION_COAP
diff --git a/src/cli/cli_coap.hpp b/src/cli/cli_coap.hpp
index c80eb2158..437c99126 100644
--- a/src/cli/cli_coap.hpp
+++ b/src/cli/cli_coap.hpp
@@ -34,7 +34,7 @@
#ifndef CLI_COAP_HPP_
#define CLI_COAP_HPP_
-namespace Thread {
+namespace ot {
namespace Cli {
/**
@@ -94,6 +94,6 @@ private:
};
} // namespace Cli
-} // namespace Thread
+} // namespace ot
#endif // CLI_COAP_HPP_
diff --git a/src/cli/cli_console.cpp b/src/cli/cli_console.cpp
index 5a2785359..f25b873dc 100644
--- a/src/cli/cli_console.cpp
+++ b/src/cli/cli_console.cpp
@@ -46,7 +46,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Cli {
static Console *sServer;
@@ -106,4 +106,4 @@ int Console::OutputFormat(const char *fmt, ...)
}
} // namespace Cli
-} // namespace Thread
+} // namespace ot
diff --git a/src/cli/cli_console.hpp b/src/cli/cli_console.hpp
index af435a4bb..c7ba728d6 100644
--- a/src/cli/cli_console.hpp
+++ b/src/cli/cli_console.hpp
@@ -38,7 +38,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Cli {
/**
@@ -110,6 +110,6 @@ private:
};
} // namespace Cli
-} // namespace Thread
+} // namespace ot
#endif // CLI_CONSOLE_HPP_
diff --git a/src/cli/cli_dataset.cpp b/src/cli/cli_dataset.cpp
index 44920156b..4eccd5ce6 100644
--- a/src/cli/cli_dataset.cpp
+++ b/src/cli/cli_dataset.cpp
@@ -50,7 +50,7 @@
#include "cli.hpp"
#include "cli_dataset.hpp"
-namespace Thread {
+namespace ot {
namespace Cli {
const DatasetCommand Dataset::sCommands[] =
@@ -741,4 +741,4 @@ exit:
#endif // OPENTHREAD_FTD
} // namespace Cli
-} // namespace Thread
+} // namespace ot
diff --git a/src/cli/cli_dataset.hpp b/src/cli/cli_dataset.hpp
index a7796b702..c519545c5 100644
--- a/src/cli/cli_dataset.hpp
+++ b/src/cli/cli_dataset.hpp
@@ -38,7 +38,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Cli {
/**
@@ -98,6 +98,6 @@ private:
};
} // namespace Cli
-} // namespace Thread
+} // namespace ot
#endif // CLI_DATASET_HPP_
diff --git a/src/cli/cli_instance.cpp b/src/cli/cli_instance.cpp
index 1fb1269d5..8b3adf8b4 100644
--- a/src/cli/cli_instance.cpp
+++ b/src/cli/cli_instance.cpp
@@ -45,7 +45,7 @@
#include "openthread/openthread.h"
#include "cli.hpp"
-namespace Thread {
+namespace ot {
namespace Cli {
@@ -123,4 +123,4 @@ exit:
}
} // namespace Cli
-} // namespace Thread
+} // namespace ot
diff --git a/src/cli/cli_server.hpp b/src/cli/cli_server.hpp
index e1ab3c2a6..49b91dd9f 100644
--- a/src/cli/cli_server.hpp
+++ b/src/cli/cli_server.hpp
@@ -36,7 +36,7 @@
#include "openthread/types.h"
-namespace Thread {
+namespace ot {
namespace Cli {
/**
@@ -70,6 +70,6 @@ public:
};
} // namespace Cli
-} // namespace Thread
+} // namespace ot
#endif // CLI_SERVER_HPP_
diff --git a/src/cli/cli_uart.cpp b/src/cli/cli_uart.cpp
index 0a7813af9..906fb4f6d 100644
--- a/src/cli/cli_uart.cpp
+++ b/src/cli/cli_uart.cpp
@@ -53,7 +53,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Cli {
static const char sCommandPrompt[] = {'>', ' '};
@@ -263,4 +263,4 @@ void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat
#endif // OPENTHREAD_ENABLE_DEFAULT_LOGGING
} // namespace Cli
-} // namespace Thread
+} // namespace ot
diff --git a/src/cli/cli_uart.hpp b/src/cli/cli_uart.hpp
index 1c0fb3ed3..f24af516c 100644
--- a/src/cli/cli_uart.hpp
+++ b/src/cli/cli_uart.hpp
@@ -39,7 +39,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Cli {
/**
@@ -121,6 +121,6 @@ private:
};
} // namespace Cli
-} // namespace Thread
+} // namespace ot
#endif // CLI_UART_HPP_
diff --git a/src/cli/cli_udp.cpp b/src/cli/cli_udp.cpp
index a591898af..7666a3944 100644
--- a/src/cli/cli_udp.cpp
+++ b/src/cli/cli_udp.cpp
@@ -45,7 +45,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Cli {
Udp::Udp(otInstance *aInstance, Interpreter *aInterpreter):
@@ -136,4 +136,4 @@ int Udp::OutputFormat(const char *fmt, ...)
}
} // namespace Cli
-} // namespace Thread
+} // namespace ot
diff --git a/src/cli/cli_udp.hpp b/src/cli/cli_udp.hpp
index 0c8d6be38..3cfd48f60 100644
--- a/src/cli/cli_udp.hpp
+++ b/src/cli/cli_udp.hpp
@@ -38,7 +38,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Cli {
/**
@@ -103,6 +103,6 @@ private:
};
} // namespace Cli
-} // namespace Thread
+} // namespace ot
#endif // CLI_UDP_HPP_
diff --git a/src/core/api/border_agent_proxy_api.cpp b/src/core/api/border_agent_proxy_api.cpp
index 055448e8f..a7a0318e1 100644
--- a/src/core/api/border_agent_proxy_api.cpp
+++ b/src/core/api/border_agent_proxy_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
#if OPENTHREAD_FTD && OPENTHREAD_ENABLE_BORDER_AGENT_PROXY
diff --git a/src/core/api/coap_api.cpp b/src/core/api/coap_api.cpp
index 998c8cdba..3b75c1d1d 100644
--- a/src/core/api/coap_api.cpp
+++ b/src/core/api/coap_api.cpp
@@ -38,7 +38,7 @@
#if OPENTHREAD_ENABLE_APPLICATION_COAP
-using namespace Thread;
+using namespace ot;
void otCoapHeaderInit(otCoapHeader *aHeader, otCoapType aType, otCoapCode aCode)
{
diff --git a/src/core/api/commissioner_api.cpp b/src/core/api/commissioner_api.cpp
index 8bbe7c32d..25c145ba5 100644
--- a/src/core/api/commissioner_api.cpp
+++ b/src/core/api/commissioner_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
#if OPENTHREAD_FTD && OPENTHREAD_ENABLE_COMMISSIONER
diff --git a/src/core/api/crypto_api.cpp b/src/core/api/crypto_api.cpp
index ca1edc45b..f342eafad 100644
--- a/src/core/api/crypto_api.cpp
+++ b/src/core/api/crypto_api.cpp
@@ -38,7 +38,7 @@
#include "crypto/hmac_sha256.hpp"
#include "crypto/aes_ccm.hpp"
-using namespace Thread::Crypto;
+using namespace ot::Crypto;
void otCryptoHmacSha256(
const uint8_t *aKey, uint16_t aKeyLength,
diff --git a/src/core/api/dataset_api.cpp b/src/core/api/dataset_api.cpp
index 70505e7bd..837c7d2be 100644
--- a/src/core/api/dataset_api.cpp
+++ b/src/core/api/dataset_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
bool otDatasetIsCommissioned(otInstance *aInstance)
{
diff --git a/src/core/api/dataset_ftd_api.cpp b/src/core/api/dataset_ftd_api.cpp
index 74701a401..9846f1743 100644
--- a/src/core/api/dataset_ftd_api.cpp
+++ b/src/core/api/dataset_ftd_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
#if OPENTHREAD_FTD
diff --git a/src/core/api/dhcp6_api.cpp b/src/core/api/dhcp6_api.cpp
index ef5a1b14c..832a57822 100644
--- a/src/core/api/dhcp6_api.cpp
+++ b/src/core/api/dhcp6_api.cpp
@@ -36,7 +36,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
#if OPENTHREAD_ENABLE_DHCP6_CLIENT
void otDhcp6ClientUpdate(otInstance *aInstance, otDhcpAddress *aAddresses, uint32_t aNumAddresses, void *aContext)
diff --git a/src/core/api/dns_api.cpp b/src/core/api/dns_api.cpp
index 89f6d05eb..31342d75f 100644
--- a/src/core/api/dns_api.cpp
+++ b/src/core/api/dns_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
#if OPENTHREAD_ENABLE_DNS_CLIENT
ThreadError otDnsClientQuery(otInstance *aInstance, const otDnsQuery *aQuery, otDnsResponseHandler aHandler,
diff --git a/src/core/api/icmp6_api.cpp b/src/core/api/icmp6_api.cpp
index d0c30c581..1d2325e90 100644
--- a/src/core/api/icmp6_api.cpp
+++ b/src/core/api/icmp6_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
bool otIcmp6IsEchoEnabled(otInstance *aInstance)
{
diff --git a/src/core/api/instance_api.cpp b/src/core/api/instance_api.cpp
index fbbd8215e..c2b2b77ad 100644
--- a/src/core/api/instance_api.cpp
+++ b/src/core/api/instance_api.cpp
@@ -73,7 +73,7 @@ otInstance::otInstance(void) :
{
}
-using namespace Thread;
+using namespace ot;
void otInstancePostConstructor(otInstance *aInstance)
{
diff --git a/src/core/api/ip6_api.cpp b/src/core/api/ip6_api.cpp
index 73aaa2644..b1027587e 100644
--- a/src/core/api/ip6_api.cpp
+++ b/src/core/api/ip6_api.cpp
@@ -39,7 +39,7 @@
#include "common/logging.hpp"
#include "utils/slaac_address.hpp"
-using namespace Thread;
+using namespace ot;
ThreadError otIp6SetEnabled(otInstance *aInstance, bool aEnabled)
{
diff --git a/src/core/api/jam_detection_api.cpp b/src/core/api/jam_detection_api.cpp
index ac5338192..b60d4c3a2 100644
--- a/src/core/api/jam_detection_api.cpp
+++ b/src/core/api/jam_detection_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
#if OPENTHREAD_ENABLE_JAM_DETECTION
diff --git a/src/core/api/joiner_api.cpp b/src/core/api/joiner_api.cpp
index 8f6493965..869f5d2a7 100644
--- a/src/core/api/joiner_api.cpp
+++ b/src/core/api/joiner_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
#if OPENTHREAD_ENABLE_JOINER
diff --git a/src/core/api/link_api.cpp b/src/core/api/link_api.cpp
index 2ff300a2a..ced4993e7 100644
--- a/src/core/api/link_api.cpp
+++ b/src/core/api/link_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
static void HandleActiveScanResult(void *aContext, Mac::Frame *aFrame);
static void HandleEnergyScanResult(void *aContext, otEnergyScanResult *aResult);
diff --git a/src/core/api/link_raw.hpp b/src/core/api/link_raw.hpp
index 7f3eea618..8b11dd1a7 100644
--- a/src/core/api/link_raw.hpp
+++ b/src/core/api/link_raw.hpp
@@ -43,7 +43,7 @@
#define OPENTHREAD_LINKRAW_TIMER_REQUIRED 0
#endif
-namespace Thread {
+namespace ot {
class LinkRaw
{
@@ -162,6 +162,6 @@ private:
#endif // OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN
};
-} // namespace Thread
+} // namespace ot
#endif // LINK_RAW_HPP_
diff --git a/src/core/api/link_raw_api.cpp b/src/core/api/link_raw_api.cpp
index f76d6281f..d53bea741 100644
--- a/src/core/api/link_raw_api.cpp
+++ b/src/core/api/link_raw_api.cpp
@@ -257,7 +257,7 @@ exit:
return error;
}
-namespace Thread {
+namespace ot {
LinkRaw::LinkRaw(otInstance &aInstance):
mInstance(aInstance),
@@ -605,6 +605,6 @@ void LinkRaw::HandleEnergyScanTask(void)
#endif // OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ENERGY_SCAN
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_RAW_LINK_API
diff --git a/src/core/api/message_api.cpp b/src/core/api/message_api.cpp
index d998a2a82..bfab732bb 100644
--- a/src/core/api/message_api.cpp
+++ b/src/core/api/message_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
ThreadError otMessageFree(otMessage *aMessage)
{
diff --git a/src/core/api/netdata_api.cpp b/src/core/api/netdata_api.cpp
index 38d19a921..cbc4aadfb 100644
--- a/src/core/api/netdata_api.cpp
+++ b/src/core/api/netdata_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
ThreadError otNetDataGetLeader(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength)
{
diff --git a/src/core/api/tasklet_api.cpp b/src/core/api/tasklet_api.cpp
index 3105c6b0d..b4cc56fb7 100644
--- a/src/core/api/tasklet_api.cpp
+++ b/src/core/api/tasklet_api.cpp
@@ -38,7 +38,7 @@
#include "openthread-instance.h"
#include "common/logging.hpp"
-using namespace Thread;
+using namespace ot;
void otTaskletsProcess(otInstance *aInstance)
{
diff --git a/src/core/api/thread_api.cpp b/src/core/api/thread_api.cpp
index 0910c6a21..5baaa2fcc 100644
--- a/src/core/api/thread_api.cpp
+++ b/src/core/api/thread_api.cpp
@@ -40,7 +40,7 @@
#include "common/settings.hpp"
#include "openthread/platform/settings.h"
-using namespace Thread;
+using namespace ot;
uint8_t otThreadGetMaxAllowedChildren(otInstance *aInstance)
{
diff --git a/src/core/api/thread_ftd_api.cpp b/src/core/api/thread_ftd_api.cpp
index 1718688c1..7a29e57af 100644
--- a/src/core/api/thread_ftd_api.cpp
+++ b/src/core/api/thread_ftd_api.cpp
@@ -37,7 +37,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
#if OPENTHREAD_FTD
diff --git a/src/core/api/udp_api.cpp b/src/core/api/udp_api.cpp
index 6dad06439..6548a64a9 100644
--- a/src/core/api/udp_api.cpp
+++ b/src/core/api/udp_api.cpp
@@ -35,7 +35,7 @@
#include "openthread-instance.h"
-using namespace Thread;
+using namespace ot;
otMessage *otUdpNewMessage(otInstance *aInstance, bool aLinkSecurityEnabled)
{
diff --git a/src/core/coap/coap_base.cpp b/src/core/coap/coap_base.cpp
index 8c67951eb..51c0a0a92 100644
--- a/src/core/coap/coap_base.cpp
+++ b/src/core/coap/coap_base.cpp
@@ -40,7 +40,7 @@
* This file contains common code base for CoAP client and server.
*/
-namespace Thread {
+namespace ot {
namespace Coap {
Message *CoapBase::NewMessage(const Header &aHeader, uint8_t aPriority)
@@ -108,4 +108,4 @@ exit:
}
} // namespace Coap
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/coap/coap_base.hpp b/src/core/coap/coap_base.hpp
index bc7940073..0422061da 100644
--- a/src/core/coap/coap_base.hpp
+++ b/src/core/coap/coap_base.hpp
@@ -41,7 +41,7 @@
* This file contains common code base for CoAP client and server.
*/
-namespace Thread {
+namespace ot {
namespace Coap {
/**
@@ -200,6 +200,6 @@ private:
};
} // namespace Coap
-} // namespace Thread
+} // namespace ot
#endif // COAP_BASE_HPP_
diff --git a/src/core/coap/coap_client.cpp b/src/core/coap/coap_client.cpp
index 77fd49d34..51f5b5299 100644
--- a/src/core/coap/coap_client.cpp
+++ b/src/core/coap/coap_client.cpp
@@ -47,7 +47,7 @@
* This file implements the CoAP client.
*/
-namespace Thread {
+namespace ot {
namespace Coap {
Client::Client(Ip6::Netif &aNetif, SenderFunction aSender, ReceiverFunction aReceiver):
@@ -471,4 +471,4 @@ RequestMetadata::RequestMetadata(bool aConfirmable, const Ip6::MessageInfo &aMes
}
} // namespace Coap
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/coap/coap_client.hpp b/src/core/coap/coap_client.hpp
index eff9ee242..0e1d1f67d 100644
--- a/src/core/coap/coap_client.hpp
+++ b/src/core/coap/coap_client.hpp
@@ -43,7 +43,7 @@
* This file includes definitions for the CoAP client.
*/
-namespace Thread {
+namespace ot {
namespace Coap {
class Client;
@@ -258,6 +258,6 @@ private:
};
} // namespace Coap
-} // namespace Thread
+} // namespace ot
#endif // COAP_CLIENT_HPP_
diff --git a/src/core/coap/coap_header.cpp b/src/core/coap/coap_header.cpp
index 9f5fb678b..a0d7bff93 100644
--- a/src/core/coap/coap_header.cpp
+++ b/src/core/coap/coap_header.cpp
@@ -45,7 +45,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Coap {
void Header::Init(void)
@@ -463,4 +463,4 @@ void Header::SetDefaultResponseHeader(const Header &aRequestHeader)
}
} // namespace Coap
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/coap/coap_header.hpp b/src/core/coap/coap_header.hpp
index dfab1ad32..e1e5a6077 100644
--- a/src/core/coap/coap_header.hpp
+++ b/src/core/coap/coap_header.hpp
@@ -41,12 +41,12 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
/**
- * @namespace Thread::Coap
+ * @namespace ot::Coap
* @brief
* This namespace includes definitions for CoAP.
*
@@ -484,6 +484,6 @@ private:
*/
} // namespace Coap
-} // namespace Thread
+} // namespace ot
#endif // COAP_HEADER_HPP_
diff --git a/src/core/coap/coap_server.cpp b/src/core/coap/coap_server.cpp
index 5dc6f4146..b8edbd4ef 100644
--- a/src/core/coap/coap_server.cpp
+++ b/src/core/coap/coap_server.cpp
@@ -41,7 +41,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Coap {
Server::Server(Ip6::Netif &aNetif, uint16_t aPort, SenderFunction aSender, ReceiverFunction aReceiver):
@@ -382,4 +382,4 @@ uint32_t EnqueuedResponseHeader::GetRemainingTime(void) const
} // namespace Coap
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/coap/coap_server.hpp b/src/core/coap/coap_server.hpp
index 40501ee2c..bac0d5055 100644
--- a/src/core/coap/coap_server.hpp
+++ b/src/core/coap/coap_server.hpp
@@ -44,7 +44,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Coap {
/**
@@ -396,6 +396,6 @@ private:
*/
} // namespace Coap
-} // namespace Thread
+} // namespace ot
#endif // COAP_SERVER_HPP_
diff --git a/src/core/coap/secure_coap_client.cpp b/src/core/coap/secure_coap_client.cpp
index d876072b3..bc0b4a25a 100644
--- a/src/core/coap/secure_coap_client.cpp
+++ b/src/core/coap/secure_coap_client.cpp
@@ -46,7 +46,7 @@
* This file implements the secure CoAP client.
*/
-namespace Thread {
+namespace ot {
namespace Coap {
SecureClient::SecureClient(ThreadNetif &aNetif):
@@ -250,6 +250,6 @@ exit:
}
} // namespace Coap
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_JOINER
diff --git a/src/core/coap/secure_coap_client.hpp b/src/core/coap/secure_coap_client.hpp
index 4c75729c5..8960bae93 100644
--- a/src/core/coap/secure_coap_client.hpp
+++ b/src/core/coap/secure_coap_client.hpp
@@ -37,7 +37,7 @@
* This file includes definitions for the secure CoAP client.
*/
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -162,6 +162,6 @@ private:
};
} // namespace Coap
-} // namespace Thread
+} // namespace ot
#endif // SECURE_COAP_CLIENT_HPP_
diff --git a/src/core/coap/secure_coap_server.cpp b/src/core/coap/secure_coap_server.cpp
index 34f724d96..9242e961c 100644
--- a/src/core/coap/secure_coap_server.cpp
+++ b/src/core/coap/secure_coap_server.cpp
@@ -46,7 +46,7 @@
* This file implements the secure CoAP server.
*/
-namespace Thread {
+namespace ot {
namespace Coap {
SecureServer::SecureServer(ThreadNetif &aNetif, uint16_t aPort):
@@ -271,6 +271,6 @@ exit:
}
} // namespace Coap
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_COMMISSIONER && OPENTHREAD_FTD
diff --git a/src/core/coap/secure_coap_server.hpp b/src/core/coap/secure_coap_server.hpp
index ab20db50f..4498e08aa 100644
--- a/src/core/coap/secure_coap_server.hpp
+++ b/src/core/coap/secure_coap_server.hpp
@@ -36,7 +36,7 @@
* This file includes definitions for the secure CoAP server.
*/
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -141,6 +141,6 @@ private:
};
} // namespace Coap
-} // namespace Thread
+} // namespace ot
#endif // SECURE_COAP_SERVER_HPP_
diff --git a/src/core/common/crc16.cpp b/src/core/common/crc16.cpp
index 158e76a3c..61cdaacc8 100644
--- a/src/core/common/crc16.cpp
+++ b/src/core/common/crc16.cpp
@@ -39,7 +39,7 @@
#include
-namespace Thread {
+namespace ot {
Crc16::Crc16(Polynomial aPolynomial)
{
@@ -68,4 +68,4 @@ void Crc16::Update(uint8_t aByte)
while (--i);
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/common/crc16.hpp b/src/core/common/crc16.hpp
index 21822258c..6333b6025 100644
--- a/src/core/common/crc16.hpp
+++ b/src/core/common/crc16.hpp
@@ -36,7 +36,7 @@
#include "utils/wrap_stdint.h"
-namespace Thread {
+namespace ot {
/**
* This class implements CRC16 computations.
@@ -86,6 +86,6 @@ private:
uint16_t mCrc;
};
-} // namespace Thread
+} // namespace ot
#endif // CRC16_HPP_
diff --git a/src/core/common/encoding.hpp b/src/core/common/encoding.hpp
index 6ff1469cd..1a55e8673 100644
--- a/src/core/common/encoding.hpp
+++ b/src/core/common/encoding.hpp
@@ -37,7 +37,7 @@
#include
#include "utils/wrap_stdint.h"
-namespace Thread {
+namespace ot {
namespace Encoding {
inline uint16_t Swap16(uint16_t v)
@@ -119,6 +119,6 @@ inline uint64_t HostSwap64(uint64_t v) { return v; }
} // namespace LittleEndian
} // namespace Encoding
-} // namespace Thread
+} // namespace ot
#endif // ENCODING_HPP_
diff --git a/src/core/common/message.cpp b/src/core/common/message.cpp
index 067f4e36d..1d6c35855 100644
--- a/src/core/common/message.cpp
+++ b/src/core/common/message.cpp
@@ -45,7 +45,7 @@
#include
#include
-namespace Thread {
+namespace ot {
MessagePool::MessagePool(otInstance *aInstance) :
mInstance(aInstance),
@@ -1055,4 +1055,4 @@ void PriorityQueue::GetInfo(uint16_t &aMessageCount, uint16_t &aBufferCount) con
}
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/common/message.hpp b/src/core/common/message.hpp
index 93ed3a954..7d4d3a347 100644
--- a/src/core/common/message.hpp
+++ b/src/core/common/message.hpp
@@ -50,7 +50,7 @@
#include
#include
-namespace Thread {
+namespace ot {
/**
* @addtogroup core-message
@@ -1140,6 +1140,6 @@ private:
*
*/
-} // namespace Thread
+} // namespace ot
#endif // MESSAGE_HPP_
diff --git a/src/core/common/tasklet.cpp b/src/core/common/tasklet.cpp
index 13934e1bf..07042f966 100644
--- a/src/core/common/tasklet.cpp
+++ b/src/core/common/tasklet.cpp
@@ -44,7 +44,7 @@
#include
#include
-namespace Thread {
+namespace ot {
Tasklet::Tasklet(TaskletScheduler &aScheduler, Handler aHandler, void *aContext):
mScheduler(aScheduler),
@@ -133,4 +133,4 @@ Ip6::Ip6 *TaskletScheduler::GetIp6(void)
return Ip6::Ip6FromTaskletScheduler(this);
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/common/tasklet.hpp b/src/core/common/tasklet.hpp
index 79fb03b39..b6a9669cf 100644
--- a/src/core/common/tasklet.hpp
+++ b/src/core/common/tasklet.hpp
@@ -36,7 +36,7 @@
#include "openthread/tasklet.h"
-namespace Thread {
+namespace ot {
namespace Ip6 { class Ip6; }
@@ -151,6 +151,6 @@ private:
*
*/
-} // namespace Thread
+} // namespace ot
#endif // TASKLET_HPP_
diff --git a/src/core/common/timer.cpp b/src/core/common/timer.cpp
index eeacc67ce..1b31cc778 100644
--- a/src/core/common/timer.cpp
+++ b/src/core/common/timer.cpp
@@ -48,7 +48,7 @@
#include
#include
-namespace Thread {
+namespace ot {
TimerScheduler::TimerScheduler(void):
mHead(NULL)
@@ -219,4 +219,4 @@ bool TimerScheduler::TimerCompare(const Timer &aTimerA, const Timer &aTimerB)
return retval;
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/common/timer.hpp b/src/core/common/timer.hpp
index af3ca4a1d..cb6c72f95 100644
--- a/src/core/common/timer.hpp
+++ b/src/core/common/timer.hpp
@@ -42,7 +42,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Ip6 { class Ip6; }
@@ -257,6 +257,6 @@ private:
*
*/
-} // namespace Thread
+} // namespace ot
#endif // TIMER_HPP_
diff --git a/src/core/common/tlvs.cpp b/src/core/common/tlvs.cpp
index 663e82c24..ec0cc107a 100644
--- a/src/core/common/tlvs.cpp
+++ b/src/core/common/tlvs.cpp
@@ -41,7 +41,7 @@
#include
#include
-namespace Thread {
+namespace ot {
ThreadError Tlv::Get(const Message &aMessage, uint8_t aType, uint16_t aMaxLength, Tlv &aTlv)
{
@@ -134,4 +134,4 @@ exit:
return error;
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/common/tlvs.hpp b/src/core/common/tlvs.hpp
index 30fec9ea7..738da1fca 100644
--- a/src/core/common/tlvs.hpp
+++ b/src/core/common/tlvs.hpp
@@ -41,10 +41,10 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
/**
* This class implements TLV generation and parsing.
@@ -208,6 +208,6 @@ private:
uint16_t mLength;
} OT_TOOL_PACKED_END;
-} // namespace Thread
+} // namespace ot
#endif // TLVS_HPP_
diff --git a/src/core/common/trickle_timer.cpp b/src/core/common/trickle_timer.cpp
index 3ee94d592..0be22798c 100644
--- a/src/core/common/trickle_timer.cpp
+++ b/src/core/common/trickle_timer.cpp
@@ -43,7 +43,7 @@
#include
#include
-namespace Thread {
+namespace ot {
TrickleTimer::TrickleTimer(
TimerScheduler &aScheduler,
@@ -242,4 +242,4 @@ void TrickleTimer::HandleTimerFired(void)
}
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/common/trickle_timer.hpp b/src/core/common/trickle_timer.hpp
index 9c080e048..7812c4990 100644
--- a/src/core/common/trickle_timer.hpp
+++ b/src/core/common/trickle_timer.hpp
@@ -36,7 +36,7 @@
#include
-namespace Thread {
+namespace ot {
/**
* @addtogroup core-timer-trickle
@@ -185,6 +185,6 @@ private:
*
*/
-} // namespace Thread
+} // namespace ot
#endif // TRICKLE_TIMER_HPP_
diff --git a/src/core/crypto/aes_ccm.cpp b/src/core/crypto/aes_ccm.cpp
index 9231da299..e85eb95e5 100644
--- a/src/core/crypto/aes_ccm.cpp
+++ b/src/core/crypto/aes_ccm.cpp
@@ -41,7 +41,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Crypto {
ThreadError AesCcm::SetKey(const uint8_t *aKey, uint16_t aKeyLength)
@@ -280,4 +280,4 @@ void AesCcm::Finalize(void *tag, uint8_t *aTagLength)
}
} // namespace Crypto
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/crypto/aes_ccm.hpp b/src/core/crypto/aes_ccm.hpp
index cab0b7a24..2d9479102 100644
--- a/src/core/crypto/aes_ccm.hpp
+++ b/src/core/crypto/aes_ccm.hpp
@@ -40,7 +40,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Crypto {
/**
@@ -129,6 +129,6 @@ private:
*/
} // namespace Crypto
-} // namespace Thread
+} // namespace ot
#endif // AES_CCM_HPP_
diff --git a/src/core/crypto/aes_ecb.cpp b/src/core/crypto/aes_ecb.cpp
index a30143353..ea4f2df53 100644
--- a/src/core/crypto/aes_ecb.cpp
+++ b/src/core/crypto/aes_ecb.cpp
@@ -39,7 +39,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Crypto {
AesEcb::AesEcb()
@@ -63,4 +63,4 @@ AesEcb::~AesEcb()
}
} // namespace Crypto
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/crypto/aes_ecb.hpp b/src/core/crypto/aes_ecb.hpp
index 3dccb987d..6323cd055 100644
--- a/src/core/crypto/aes_ecb.hpp
+++ b/src/core/crypto/aes_ecb.hpp
@@ -36,7 +36,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Crypto {
/**
@@ -98,6 +98,6 @@ private:
*/
} // namespace Crypto
-} // namespace Thread
+} // namespace ot
#endif // AES_ECB_HPP_
diff --git a/src/core/crypto/hmac_sha256.cpp b/src/core/crypto/hmac_sha256.cpp
index 485a0d6a1..127584e80 100644
--- a/src/core/crypto/hmac_sha256.cpp
+++ b/src/core/crypto/hmac_sha256.cpp
@@ -39,7 +39,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Crypto {
HmacSha256::HmacSha256()
@@ -71,4 +71,4 @@ void HmacSha256::Finish(uint8_t aHash[kHashSize])
}
} // namespace Crypto
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/crypto/hmac_sha256.hpp b/src/core/crypto/hmac_sha256.hpp
index 2f3ede208..aaa2eb4ab 100644
--- a/src/core/crypto/hmac_sha256.hpp
+++ b/src/core/crypto/hmac_sha256.hpp
@@ -38,7 +38,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Crypto {
/**
@@ -108,6 +108,6 @@ private:
*/
} // namespace Crypto
-} // namespace Thread
+} // namespace ot
#endif // HMAC_SHA256_HPP_
diff --git a/src/core/crypto/mbedtls.cpp b/src/core/crypto/mbedtls.cpp
index ba0f29022..f127fadf4 100644
--- a/src/core/crypto/mbedtls.cpp
+++ b/src/core/crypto/mbedtls.cpp
@@ -39,7 +39,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Crypto {
MbedTls::MbedTls(void)
@@ -48,4 +48,4 @@ MbedTls::MbedTls(void)
}
} // namespace Crypto
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/crypto/mbedtls.hpp b/src/core/crypto/mbedtls.hpp
index 66bdf47ca..3d3c72608 100644
--- a/src/core/crypto/mbedtls.hpp
+++ b/src/core/crypto/mbedtls.hpp
@@ -44,7 +44,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Crypto {
/**
@@ -86,6 +86,6 @@ private:
*/
} // namespace Crypto
-} // namespace Thread
+} // namespace ot
#endif // OT_MBEDTLS_HPP_
diff --git a/src/core/crypto/sha256.cpp b/src/core/crypto/sha256.cpp
index 72bdff263..4f22b73e6 100644
--- a/src/core/crypto/sha256.cpp
+++ b/src/core/crypto/sha256.cpp
@@ -39,7 +39,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Crypto {
Sha256::Sha256()
@@ -68,4 +68,4 @@ void Sha256::Finish(uint8_t aHash[kHashSize])
}
} // namespace Crypto
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/crypto/sha256.hpp b/src/core/crypto/sha256.hpp
index 9b9cc8a32..c4292a93b 100644
--- a/src/core/crypto/sha256.hpp
+++ b/src/core/crypto/sha256.hpp
@@ -38,7 +38,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Crypto {
/**
@@ -105,6 +105,6 @@ private:
*/
} // namespace Crypto
-} // namespace Thread
+} // namespace ot
#endif // SHA256_HPP_
diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp
index 1b5c64c19..0b56ae1fd 100644
--- a/src/core/mac/mac.cpp
+++ b/src/core/mac/mac.cpp
@@ -56,9 +56,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap64;
+using ot::Encoding::BigEndian::HostSwap64;
-namespace Thread {
+namespace ot {
namespace Mac {
static const uint8_t sMode2Key[] =
@@ -1657,4 +1657,4 @@ void Mac::ResetCounters(void)
}
} // namespace Mac
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/mac/mac.hpp b/src/core/mac/mac.hpp
index c08c0aa29..a3d29b6dc 100644
--- a/src/core/mac/mac.hpp
+++ b/src/core/mac/mac.hpp
@@ -47,7 +47,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Mle { class MleRouter; }
@@ -726,6 +726,6 @@ private:
*/
} // namespace Mac
-} // namespace Thread
+} // namespace ot
#endif // MAC_HPP_
diff --git a/src/core/mac/mac_blacklist.cpp b/src/core/mac/mac_blacklist.cpp
index 9f0198ac0..184bf8892 100644
--- a/src/core/mac/mac_blacklist.cpp
+++ b/src/core/mac/mac_blacklist.cpp
@@ -44,7 +44,7 @@
#if OPENTHREAD_ENABLE_MAC_WHITELIST
-namespace Thread {
+namespace ot {
namespace Mac {
Blacklist::Blacklist(void)
@@ -133,6 +133,6 @@ exit:
}
} // namespace Mac
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_MAC_WHITELIST
diff --git a/src/core/mac/mac_blacklist_impl.hpp b/src/core/mac/mac_blacklist_impl.hpp
index dc10c1c4f..583ec0cfc 100644
--- a/src/core/mac/mac_blacklist_impl.hpp
+++ b/src/core/mac/mac_blacklist_impl.hpp
@@ -40,7 +40,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Mac {
/**
@@ -153,6 +153,6 @@ private:
*/
} // namespace Mac
-} // namespace Thread
+} // namespace ot
#endif // MAC_BLACKLIST_HPP_
diff --git a/src/core/mac/mac_blacklist_stub.hpp b/src/core/mac/mac_blacklist_stub.hpp
index f79e7f432..53890ae76 100644
--- a/src/core/mac/mac_blacklist_stub.hpp
+++ b/src/core/mac/mac_blacklist_stub.hpp
@@ -40,7 +40,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Mac {
class Blacklist
@@ -68,6 +68,6 @@ public:
};
} // namespace Mac
-} // namespace Thread
+} // namespace ot
#endif // MAC_BLACKLIST_HPP_
diff --git a/src/core/mac/mac_frame.cpp b/src/core/mac/mac_frame.cpp
index 16bfbe56d..5db381557 100644
--- a/src/core/mac/mac_frame.cpp
+++ b/src/core/mac/mac_frame.cpp
@@ -45,7 +45,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Mac {
void ExtAddress::Set(const Ip6::Address &aIpAddress)
@@ -1117,5 +1117,5 @@ const char *BeaconPayload::ToInfoString(char *aBuf, uint16_t aSize)
}
} // namespace Mac
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/mac/mac_frame.hpp b/src/core/mac/mac_frame.hpp
index 0f8108019..1523760d0 100644
--- a/src/core/mac/mac_frame.hpp
+++ b/src/core/mac/mac_frame.hpp
@@ -45,7 +45,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Ip6 { class Address; }
@@ -784,7 +784,7 @@ public:
*
*/
void Init(void) {
- mSuperframeSpec = Thread::Encoding::LittleEndian::HostSwap16(kSuperFrameSpec);
+ mSuperframeSpec = ot::Encoding::LittleEndian::HostSwap16(kSuperFrameSpec);
mGtsSpec = 0;
mPendingAddressSpec = 0;
}
@@ -797,7 +797,7 @@ public:
*
*/
bool IsValid(void) {
- return (mSuperframeSpec == Thread::Encoding::LittleEndian::HostSwap16(kSuperFrameSpec)) &&
+ return (mSuperframeSpec == ot::Encoding::LittleEndian::HostSwap16(kSuperFrameSpec)) &&
(mGtsSpec == 0) && (mPendingAddressSpec == 0);
}
@@ -985,6 +985,6 @@ private:
*/
} // namespace Mac
-} // namespace Thread
+} // namespace ot
#endif // MAC_FRAME_HPP_
diff --git a/src/core/mac/mac_whitelist.cpp b/src/core/mac/mac_whitelist.cpp
index 8c3c63027..e56833d4e 100644
--- a/src/core/mac/mac_whitelist.cpp
+++ b/src/core/mac/mac_whitelist.cpp
@@ -44,7 +44,7 @@
#if OPENTHREAD_ENABLE_MAC_WHITELIST
-namespace Thread {
+namespace ot {
namespace Mac {
Whitelist::Whitelist(void)
@@ -158,6 +158,6 @@ void Whitelist::SetFixedRssi(Entry &aEntry, int8_t aRssi)
}
} // namespace Mac
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_MAC_WHITELIST
diff --git a/src/core/mac/mac_whitelist_impl.hpp b/src/core/mac/mac_whitelist_impl.hpp
index 3df37f441..78f377dc0 100644
--- a/src/core/mac/mac_whitelist_impl.hpp
+++ b/src/core/mac/mac_whitelist_impl.hpp
@@ -40,7 +40,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Mac {
/**
@@ -182,6 +182,6 @@ private:
*/
} // namespace Mac
-} // namespace Thread
+} // namespace ot
#endif // MAC_WHITELIST_HPP_
diff --git a/src/core/mac/mac_whitelist_stub.hpp b/src/core/mac/mac_whitelist_stub.hpp
index 981bd4814..01a1050fd 100644
--- a/src/core/mac/mac_whitelist_stub.hpp
+++ b/src/core/mac/mac_whitelist_stub.hpp
@@ -40,7 +40,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Mac {
class Whitelist
@@ -74,6 +74,6 @@ public:
};
} // namespace Mac
-} // namespace Thread
+} // namespace ot
#endif // MAC_WHITELIST_HPP_
diff --git a/src/core/meshcop/announce_begin_client.cpp b/src/core/meshcop/announce_begin_client.cpp
index a89502b46..636a98081 100644
--- a/src/core/meshcop/announce_begin_client.cpp
+++ b/src/core/meshcop/announce_begin_client.cpp
@@ -53,7 +53,7 @@
#if OPENTHREAD_ENABLE_COMMISSIONER && OPENTHREAD_FTD
-namespace Thread {
+namespace ot {
AnnounceBeginClient::AnnounceBeginClient(ThreadNetif &aThreadNetif) :
mNetif(aThreadNetif)
@@ -121,7 +121,7 @@ exit:
return error;
}
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_COMMISSIONER && OPENTHREAD_FTD
diff --git a/src/core/meshcop/announce_begin_client.hpp b/src/core/meshcop/announce_begin_client.hpp
index 36d9309e5..b2c00f678 100644
--- a/src/core/meshcop/announce_begin_client.hpp
+++ b/src/core/meshcop/announce_begin_client.hpp
@@ -42,7 +42,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -88,6 +88,6 @@ private:
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // ANNOUNCE_BEGIN_CLIENT_HPP_
diff --git a/src/core/meshcop/border_agent_proxy.cpp b/src/core/meshcop/border_agent_proxy.cpp
index 9e5e1afa0..7f2113aa9 100644
--- a/src/core/meshcop/border_agent_proxy.cpp
+++ b/src/core/meshcop/border_agent_proxy.cpp
@@ -49,7 +49,7 @@
#if OPENTHREAD_FTD && OPENTHREAD_ENABLE_BORDER_AGENT_PROXY
-namespace Thread {
+namespace ot {
namespace MeshCoP {
BorderAgentProxy::BorderAgentProxy(const Ip6::Address &aMeshLocal16, Coap::Server &aCoapServer,
@@ -173,6 +173,6 @@ exit:
}
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_FTD && OPENTHREAD_ENABLE_BORDER_AGENT_PROXY
diff --git a/src/core/meshcop/border_agent_proxy.hpp b/src/core/meshcop/border_agent_proxy.hpp
index 3bf818cd8..a5f05bb0a 100644
--- a/src/core/meshcop/border_agent_proxy.hpp
+++ b/src/core/meshcop/border_agent_proxy.hpp
@@ -40,8 +40,7 @@
#include
#include
-namespace Thread {
-
+namespace ot {
namespace MeshCoP {
class BorderAgentProxy
@@ -120,6 +119,6 @@ private:
};
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // BORDER_AGENT_PROXY_HPP_
diff --git a/src/core/meshcop/commissioner.cpp b/src/core/meshcop/commissioner.cpp
index 268d2cff8..971f5e7cc 100644
--- a/src/core/meshcop/commissioner.cpp
+++ b/src/core/meshcop/commissioner.cpp
@@ -60,9 +60,9 @@
#if OPENTHREAD_FTD && OPENTHREAD_ENABLE_COMMISSIONER
-using Thread::Encoding::BigEndian::HostSwap64;
+using ot::Encoding::BigEndian::HostSwap64;
-namespace Thread {
+namespace ot {
namespace MeshCoP {
Commissioner::Commissioner(ThreadNetif &aThreadNetif):
@@ -1085,6 +1085,6 @@ exit:
}
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_FTD && OPENTHREAD_ENABLE_COMMISSIONER
diff --git a/src/core/meshcop/commissioner.hpp b/src/core/meshcop/commissioner.hpp
index 033f1b6b5..2b35922b7 100644
--- a/src/core/meshcop/commissioner.hpp
+++ b/src/core/meshcop/commissioner.hpp
@@ -49,7 +49,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -291,6 +291,6 @@ private:
};
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // COMMISSIONER_HPP_
diff --git a/src/core/meshcop/dataset.cpp b/src/core/meshcop/dataset.cpp
index c45362005..9a6649a1e 100644
--- a/src/core/meshcop/dataset.cpp
+++ b/src/core/meshcop/dataset.cpp
@@ -48,7 +48,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace MeshCoP {
Dataset::Dataset(otInstance *aInstance, const Tlv::Type aType) :
@@ -544,4 +544,4 @@ void Dataset::Remove(uint8_t *aStart, uint8_t aLength)
}
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/meshcop/dataset.hpp b/src/core/meshcop/dataset.hpp
index d38ec65ee..380521932 100644
--- a/src/core/meshcop/dataset.hpp
+++ b/src/core/meshcop/dataset.hpp
@@ -38,7 +38,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace MeshCoP {
class Dataset
@@ -195,6 +195,6 @@ private:
};
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // MESHCOP_DATASET_HPP_
diff --git a/src/core/meshcop/dataset_manager.cpp b/src/core/meshcop/dataset_manager.cpp
index 2d89979f6..e7fb481fe 100644
--- a/src/core/meshcop/dataset_manager.cpp
+++ b/src/core/meshcop/dataset_manager.cpp
@@ -62,7 +62,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace MeshCoP {
DatasetManager::DatasetManager(ThreadNetif &aThreadNetif, const Tlv::Type aType, const char *aUriSet,
@@ -1164,4 +1164,4 @@ void PendingDatasetBase::HandleGet(Coap::Header &aHeader, Message &aMessage, con
}
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/meshcop/dataset_manager.hpp b/src/core/meshcop/dataset_manager.hpp
index b688326ae..6acc763a1 100644
--- a/src/core/meshcop/dataset_manager.hpp
+++ b/src/core/meshcop/dataset_manager.hpp
@@ -44,7 +44,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -188,7 +188,7 @@ private:
};
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#if OPENTHREAD_MTD
#include "dataset_manager_mtd.hpp"
diff --git a/src/core/meshcop/dataset_manager_ftd.cpp b/src/core/meshcop/dataset_manager_ftd.cpp
index 00aa19e7e..f2a86a285 100644
--- a/src/core/meshcop/dataset_manager_ftd.cpp
+++ b/src/core/meshcop/dataset_manager_ftd.cpp
@@ -62,7 +62,7 @@
#if OPENTHREAD_FTD
-namespace Thread {
+namespace ot {
namespace MeshCoP {
ActiveDataset::ActiveDataset(ThreadNetif &aThreadNetif):
@@ -291,6 +291,6 @@ exit:
}
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_FTD
diff --git a/src/core/meshcop/dataset_manager_ftd.hpp b/src/core/meshcop/dataset_manager_ftd.hpp
index 8c3ecb193..e7f5527bc 100644
--- a/src/core/meshcop/dataset_manager_ftd.hpp
+++ b/src/core/meshcop/dataset_manager_ftd.hpp
@@ -39,7 +39,7 @@
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -86,6 +86,6 @@ private:
};
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // MESHCOP_DATASET_MANAGER_HPP_
diff --git a/src/core/meshcop/dataset_manager_mtd.hpp b/src/core/meshcop/dataset_manager_mtd.hpp
index de267bf3f..f9c91c95e 100644
--- a/src/core/meshcop/dataset_manager_mtd.hpp
+++ b/src/core/meshcop/dataset_manager_mtd.hpp
@@ -37,7 +37,7 @@
#include "openthread/types.h"
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -58,6 +58,6 @@ public:
};
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // MESHCOP_DATASET_MANAGER_HPP_
diff --git a/src/core/meshcop/dtls.cpp b/src/core/meshcop/dtls.cpp
index 910d783cd..ae4ba39e9 100644
--- a/src/core/meshcop/dtls.cpp
+++ b/src/core/meshcop/dtls.cpp
@@ -52,7 +52,7 @@
#if OPENTHREAD_ENABLE_DTLS
-namespace Thread {
+namespace ot {
namespace MeshCoP {
Dtls::Dtls(ThreadNetif &aNetif):
@@ -517,6 +517,6 @@ void Dtls::HandleMbedtlsDebug(void *ctx, int level, const char *, int, const cha
}
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_DTLS
diff --git a/src/core/meshcop/dtls.hpp b/src/core/meshcop/dtls.hpp
index 0e84bb3ec..f6ec2175f 100644
--- a/src/core/meshcop/dtls.hpp
+++ b/src/core/meshcop/dtls.hpp
@@ -48,7 +48,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -260,6 +260,6 @@ private:
};
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // DTLS_HPP_
diff --git a/src/core/meshcop/energy_scan_client.cpp b/src/core/meshcop/energy_scan_client.cpp
index 29b9a5630..5c43e8c7c 100644
--- a/src/core/meshcop/energy_scan_client.cpp
+++ b/src/core/meshcop/energy_scan_client.cpp
@@ -54,10 +54,10 @@
#if OPENTHREAD_ENABLE_COMMISSIONER && OPENTHREAD_FTD
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
EnergyScanClient::EnergyScanClient(ThreadNetif &aThreadNetif) :
mEnergyScan(OPENTHREAD_URI_ENERGY_REPORT, &EnergyScanClient::HandleReport, this),
@@ -181,7 +181,7 @@ exit:
return;
}
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_COMMISSIONER && OPENTHREAD_FTD
diff --git a/src/core/meshcop/energy_scan_client.hpp b/src/core/meshcop/energy_scan_client.hpp
index 7c64267b2..63fcd662a 100644
--- a/src/core/meshcop/energy_scan_client.hpp
+++ b/src/core/meshcop/energy_scan_client.hpp
@@ -43,7 +43,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -103,6 +103,6 @@ private:
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // ENERGY_SCAN_CLIENT_HPP_
diff --git a/src/core/meshcop/joiner.cpp b/src/core/meshcop/joiner.cpp
index 9d32f140d..926b98f13 100644
--- a/src/core/meshcop/joiner.cpp
+++ b/src/core/meshcop/joiner.cpp
@@ -57,10 +57,10 @@
#if OPENTHREAD_ENABLE_JOINER
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap64;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap64;
-namespace Thread {
+namespace ot {
namespace MeshCoP {
Joiner::Joiner(ThreadNetif &aNetif):
@@ -520,6 +520,6 @@ void Joiner::HandleTimer(void)
}
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_JOINER
diff --git a/src/core/meshcop/joiner.hpp b/src/core/meshcop/joiner.hpp
index 2c6080875..f226d46eb 100644
--- a/src/core/meshcop/joiner.hpp
+++ b/src/core/meshcop/joiner.hpp
@@ -45,7 +45,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -161,6 +161,6 @@ private:
};
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // JOINER_HPP_
diff --git a/src/core/meshcop/joiner_router.cpp b/src/core/meshcop/joiner_router.cpp
index b34e8659d..7940fa00f 100644
--- a/src/core/meshcop/joiner_router.cpp
+++ b/src/core/meshcop/joiner_router.cpp
@@ -53,10 +53,10 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap64;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap64;
-namespace Thread {
+namespace ot {
namespace MeshCoP {
JoinerRouter::JoinerRouter(ThreadNetif &aNetif):
@@ -534,7 +534,7 @@ exit:
}
} // namespace Dtls
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_FTD
diff --git a/src/core/meshcop/joiner_router.hpp b/src/core/meshcop/joiner_router.hpp
index 84a7b9564..6a4cdcb73 100644
--- a/src/core/meshcop/joiner_router.hpp
+++ b/src/core/meshcop/joiner_router.hpp
@@ -47,7 +47,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -250,6 +250,6 @@ private:
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // JOINER_ROUTER_HPP_
diff --git a/src/core/meshcop/leader.cpp b/src/core/meshcop/leader.cpp
index 5eba7c5d4..ea0947ad3 100644
--- a/src/core/meshcop/leader.cpp
+++ b/src/core/meshcop/leader.cpp
@@ -55,7 +55,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace MeshCoP {
Leader::Leader(ThreadNetif &aThreadNetif):
@@ -321,7 +321,7 @@ void Leader::ResignCommissioner(void)
}
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_FTD
diff --git a/src/core/meshcop/leader.hpp b/src/core/meshcop/leader.hpp
index 27afeea99..b0f1d524b 100644
--- a/src/core/meshcop/leader.hpp
+++ b/src/core/meshcop/leader.hpp
@@ -41,7 +41,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace MeshCoP {
OT_TOOL_PACKED_BEGIN
@@ -151,6 +151,6 @@ private:
};
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // MESHCOP_LEADER_HPP_
diff --git a/src/core/meshcop/meshcop.hpp b/src/core/meshcop/meshcop.hpp
index bebec274e..2f1952b44 100644
--- a/src/core/meshcop/meshcop.hpp
+++ b/src/core/meshcop/meshcop.hpp
@@ -38,7 +38,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace MeshCoP {
enum
@@ -58,6 +58,6 @@ inline Message *NewMeshCoPMessage(Coap::CoapBase &aCoapBase, const Coap::Header
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // MESHCOP_HPP_
diff --git a/src/core/meshcop/panid_query_client.cpp b/src/core/meshcop/panid_query_client.cpp
index 3a884a3a7..40a649db3 100644
--- a/src/core/meshcop/panid_query_client.cpp
+++ b/src/core/meshcop/panid_query_client.cpp
@@ -54,7 +54,7 @@
#if OPENTHREAD_ENABLE_COMMISSIONER && OPENTHREAD_FTD
-namespace Thread {
+namespace ot {
PanIdQueryClient::PanIdQueryClient(ThreadNetif &aThreadNetif) :
mCallback(NULL),
@@ -161,7 +161,7 @@ exit:
return;
}
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_COMMISSIONER && OPENTHREAD_FTD
diff --git a/src/core/meshcop/panid_query_client.hpp b/src/core/meshcop/panid_query_client.hpp
index 214a25cbe..c4407f796 100644
--- a/src/core/meshcop/panid_query_client.hpp
+++ b/src/core/meshcop/panid_query_client.hpp
@@ -43,7 +43,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -101,6 +101,6 @@ private:
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // PANID_QUERY_CLIENT_HPP_
diff --git a/src/core/meshcop/timestamp.cpp b/src/core/meshcop/timestamp.cpp
index e34992f21..e4f99eca7 100644
--- a/src/core/meshcop/timestamp.cpp
+++ b/src/core/meshcop/timestamp.cpp
@@ -43,7 +43,7 @@
#include
-namespace Thread {
+namespace ot {
namespace MeshCoP {
int Timestamp::Compare(const Timestamp &aCompare) const
@@ -79,4 +79,4 @@ int Timestamp::Compare(const Timestamp &aCompare) const
}
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/meshcop/timestamp.hpp b/src/core/meshcop/timestamp.hpp
index e138880d1..356d3bfc6 100644
--- a/src/core/meshcop/timestamp.hpp
+++ b/src/core/meshcop/timestamp.hpp
@@ -37,9 +37,9 @@
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace MeshCoP {
/**
@@ -147,6 +147,6 @@ private:
} OT_TOOL_PACKED_END;
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // MESHCOP_TIMESTAMP_HPP_
diff --git a/src/core/meshcop/tlvs.hpp b/src/core/meshcop/tlvs.hpp
index 44227abbd..fe1d81e09 100644
--- a/src/core/meshcop/tlvs.hpp
+++ b/src/core/meshcop/tlvs.hpp
@@ -44,11 +44,11 @@
#include
#include
-using Thread::Encoding::Reverse32;
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::Reverse32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
namespace MeshCoP {
/**
@@ -56,7 +56,7 @@ namespace MeshCoP {
*
*/
OT_TOOL_PACKED_BEGIN
-class Tlv : public Thread::Tlv
+class Tlv : public ot::Tlv
{
public:
/**
@@ -109,7 +109,7 @@ public:
* @returns The Type value.
*
*/
- Type GetType(void) const { return static_cast(Thread::Tlv::GetType()); }
+ Type GetType(void) const { return static_cast(ot::Tlv::GetType()); }
/**
* This method sets the Type value.
@@ -117,7 +117,7 @@ public:
* @param[in] aType The Type value.
*
*/
- void SetType(Type aType) { Thread::Tlv::SetType(static_cast(aType)); }
+ void SetType(Type aType) { ot::Tlv::SetType(static_cast(aType)); }
/**
* This method returns a pointer to the next TLV.
@@ -126,11 +126,11 @@ public:
*
*/
Tlv *GetNext(void) {
- return static_cast(Thread::Tlv::GetNext());
+ return static_cast(ot::Tlv::GetNext());
}
const Tlv *GetNext(void) const {
- return static_cast(Thread::Tlv::GetNext());
+ return static_cast(ot::Tlv::GetNext());
}
/**
@@ -146,7 +146,7 @@ public:
*
*/
static ThreadError GetTlv(const Message &aMessage, Type aType, uint16_t aMaxLength, Tlv &aTlv) {
- return Thread::Tlv::Get(aMessage, static_cast(aType), aMaxLength, aTlv);
+ return ot::Tlv::Get(aMessage, static_cast(aType), aMaxLength, aTlv);
}
/**
@@ -162,7 +162,7 @@ public:
*
*/
static ThreadError GetValueOffset(const Message &aMessage, Type aType, uint16_t &aOffset, uint16_t &aLength) {
- return Thread::Tlv::GetValueOffset(aMessage, static_cast(aType), aOffset, aLength);
+ return ot::Tlv::GetValueOffset(aMessage, static_cast(aType), aOffset, aLength);
}
} OT_TOOL_PACKED_END;
@@ -2074,6 +2074,6 @@ private:
} // namespace MeshCoP
-} // namespace Thread
+} // namespace ot
#endif // MESHCOP_TLVS_HPP_
diff --git a/src/core/net/dhcp6.hpp b/src/core/net/dhcp6.hpp
index f57e29deb..8f4d9b77d 100644
--- a/src/core/net/dhcp6.hpp
+++ b/src/core/net/dhcp6.hpp
@@ -37,10 +37,10 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
namespace Dhcp6 {
/**
@@ -580,6 +580,6 @@ public:
} OT_TOOL_PACKED_END;
} // namespace Dhcp6
-} // namespace Thread
+} // namespace ot
#endif // DHCP6_HPP_
diff --git a/src/core/net/dhcp6_client.cpp b/src/core/net/dhcp6_client.cpp
index 77bdbeb24..d4948074b 100644
--- a/src/core/net/dhcp6_client.cpp
+++ b/src/core/net/dhcp6_client.cpp
@@ -50,10 +50,10 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
namespace Dhcp6 {
@@ -723,4 +723,4 @@ exit:
}
} // namespace Dhcp6
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/net/dhcp6_client.hpp b/src/core/net/dhcp6_client.hpp
index ac435c799..b94eb9faa 100644
--- a/src/core/net/dhcp6_client.hpp
+++ b/src/core/net/dhcp6_client.hpp
@@ -44,7 +44,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
namespace Mle { class MleRouter; }
@@ -245,6 +245,6 @@ private:
};
} // namespace Dhcp6
-} // namespace Thread
+} // namespace ot
# endif // DHCP6_CLIENT_HPP_
diff --git a/src/core/net/dhcp6_server.cpp b/src/core/net/dhcp6_server.cpp
index 1831c6ff8..8ae7c168d 100644
--- a/src/core/net/dhcp6_server.cpp
+++ b/src/core/net/dhcp6_server.cpp
@@ -50,10 +50,10 @@
#if OPENTHREAD_ENABLE_DHCP6_SERVER
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
namespace Dhcp6 {
Dhcp6Server::Dhcp6Server(ThreadNetif &aThreadNetif):
@@ -576,6 +576,6 @@ ThreadError Dhcp6Server::AppendRapidCommit(Message &aMessage)
}
} // namespace Dhcp6
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_DHCP6_SERVER
diff --git a/src/core/net/dhcp6_server.hpp b/src/core/net/dhcp6_server.hpp
index e84cf274a..0f0c0d9ba 100644
--- a/src/core/net/dhcp6_server.hpp
+++ b/src/core/net/dhcp6_server.hpp
@@ -42,7 +42,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
namespace NetworkData { class Leader; }
@@ -158,6 +158,6 @@ private:
};
} // namespace Dhcp6
-} // namespace Thread
+} // namespace ot
#endif // DHCP6_SERVER_HPP_
diff --git a/src/core/net/dns_client.cpp b/src/core/net/dns_client.cpp
index 3e11521b6..9136b645f 100644
--- a/src/core/net/dns_client.cpp
+++ b/src/core/net/dns_client.cpp
@@ -46,9 +46,9 @@
* This file implements the DNS client.
*/
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace Dns {
ThreadError Client::Start(void)
@@ -522,6 +522,6 @@ exit:
}
} // namespace Coap
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_ENABLE_DNS_CLIENT
diff --git a/src/core/net/dns_client.hpp b/src/core/net/dns_client.hpp
index d289272e5..426da4018 100644
--- a/src/core/net/dns_client.hpp
+++ b/src/core/net/dns_client.hpp
@@ -43,7 +43,7 @@
* This file includes definitions for the DNS client.
*/
-namespace Thread {
+namespace ot {
namespace Dns {
@@ -259,6 +259,6 @@ private:
};
} // namespace Dns
-} // namespace Thread
+} // namespace ot
#endif // DNS_CLIENT_HPP_
diff --git a/src/core/net/dns_headers.hpp b/src/core/net/dns_headers.hpp
index e72c94592..3cec8fdd8 100644
--- a/src/core/net/dns_headers.hpp
+++ b/src/core/net/dns_headers.hpp
@@ -41,13 +41,13 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
/**
- * @namespace Thread::Dns
+ * @namespace ot::Dns
* @brief
* This namespace includes definitions for DNS.
*
@@ -583,6 +583,6 @@ public:
*/
} // namespace Dns
-} // namespace Thread
+} // namespace ot
#endif // DNS_HEADER_HPP_
diff --git a/src/core/net/icmp6.cpp b/src/core/net/icmp6.cpp
index ded46848e..adaae661a 100644
--- a/src/core/net/icmp6.cpp
+++ b/src/core/net/icmp6.cpp
@@ -48,9 +48,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace Ip6 {
Icmp::Icmp(Ip6 &aIp6):
@@ -246,4 +246,4 @@ ThreadError Icmp::UpdateChecksum(Message &aMessage, uint16_t aChecksum)
}
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/net/icmp6.hpp b/src/core/net/icmp6.hpp
index b5e436f35..26904d109 100644
--- a/src/core/net/icmp6.hpp
+++ b/src/core/net/icmp6.hpp
@@ -38,9 +38,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace Ip6 {
/**
@@ -338,6 +338,6 @@ private:
*/
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // NET_ICMP6_HPP_
diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp
index ee1c9fd10..31fed1a26 100644
--- a/src/core/net/ip6.cpp
+++ b/src/core/net/ip6.cpp
@@ -52,7 +52,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
Ip6::Ip6(void):
@@ -1115,4 +1115,4 @@ const char *Ip6::IpProtoToString(IpProto aIpProto)
}
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/net/ip6.hpp b/src/core/net/ip6.hpp
index 331a42f38..7ce48ff07 100644
--- a/src/core/net/ip6.hpp
+++ b/src/core/net/ip6.hpp
@@ -50,13 +50,13 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
/**
- * @namespace Thread::Ip6
+ * @namespace ot::Ip6
*
* @brief
* This namespace includes definitions for IPv6 networking.
@@ -409,6 +409,6 @@ static inline Ip6 *Ip6FromTimerScheduler(TimerScheduler *aTimerScheduler)
*/
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // NET_IP6_HPP_
diff --git a/src/core/net/ip6_address.cpp b/src/core/net/ip6_address.cpp
index 64d719711..8c0455401 100644
--- a/src/core/net/ip6_address.cpp
+++ b/src/core/net/ip6_address.cpp
@@ -45,10 +45,10 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
namespace Ip6 {
bool Address::IsUnspecified(void) const
@@ -303,4 +303,4 @@ const char *Address::ToString(char *aBuf, uint16_t aSize) const
}
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/net/ip6_address.hpp b/src/core/net/ip6_address.hpp
index c71bf9af5..9da4693aa 100644
--- a/src/core/net/ip6_address.hpp
+++ b/src/core/net/ip6_address.hpp
@@ -38,7 +38,7 @@
#include "openthread/types.h"
-namespace Thread {
+namespace ot {
namespace Ip6 {
/**
@@ -351,6 +351,6 @@ private:
*/
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // NET_IP6_ADDRESS_HPP_
diff --git a/src/core/net/ip6_filter.cpp b/src/core/net/ip6_filter.cpp
index ee5c0031a..b751bf5f7 100644
--- a/src/core/net/ip6_filter.cpp
+++ b/src/core/net/ip6_filter.cpp
@@ -46,7 +46,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
Filter::Filter(void)
@@ -185,4 +185,4 @@ const uint16_t *Filter::GetUnsecurePorts(uint8_t &aNumEntries) const
}
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/net/ip6_filter.hpp b/src/core/net/ip6_filter.hpp
index 5a0ed6a96..5fea18d78 100644
--- a/src/core/net/ip6_filter.hpp
+++ b/src/core/net/ip6_filter.hpp
@@ -36,7 +36,7 @@
#include "openthread/openthread.h"
-namespace Thread {
+namespace ot {
namespace Ip6 {
/**
@@ -116,6 +116,6 @@ private:
};
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // IP6_FILTER_HPP_
diff --git a/src/core/net/ip6_headers.hpp b/src/core/net/ip6_headers.hpp
index db4ef4aec..7e549d255 100644
--- a/src/core/net/ip6_headers.hpp
+++ b/src/core/net/ip6_headers.hpp
@@ -44,13 +44,13 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
/**
- * @namespace Thread::Ip6
+ * @namespace ot::Ip6
*
* @brief
* This namespace includes definitions for IPv6 networking.
@@ -550,6 +550,6 @@ private:
*/
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // NET_IP6_HEADERS_HPP_
diff --git a/src/core/net/ip6_mpl.cpp b/src/core/net/ip6_mpl.cpp
index 92f494bf6..ac7f77574 100644
--- a/src/core/net/ip6_mpl.cpp
+++ b/src/core/net/ip6_mpl.cpp
@@ -44,7 +44,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
void MplBufferedMessageMetadata::GenerateNextTransmissionTime(uint32_t aCurrentTime, uint8_t aInterval)
@@ -365,4 +365,4 @@ void Mpl::HandleSeedSetTimer()
}
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/net/ip6_mpl.hpp b/src/core/net/ip6_mpl.hpp
index 2569a1fe3..384d11303 100644
--- a/src/core/net/ip6_mpl.hpp
+++ b/src/core/net/ip6_mpl.hpp
@@ -40,7 +40,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
/**
@@ -553,6 +553,6 @@ private:
*/
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // NET_IP6_MPL_HPP_
diff --git a/src/core/net/ip6_routes.cpp b/src/core/net/ip6_routes.cpp
index 5628a8656..6dd14985a 100644
--- a/src/core/net/ip6_routes.cpp
+++ b/src/core/net/ip6_routes.cpp
@@ -43,7 +43,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
Routes::Routes(Ip6 &aIp6):
@@ -134,4 +134,4 @@ int8_t Routes::Lookup(const Address &aSource, const Address &aDestination)
}
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/net/ip6_routes.hpp b/src/core/net/ip6_routes.hpp
index 78bc2e5ab..ae0bb34c0 100644
--- a/src/core/net/ip6_routes.hpp
+++ b/src/core/net/ip6_routes.hpp
@@ -39,7 +39,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
/**
@@ -120,6 +120,6 @@ private:
*/
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // NET_IP6_ROUTES_HPP_
diff --git a/src/core/net/netif.cpp b/src/core/net/netif.cpp
index 01295b64c..4dd31b5bb 100644
--- a/src/core/net/netif.cpp
+++ b/src/core/net/netif.cpp
@@ -42,7 +42,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
Netif::Netif(Ip6 &aIp6, int8_t aInterfaceId):
@@ -465,4 +465,4 @@ void Netif::HandleStateChangedTask(void)
}
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/net/netif.hpp b/src/core/net/netif.hpp
index 8593b52b1..77965774b 100644
--- a/src/core/net/netif.hpp
+++ b/src/core/net/netif.hpp
@@ -40,7 +40,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
class Ip6;
@@ -555,6 +555,6 @@ private:
*/
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // NET_NETIF_HPP_
diff --git a/src/core/net/socket.hpp b/src/core/net/socket.hpp
index d69dccdb5..448565d38 100644
--- a/src/core/net/socket.hpp
+++ b/src/core/net/socket.hpp
@@ -38,7 +38,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
/**
@@ -217,6 +217,6 @@ public:
*/
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // NET_SOCKET_HPP_
diff --git a/src/core/net/tcp.hpp b/src/core/net/tcp.hpp
index eb3fd0e14..17f06ee88 100644
--- a/src/core/net/tcp.hpp
+++ b/src/core/net/tcp.hpp
@@ -38,7 +38,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
/**
@@ -144,6 +144,6 @@ public:
*/
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // TCP_HPP_
diff --git a/src/core/net/udp6.cpp b/src/core/net/udp6.cpp
index c611a84a8..4dedb92c3 100644
--- a/src/core/net/udp6.cpp
+++ b/src/core/net/udp6.cpp
@@ -44,9 +44,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace Ip6 {
UdpSocket::UdpSocket(Udp &aUdp)
@@ -284,4 +284,4 @@ ThreadError Udp::UpdateChecksum(Message &aMessage, uint16_t aChecksum)
}
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/net/udp6.hpp b/src/core/net/udp6.hpp
index d91b10c31..7b60ba8f3 100644
--- a/src/core/net/udp6.hpp
+++ b/src/core/net/udp6.hpp
@@ -38,7 +38,7 @@
#include
-namespace Thread {
+namespace ot {
namespace Ip6 {
class Udp;
@@ -366,6 +366,6 @@ public:
*/
} // namespace Ip6
-} // namespace Thread
+} // namespace ot
#endif // NET_UDP6_HPP_
diff --git a/src/core/openthread-instance.h b/src/core/openthread-instance.h
index e45eb2b4b..4375e3e7d 100644
--- a/src/core/openthread-instance.h
+++ b/src/core/openthread-instance.h
@@ -60,7 +60,7 @@ typedef struct otInstance
// Callbacks
//
- Thread::Ip6::NetifCallback mNetifCallback[OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS];
+ ot::Ip6::NetifCallback mNetifCallback[OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS];
otIp6ReceiveCallback mReceiveIp6DatagramCallback;
void *mReceiveIp6DatagramCallbackContext;
@@ -76,17 +76,17 @@ typedef struct otInstance
//
#ifndef OPENTHREAD_MULTIPLE_INSTANCE
- Thread::Crypto::MbedTls mMbedTls;
+ ot::Crypto::MbedTls mMbedTls;
#endif
- Thread::Ip6::Ip6 mIp6;
- Thread::ThreadNetif mThreadNetif;
+ ot::Ip6::Ip6 mIp6;
+ ot::ThreadNetif mThreadNetif;
#if OPENTHREAD_ENABLE_RAW_LINK_API
- Thread::LinkRaw mLinkRaw;
+ ot::LinkRaw mLinkRaw;
#endif // OPENTHREAD_ENABLE_RAW_LINK_API
#if OPENTHREAD_ENABLE_APPLICATION_COAP
- Thread::Coap::Server mApplicationCoapServer;
+ ot::Coap::Server mApplicationCoapServer;
#endif // OPENTHREAD_ENABLE_APPLICATION_COAP
#if OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL
@@ -98,12 +98,12 @@ typedef struct otInstance
} otInstance;
-static inline otInstance *otInstanceFromIp6(Thread::Ip6::Ip6 *aIp6)
+static inline otInstance *otInstanceFromIp6(ot::Ip6::Ip6 *aIp6)
{
return (otInstance *)CONTAINING_RECORD(aIp6, otInstance, mIp6);
}
-static inline otInstance *otInstanceFromThreadNetif(Thread::ThreadNetif *aThreadNetif)
+static inline otInstance *otInstanceFromThreadNetif(ot::ThreadNetif *aThreadNetif)
{
return (otInstance *)CONTAINING_RECORD(aThreadNetif, otInstance, mThreadNetif);
}
diff --git a/src/core/thread/address_resolver.cpp b/src/core/thread/address_resolver.cpp
index 2629c0768..4f684bf64 100644
--- a/src/core/thread/address_resolver.cpp
+++ b/src/core/thread/address_resolver.cpp
@@ -56,9 +56,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
AddressResolver::AddressResolver(ThreadNetif &aThreadNetif) :
mAddressError(OPENTHREAD_URI_ADDRESS_ERROR, &AddressResolver::HandleAddressError, this),
@@ -691,6 +691,6 @@ exit:
(void)aMessageInfo;
}
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_FTD
diff --git a/src/core/thread/address_resolver_ftd.hpp b/src/core/thread/address_resolver_ftd.hpp
index b413435cd..e7623290f 100644
--- a/src/core/thread/address_resolver_ftd.hpp
+++ b/src/core/thread/address_resolver_ftd.hpp
@@ -45,7 +45,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class MeshForwarder;
class ThreadLastTransactionTimeTlv;
@@ -205,6 +205,6 @@ private:
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // ADDRESS_RESOLVER_HPP_
diff --git a/src/core/thread/address_resolver_mtd.hpp b/src/core/thread/address_resolver_mtd.hpp
index 7f138f122..6436d496b 100644
--- a/src/core/thread/address_resolver_mtd.hpp
+++ b/src/core/thread/address_resolver_mtd.hpp
@@ -36,7 +36,7 @@
#include "openthread/types.h"
-namespace Thread {
+namespace ot {
class AddressResolver
{
@@ -48,6 +48,6 @@ public:
ThreadError Resolve(const Ip6::Address &, Mac::ShortAddress &) { return kThreadError_NotImplemented; }
};
-} // namespace Thread
+} // namespace ot
#endif // ADDRESS_RESOLVER_HPP_
diff --git a/src/core/thread/announce_begin_server.cpp b/src/core/thread/announce_begin_server.cpp
index 65915da3e..1aedc2ad7 100644
--- a/src/core/thread/announce_begin_server.cpp
+++ b/src/core/thread/announce_begin_server.cpp
@@ -50,9 +50,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
AnnounceBeginServer::AnnounceBeginServer(ThreadNetif &aThreadNetif) :
mChannelMask(0),
@@ -160,4 +160,4 @@ void AnnounceBeginServer::HandleTimer(void)
}
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/announce_begin_server.hpp b/src/core/thread/announce_begin_server.hpp
index 7d01d25d4..6e43d5ce8 100644
--- a/src/core/thread/announce_begin_server.hpp
+++ b/src/core/thread/announce_begin_server.hpp
@@ -43,7 +43,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -119,6 +119,6 @@ private:
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // ANNOUNCE_BEGIN_SERVER_HPP_
diff --git a/src/core/thread/data_poll_manager.cpp b/src/core/thread/data_poll_manager.cpp
index 5ca385a13..612672925 100644
--- a/src/core/thread/data_poll_manager.cpp
+++ b/src/core/thread/data_poll_manager.cpp
@@ -51,7 +51,7 @@
#include
#include
-namespace Thread {
+namespace ot {
DataPollManager::DataPollManager(MeshForwarder &aMeshForwarder):
mMeshForwarder(aMeshForwarder),
@@ -404,4 +404,4 @@ void DataPollManager::HandlePollTimer(void *aContext)
static_cast(aContext)->SendDataPoll();
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/data_poll_manager.hpp b/src/core/thread/data_poll_manager.hpp
index 9fbe3837c..e5c57ed0b 100644
--- a/src/core/thread/data_poll_manager.hpp
+++ b/src/core/thread/data_poll_manager.hpp
@@ -39,7 +39,7 @@
#include "openthread/types.h"
#include
-namespace Thread {
+namespace ot {
class MeshForwarder;
@@ -237,6 +237,6 @@ private:
*
*/
-} // namespace Thread
+} // namespace ot
#endif // DATA_POLL_MANAGER_HPP_
diff --git a/src/core/thread/energy_scan_server.cpp b/src/core/thread/energy_scan_server.cpp
index a81e3b289..146fc56ba 100644
--- a/src/core/thread/energy_scan_server.cpp
+++ b/src/core/thread/energy_scan_server.cpp
@@ -51,7 +51,7 @@
#include
#include
-namespace Thread {
+namespace ot {
EnergyScanServer::EnergyScanServer(ThreadNetif &aThreadNetif) :
mChannelMask(0),
@@ -248,4 +248,4 @@ void EnergyScanServer::HandleNetifStateChanged(uint32_t aFlags)
}
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/energy_scan_server.hpp b/src/core/thread/energy_scan_server.hpp
index b19fee631..00272666b 100644
--- a/src/core/thread/energy_scan_server.hpp
+++ b/src/core/thread/energy_scan_server.hpp
@@ -44,7 +44,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class MeshForwarder;
class ThreadLastTransactionTimeTlv;
@@ -119,6 +119,6 @@ private:
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // ENERGY_SCAN_SERVER_HPP_
diff --git a/src/core/thread/key_manager.cpp b/src/core/thread/key_manager.cpp
index c2c7aa250..edf97d7bb 100644
--- a/src/core/thread/key_manager.cpp
+++ b/src/core/thread/key_manager.cpp
@@ -45,7 +45,7 @@
#include
#include
-namespace Thread {
+namespace ot {
static const uint8_t kThreadString[] =
{
@@ -281,4 +281,4 @@ void KeyManager::HandleKeyRotationTimer(void)
SetCurrentKeySequence(mKeySequence + 1);
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/key_manager.hpp b/src/core/thread/key_manager.hpp
index 64269ef5f..2264cefa8 100644
--- a/src/core/thread/key_manager.hpp
+++ b/src/core/thread/key_manager.hpp
@@ -41,7 +41,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -375,6 +375,6 @@ private:
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // KEY_MANAGER_HPP_
diff --git a/src/core/thread/link_quality.cpp b/src/core/thread/link_quality.cpp
index 01d2e8205..765cc8147 100644
--- a/src/core/thread/link_quality.cpp
+++ b/src/core/thread/link_quality.cpp
@@ -45,7 +45,7 @@
#include
#include
-namespace Thread {
+namespace ot {
enum
{
@@ -299,4 +299,4 @@ void ClearNoiseFloorAverage(LinkQualityInfo &aNoiseFloor)
aNoiseFloor.Clear();
}
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/link_quality.hpp b/src/core/thread/link_quality.hpp
index 6458c8349..fb6e207c2 100644
--- a/src/core/thread/link_quality.hpp
+++ b/src/core/thread/link_quality.hpp
@@ -36,7 +36,7 @@
#include "openthread/types.h"
-namespace Thread {
+namespace ot {
/**
* @addtogroup core-link-quality
@@ -258,6 +258,6 @@ void ClearNoiseFloorAverage(LinkQualityInfo &aNoiseFloor);
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // LINK_QUALITY_HPP_
diff --git a/src/core/thread/lowpan.cpp b/src/core/thread/lowpan.cpp
index 1aedb9bf0..41232b523 100644
--- a/src/core/thread/lowpan.cpp
+++ b/src/core/thread/lowpan.cpp
@@ -46,9 +46,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace Lowpan {
Lowpan::Lowpan(ThreadNetif &aThreadNetif):
@@ -1176,4 +1176,4 @@ exit:
}
} // namespace Lowpan
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/lowpan.hpp b/src/core/thread/lowpan.hpp
index bb9b2d651..736800b0b 100644
--- a/src/core/thread/lowpan.hpp
+++ b/src/core/thread/lowpan.hpp
@@ -39,7 +39,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -55,7 +55,7 @@ namespace NetworkData { class Leader; }
*/
/**
- * @namespace Thread::Lowpan
+ * @namespace ot::Lowpan
*
* @brief
* This namespace includes definitions for 6LoWPAN message processing.
@@ -499,6 +499,6 @@ private:
*/
} // namespace Lowpan
-} // namespace Thread
+} // namespace ot
#endif // LOWPAN_HPP_
diff --git a/src/core/thread/mesh_forwarder.cpp b/src/core/thread/mesh_forwarder.cpp
index b01d5aae7..a675db465 100644
--- a/src/core/thread/mesh_forwarder.cpp
+++ b/src/core/thread/mesh_forwarder.cpp
@@ -56,9 +56,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
MeshForwarder::MeshForwarder(ThreadNetif &aThreadNetif):
mNetif(aThreadNetif),
@@ -2155,4 +2155,4 @@ void MeshForwarder::LogIp6Message(MessageAction, const Message &, const Mac::Add
#endif //#if OPENTHREAD_CONFIG_LOG_LEVEL >= OPENTHREAD_LOG_LEVEL_INFO
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/mesh_forwarder.hpp b/src/core/thread/mesh_forwarder.hpp
index bdebe74ab..9bf143442 100644
--- a/src/core/thread/mesh_forwarder.hpp
+++ b/src/core/thread/mesh_forwarder.hpp
@@ -48,7 +48,7 @@
#include
#include
-namespace Thread {
+namespace ot {
enum
{
@@ -346,6 +346,6 @@ private:
*
*/
-} // namespace Thread
+} // namespace ot
#endif // MESH_FORWARDER_HPP_
diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp
index a97ee3ff2..3dd8fce0e 100644
--- a/src/core/thread/mle.cpp
+++ b/src/core/thread/mle.cpp
@@ -59,9 +59,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace Mle {
Mle::Mle(ThreadNetif &aThreadNetif) :
@@ -3250,4 +3250,4 @@ exit:
}
} // namespace Mle
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/mle.hpp b/src/core/thread/mle.hpp
index b0274140e..f30d0201f 100644
--- a/src/core/thread/mle.hpp
+++ b/src/core/thread/mle.hpp
@@ -45,7 +45,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
class AddressResolver;
@@ -71,7 +71,7 @@ namespace NetworkData { class Leader; }
*/
/**
- * @namespace Thread::Mle
+ * @namespace ot::Mle
*
* @brief
* This namespace includes definitions for the MLE protocol.
@@ -1477,6 +1477,6 @@ private:
*
*/
-} // namespace Thread
+} // namespace ot
#endif // MLE_HPP_
diff --git a/src/core/thread/mle_constants.hpp b/src/core/thread/mle_constants.hpp
index 4ea72161e..679030a74 100644
--- a/src/core/thread/mle_constants.hpp
+++ b/src/core/thread/mle_constants.hpp
@@ -34,7 +34,7 @@
#ifndef MLE_CONSTANTS_HPP_
#define MLE_CONSTANTS_HPP_
-namespace Thread {
+namespace ot {
namespace Mle {
/**
@@ -138,6 +138,6 @@ enum
*
*/
-} // namespace Thread
+} // namespace ot
#endif // MLE_CONSTANTS_HPP_
diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp
index 290ca7113..ba3309c33 100644
--- a/src/core/thread/mle_router.cpp
+++ b/src/core/thread/mle_router.cpp
@@ -55,9 +55,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace Mle {
MleRouter::MleRouter(ThreadNetif &aThreadNetif):
@@ -4516,7 +4516,7 @@ uint8_t MleRouter::GetMinDowngradeNeighborRouters(void)
}
} // namespace Mle
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_FTD
diff --git a/src/core/thread/mle_router_ftd.hpp b/src/core/thread/mle_router_ftd.hpp
index 3f2bda9a1..9bf936369 100644
--- a/src/core/thread/mle_router_ftd.hpp
+++ b/src/core/thread/mle_router_ftd.hpp
@@ -49,7 +49,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Mle {
class MeshForwarder;
@@ -753,6 +753,6 @@ private:
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // MLE_ROUTER_HPP_
diff --git a/src/core/thread/mle_router_mtd.hpp b/src/core/thread/mle_router_mtd.hpp
index 102eabebf..41352d837 100644
--- a/src/core/thread/mle_router_mtd.hpp
+++ b/src/core/thread/mle_router_mtd.hpp
@@ -40,7 +40,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace Mle {
class MleRouter: public Mle
@@ -169,6 +169,6 @@ private:
};
} // namespace Mle
-} // namespace Thread
+} // namespace ot
#endif // MLE_ROUTER_HPP_
diff --git a/src/core/thread/mle_tlvs.hpp b/src/core/thread/mle_tlvs.hpp
index a9dd23e4f..7d9757790 100644
--- a/src/core/thread/mle_tlvs.hpp
+++ b/src/core/thread/mle_tlvs.hpp
@@ -45,10 +45,10 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
namespace Mle {
@@ -71,7 +71,7 @@ typedef uint8_t TlvRequestIterator; ///< Used to iterate through TlvRequest
*
*/
OT_TOOL_PACKED_BEGIN
-class Tlv : public Thread::Tlv
+class Tlv : public ot::Tlv
{
public:
/**
@@ -116,7 +116,7 @@ public:
* @returns The Type value.
*
*/
- Type GetType(void) const { return static_cast(Thread::Tlv::GetType()); }
+ Type GetType(void) const { return static_cast(ot::Tlv::GetType()); }
/**
* This method sets the Type value.
@@ -124,7 +124,7 @@ public:
* @param[in] aType The Type value.
*
*/
- void SetType(Type aType) { Thread::Tlv::SetType(static_cast(aType)); }
+ void SetType(Type aType) { ot::Tlv::SetType(static_cast(aType)); }
/**
* This static method reads the requested TLV out of @p aMessage.
@@ -139,7 +139,7 @@ public:
*
*/
static ThreadError GetTlv(const Message &aMessage, Type aType, uint16_t aMaxLength, Tlv &aTlv) {
- return Thread::Tlv::Get(aMessage, static_cast(aType), aMaxLength, aTlv);
+ return ot::Tlv::Get(aMessage, static_cast(aType), aMaxLength, aTlv);
}
/**
@@ -154,7 +154,7 @@ public:
*
*/
static ThreadError GetOffset(const Message &aMessage, Type aType, uint16_t &aOffset) {
- return Thread::Tlv::GetOffset(aMessage, static_cast(aType), aOffset);
+ return ot::Tlv::GetOffset(aMessage, static_cast(aType), aOffset);
}
} OT_TOOL_PACKED_END;
@@ -1634,6 +1634,6 @@ public:
} // namespace Mle
-} // namespace Thread
+} // namespace ot
#endif // MLE_TLVS_HPP_
diff --git a/src/core/thread/network_data.cpp b/src/core/thread/network_data.cpp
index 242f7d7c9..4c61e80da 100644
--- a/src/core/thread/network_data.cpp
+++ b/src/core/thread/network_data.cpp
@@ -51,7 +51,7 @@
#include
#include
-namespace Thread {
+namespace ot {
namespace NetworkData {
NetworkData::NetworkData(ThreadNetif &aThreadNetif, bool aLocal):
@@ -669,4 +669,4 @@ void NetworkData::ClearResubmitDelayTimer(void)
}
} // namespace NetworkData
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/network_data.hpp b/src/core/thread/network_data.hpp
index 76d885ccf..6983fa6d2 100644
--- a/src/core/thread/network_data.hpp
+++ b/src/core/thread/network_data.hpp
@@ -42,7 +42,7 @@
#include
#include
-namespace Thread {
+namespace ot {
/**
* @addtogroup core-netdata
@@ -61,7 +61,7 @@ namespace Thread {
*/
/**
- * @namespace Thread::NetworkData
+ * @namespace ot::NetworkData
*
* @brief
* This namespace includes definitions for managing Thread Network Data.
@@ -373,6 +373,6 @@ private:
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // NETWORK_DATA_HPP_
diff --git a/src/core/thread/network_data_leader.cpp b/src/core/thread/network_data_leader.cpp
index 05c55c6c8..ad0d43bcf 100644
--- a/src/core/thread/network_data_leader.cpp
+++ b/src/core/thread/network_data_leader.cpp
@@ -56,9 +56,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace NetworkData {
LeaderBase::LeaderBase(ThreadNetif &aThreadNetif):
@@ -536,4 +536,4 @@ exit:
}
} // namespace NetworkData
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/network_data_leader.hpp b/src/core/thread/network_data_leader.hpp
index 92597aef0..cb8187e48 100644
--- a/src/core/thread/network_data_leader.hpp
+++ b/src/core/thread/network_data_leader.hpp
@@ -42,7 +42,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -240,7 +240,7 @@ private:
*/
} // namespace NetworkData
-} // namespace Thread
+} // namespace ot
#if OPENTHREAD_MTD
#include "network_data_leader_mtd.hpp"
diff --git a/src/core/thread/network_data_leader_ftd.cpp b/src/core/thread/network_data_leader_ftd.cpp
index 93e8b75d0..4e07d71f4 100644
--- a/src/core/thread/network_data_leader_ftd.cpp
+++ b/src/core/thread/network_data_leader_ftd.cpp
@@ -59,9 +59,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace NetworkData {
Leader::Leader(ThreadNetif &aThreadNetif):
@@ -1079,7 +1079,7 @@ void Leader::HandleTimer(void)
}
} // namespace NetworkData
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_FTD
diff --git a/src/core/thread/network_data_leader_ftd.hpp b/src/core/thread/network_data_leader_ftd.hpp
index 97c2a07e5..96b5bb974 100644
--- a/src/core/thread/network_data_leader_ftd.hpp
+++ b/src/core/thread/network_data_leader_ftd.hpp
@@ -42,7 +42,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -212,6 +212,6 @@ private:
*/
} // namespace NetworkData
-} // namespace Thread
+} // namespace ot
#endif // NETWORK_DATA_LEADER_FTD_HPP_
diff --git a/src/core/thread/network_data_leader_mtd.hpp b/src/core/thread/network_data_leader_mtd.hpp
index 33569ee4d..65426c1ab 100644
--- a/src/core/thread/network_data_leader_mtd.hpp
+++ b/src/core/thread/network_data_leader_mtd.hpp
@@ -36,7 +36,7 @@
#include "utils/wrap_stdint.h"
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -62,6 +62,6 @@ public:
};
} // namespace NetworkData
-} // namespace Thread
+} // namespace ot
#endif // NETWORK_DATA_LEADER_MTD_HPP_
diff --git a/src/core/thread/network_data_local.cpp b/src/core/thread/network_data_local.cpp
index 11b23bf2e..f16545340 100644
--- a/src/core/thread/network_data_local.cpp
+++ b/src/core/thread/network_data_local.cpp
@@ -46,7 +46,7 @@
#if OPENTHREAD_FTD
-namespace Thread {
+namespace ot {
namespace NetworkData {
Local::Local(ThreadNetif &aThreadNetif):
@@ -251,6 +251,6 @@ exit:
}
} // namespace NetworkData
-} // namespace Thread
+} // namespace ot
#endif // OPENTHREAD_FTD
diff --git a/src/core/thread/network_data_local_ftd.hpp b/src/core/thread/network_data_local_ftd.hpp
index 014bf435d..85d0b397c 100644
--- a/src/core/thread/network_data_local_ftd.hpp
+++ b/src/core/thread/network_data_local_ftd.hpp
@@ -36,7 +36,7 @@
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -147,6 +147,6 @@ private:
* @}
*/
-} // namespace Thread
+} // namespace ot
#endif // NETWORK_DATA_LOCAL_HPP_
diff --git a/src/core/thread/network_data_local_mtd.hpp b/src/core/thread/network_data_local_mtd.hpp
index 12fe32559..50b1c5263 100644
--- a/src/core/thread/network_data_local_mtd.hpp
+++ b/src/core/thread/network_data_local_mtd.hpp
@@ -36,7 +36,7 @@
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -64,6 +64,6 @@ public:
};
} // namespace NetworkData
-} // namespace Thread
+} // namespace ot
#endif // NETWORK_DATA_LOCAL_HPP_
diff --git a/src/core/thread/network_data_tlvs.hpp b/src/core/thread/network_data_tlvs.hpp
index 663c40395..219131786 100644
--- a/src/core/thread/network_data_tlvs.hpp
+++ b/src/core/thread/network_data_tlvs.hpp
@@ -39,9 +39,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace NetworkData {
/**
@@ -686,6 +686,6 @@ public:
*/
} // namespace NetworkData
-} // namespace Thread
+} // namespace ot
#endif // NETWORK_DATA_TLVS_HPP_
diff --git a/src/core/thread/network_diagnostic.cpp b/src/core/thread/network_diagnostic.cpp
index db436300c..76b73c5e3 100644
--- a/src/core/thread/network_diagnostic.cpp
+++ b/src/core/thread/network_diagnostic.cpp
@@ -56,9 +56,9 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap16;
-namespace Thread {
+namespace ot {
namespace NetworkDiagnostic {
@@ -641,4 +641,4 @@ exit:
} // namespace NetworkDiagnostic
-} // namespace Thread
+} // namespace ot
diff --git a/src/core/thread/network_diagnostic.hpp b/src/core/thread/network_diagnostic.hpp
index a43c3058d..9a99a697e 100644
--- a/src/core/thread/network_diagnostic.hpp
+++ b/src/core/thread/network_diagnostic.hpp
@@ -42,7 +42,7 @@
#include
#include
-namespace Thread {
+namespace ot {
class ThreadNetif;
@@ -156,6 +156,6 @@ private:
*/
} // namespace NetworkDiagnostic
-} // namespace Thread
+} // namespace ot
#endif // NETWORK_DIAGNOSTIC_HPP_
diff --git a/src/core/thread/network_diagnostic_tlvs.hpp b/src/core/thread/network_diagnostic_tlvs.hpp
index 66d07a1e0..e7e15fc71 100644
--- a/src/core/thread/network_diagnostic_tlvs.hpp
+++ b/src/core/thread/network_diagnostic_tlvs.hpp
@@ -45,10 +45,10 @@
#include
#include
-using Thread::Encoding::BigEndian::HostSwap16;
-using Thread::Encoding::BigEndian::HostSwap32;
+using ot::Encoding::BigEndian::HostSwap16;
+using ot::Encoding::BigEndian::HostSwap32;
-namespace Thread {
+namespace ot {
namespace NetworkDiagnostic {
@@ -73,7 +73,7 @@ enum
*
*/
OT_TOOL_PACKED_BEGIN
-class NetworkDiagnosticTlv : public Thread::Tlv
+class NetworkDiagnosticTlv : public ot::Tlv
{
public:
/**
@@ -106,7 +106,7 @@ public:
* @returns The Type value.
*
*/
- Type GetType(void) const { return static_cast(Thread::Tlv::GetType()); }
+ Type GetType(void) const { return static_cast(ot::Tlv::GetType()); }
/**
* This method sets the Type value.
@@ -114,7 +114,7 @@ public:
* @param[in] aType The Type value.
*
*/
- void SetType(Type aType) { Thread::Tlv::SetType(static_cast(aType)); }
+ void SetType(Type aType) { ot::Tlv::SetType(static_cast(aType)); }
/**
* This static method reads the requested TLV out of @p aMessage.
@@ -129,7 +129,7 @@ public:
*
*/
static ThreadError GetTlv(const Message &aMessage, Type aType, uint16_t aMaxLength, Tlv &aTlv) {
- return Thread::Tlv::Get(aMessage, static_cast(aType), aMaxLength, aTlv);
+ return ot::Tlv::Get(aMessage, static_cast(aType), aMaxLength, aTlv);
}
/**
@@ -144,7 +144,7 @@ public:
*
*/
static ThreadError GetOffset(const Message &aMessage, Type aType, uint16_t &aOffset) {
- return Thread::Tlv::GetOffset(aMessage, static_cast(aType), aOffset);
+ return ot::Tlv::GetOffset(aMessage, static_cast(aType), aOffset);
}
} OT_TOOL_PACKED_END;
@@ -1356,6 +1356,6 @@ public:
} // namespace NetworkDiagnostic
-} // namespace Thread
+} // namespace ot
#endif // NETWORK_DIAGNOSTIC_TLVS_HPP_
diff --git a/src/core/thread/panid_query_server.cpp b/src/core/thread/panid_query_server.cpp
index 658cf17b0..bb9cbeb94 100644
--- a/src/core/thread/panid_query_server.cpp
+++ b/src/core/thread/panid_query_server.cpp
@@ -51,7 +51,7 @@
#include
#include