Project import
diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 0000000..a896cb6
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,65 @@
+#
+# Copyright (c) 2016, The OpenThread Authors.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+version: 0.1.{build}
+image: Visual Studio 2015
+configuration:
+- Release
+platform:
+- x64
+- x86
+- arm
+clone_depth: 10
+install:
+ - cmd: Bcdedit.exe -set TESTSIGNING ON
+ # Configure logging
+ - cmd: reg import tools\windows\ThreadEtw.reg
+ - ps: Restart-Computer -Force
+ - ps: Start-Sleep -s 10
+before_build:
+ - cmd: ren "C:\Program Files (x86)\Windows Kits\10\include\00wdf" "wdf"
+build:
+ project: etc/visual-studio/openthread.sln
+ verbosity: minimal
+after_build:
+ - ps: $env:Platform2 = $env:Platform
+ - ps: If ($env:Platform2 -eq "x86") { $env:Platform2 = "Win32" }
+ # Set up the release directories
+ - cmd: .appveyor\make_release.cmd
+ # Install driver (only runs on x64)
+ - cmd: .appveyor\install_driver.cmd
+test_script:
+ # Run the unit tests
+ - cmd: .appveyor\run_unit_tests.cmd
+ # Run the tests for the driver (only runs on x64)
+ #- cmd: .appveyor\test_driver.cmd
+artifacts:
+- path: release
+ name: release
+- path: build\bin\AppPackages
+ name: app
diff --git a/.appveyor/install_driver.cmd b/.appveyor/install_driver.cmd
new file mode 100644
index 0000000..73e0742
--- /dev/null
+++ b/.appveyor/install_driver.cmd
@@ -0,0 +1,43 @@
+REM
+REM Copyright (c) 2016, The OpenThread Authors.
+REM All rights reserved.
+REM
+REM Redistribution and use in source and binary forms, with or without
+REM modification, are permitted provided that the following conditions are met:
+REM 1. Redistributions of source code must retain the above copyright
+REM notice, this list of conditions and the following disclaimer.
+REM 2. Redistributions in binary form must reproduce the above copyright
+REM notice, this list of conditions and the following disclaimer in the
+REM documentation and/or other materials provided with the distribution.
+REM 3. Neither the name of the copyright holder nor the
+REM names of its contributors may be used to endorse or promote products
+REM derived from this software without specific prior written permission.
+REM
+REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+REM AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+REM IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+REM ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+REM LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+REM CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+REM SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+REM INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+REM CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+REM ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+REM POSSIBILITY OF SUCH DAMAGE.
+REM
+
+IF NOT "%Platform%"=="x64" GOTO :EOF
+
+pushd %APPVEYOR_BUILD_FOLDER%\build\bin\%Platform2%\%Configuration%\sys
+
+REM Install the certifications to the cert stores
+certutil -addstore root otLwf.cer
+certutil -addstore TrustedPublisher otLwf.cer
+
+cd otLwf
+
+REM Install the NDIS LWF driver, otLwf.sys
+
+netcfg.exe -v -l otlwf.inf -c s -i otLwf
+
+popd
\ No newline at end of file
diff --git a/.appveyor/make_release.cmd b/.appveyor/make_release.cmd
new file mode 100644
index 0000000..bc69f2c
--- /dev/null
+++ b/.appveyor/make_release.cmd
@@ -0,0 +1,87 @@
+REM
+REM Copyright (c) 2016, The OpenThread Authors.
+REM All rights reserved.
+REM
+REM Redistribution and use in source and binary forms, with or without
+REM modification, are permitted provided that the following conditions are met:
+REM 1. Redistributions of source code must retain the above copyright
+REM notice, this list of conditions and the following disclaimer.
+REM 2. Redistributions in binary form must reproduce the above copyright
+REM notice, this list of conditions and the following disclaimer in the
+REM documentation and/or other materials provided with the distribution.
+REM 3. Neither the name of the copyright holder nor the
+REM names of its contributors may be used to endorse or promote products
+REM derived from this software without specific prior written permission.
+REM
+REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+REM AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+REM IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+REM ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+REM LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+REM CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+REM SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+REM INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+REM CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+REM ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+REM POSSIBILITY OF SUCH DAMAGE.
+REM
+
+pushd %APPVEYOR_BUILD_FOLDER%
+
+REM Make the release directories
+mkdir release
+mkdir release\include
+mkdir release\include\openthread\
+mkdir release\include\openthread\missing
+mkdir release\include\openthread\platform
+mkdir release\libs
+mkdir release\symbols
+mkdir release\symbols\TraceFormat
+
+REM Copy the relavant include headers
+
+copy include\openthread\commissioner.h release\include\openthread
+copy include\openthread\dataset.h release\include\openthread
+copy include\openthread\instance.h release\include\openthread
+copy include\openthread\ip6.h release\include\openthread
+copy include\openthread\joiner.h release\include\openthread
+copy include\openthread\link.h release\include\openthread
+copy include\openthread\message.h release\include\openthread
+copy include\openthread\netdata.h release\include\openthread
+copy include\openthread\openthread.h release\include\openthread
+copy include\openthread\thread.h release\include\openthread
+copy include\openthread\types.h release\include\openthread
+copy include\openthread\platform\toolchain.h release\include\openthread\platform
+copy src\missing\stdbool\stdbool.h release\include\openthread\missing
+copy src\missing\stdint\stdint.h release\include\openthread\missing
+
+REM Copy the relavant binaries
+
+copy build\bin\%Platform2%\%Configuration%\sys\otlwf\* release
+copy build\bin\%Platform2%\%Configuration%\sys\otlwf.cer release
+copy build\bin\%Platform2%\%Configuration%\sys\otlwf.pdb release\symbols
+copy build\bin\%Platform2%\%Configuration%\sys\ottmp\* release
+copy build\bin\%Platform2%\%Configuration%\sys\ottmp.cer release
+copy build\bin\%Platform2%\%Configuration%\sys\ottmp.pdb release\symbols
+copy build\bin\%Platform2%\%Configuration%\dll\otApi.dll release
+copy build\bin\%Platform2%\%Configuration%\dll\otApi.lib release\libs
+copy build\bin\%Platform2%\%Configuration%\dll\otApi.pdb release\symbols
+copy build\bin\%Platform2%\%Configuration%\dll\otNodeApi.dll release
+copy build\bin\%Platform2%\%Configuration%\dll\otNodeApi.lib release\libs
+copy build\bin\%Platform2%\%Configuration%\dll\otNodeApi.pdb release\symbols
+copy build\bin\%Platform2%\%Configuration%\exe\otCli.exe release
+copy build\bin\%Platform2%\%Configuration%\exe\otCli.pdb release\symbols
+copy build\bin\%Platform2%\%Configuration%\exe\otTestRunner.exe release
+copy build\bin\%Platform2%\%Configuration%\exe\otTestRunner.pdb release\symbols
+
+REM Copy the tools
+
+copy tools\windows\* release
+copy tools\windows\%Platform%\otInstall.exe release
+copy "C:\Program Files (x86)\Windows Kits\10\Tools\%Platform%\devcon.exe" release
+
+REM Generate the trace format files to decode the WPP logs
+
+"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\x64\TracePdb.exe" -f release\symbols\*.pdb -p release\symbols\TraceFormat
+
+popd
\ No newline at end of file
diff --git a/.appveyor/run_unit_tests.cmd b/.appveyor/run_unit_tests.cmd
new file mode 100644
index 0000000..c4f496c
--- /dev/null
+++ b/.appveyor/run_unit_tests.cmd
@@ -0,0 +1,31 @@
+REM
+REM Copyright (c) 2016, The OpenThread Authors.
+REM All rights reserved.
+REM
+REM Redistribution and use in source and binary forms, with or without
+REM modification, are permitted provided that the following conditions are met:
+REM 1. Redistributions of source code must retain the above copyright
+REM notice, this list of conditions and the following disclaimer.
+REM 2. Redistributions in binary form must reproduce the above copyright
+REM notice, this list of conditions and the following disclaimer in the
+REM documentation and/or other materials provided with the distribution.
+REM 3. Neither the name of the copyright holder nor the
+REM names of its contributors may be used to endorse or promote products
+REM derived from this software without specific prior written permission.
+REM
+REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+REM AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+REM IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+REM ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+REM LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+REM CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+REM SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+REM INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+REM CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+REM ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+REM POSSIBILITY OF SUCH DAMAGE.
+REM
+
+IF "%Platform%"=="arm" GOTO :EOF
+
+vstest.console /logger:Appveyor /inIsolation /platform:%Platform% build\bin\%Platform2%\%Configuration%\dll\UnitTests.dll
\ No newline at end of file
diff --git a/.appveyor/test_driver.cmd b/.appveyor/test_driver.cmd
new file mode 100644
index 0000000..7425419
--- /dev/null
+++ b/.appveyor/test_driver.cmd
@@ -0,0 +1,47 @@
+REM
+REM Copyright (c) 2016, The OpenThread Authors.
+REM All rights reserved.
+REM
+REM Redistribution and use in source and binary forms, with or without
+REM modification, are permitted provided that the following conditions are met:
+REM 1. Redistributions of source code must retain the above copyright
+REM notice, this list of conditions and the following disclaimer.
+REM 2. Redistributions in binary form must reproduce the above copyright
+REM notice, this list of conditions and the following disclaimer in the
+REM documentation and/or other materials provided with the distribution.
+REM 3. Neither the name of the copyright holder nor the
+REM names of its contributors may be used to endorse or promote products
+REM derived from this software without specific prior written permission.
+REM
+REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+REM AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+REM IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+REM ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+REM LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+REM CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+REM SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+REM INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+REM CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+REM ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+REM POSSIBILITY OF SUCH DAMAGE.
+REM
+
+IF NOT "%Platform%"=="x64" GOTO :EOF
+
+pushd %APPVEYOR_BUILD_FOLDER%\release
+
+REM Query the driver state
+
+sc query otlwf
+
+REM Run the basic driver test
+
+otTestRunner.exe ..\tests\scripts\thread-cert Test_otLwf* appveyor
+
+REM Grab the logs
+
+mkdir logs
+logman stop Thread -ets
+copy %SystemRoot%\System32\LogFiles\WMI\Thread.* logs
+
+popd
\ No newline at end of file
diff --git a/.astyle/astyle-opts b/.astyle/astyle-opts
new file mode 100644
index 0000000..3bebecd
--- /dev/null
+++ b/.astyle/astyle-opts
@@ -0,0 +1,16 @@
+--style=allman
+--max-code-length=120
+--max-instatement-indent=100
+--attach-namespaces --attach-inlines
+--attach-extern-c
+--min-conditional-indent=0
+--break-blocks
+--pad-oper
+--pad-header
+--unpad-paren
+--align-pointer=name
+--add-brackets
+--keep-one-line-blocks
+--convert-tabs
+--break-after-logical
+--formatted
diff --git a/.astyle/astyle-wrap.sh b/.astyle/astyle-wrap.sh
new file mode 100755
index 0000000..d530450
--- /dev/null
+++ b/.astyle/astyle-wrap.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Copyright (c) 2016, The OpenThread Authors.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# astye does not return a non-zero exit code. This wrapper exists with a
+# non-zero exit code if there is any output from astyle.
+#
+
+die() {
+ echo " *** ERROR: " $*
+ exit 1
+}
+
+set -x
+
+[ -z "`$@`" ] || {
+ [ "$3" != "--dry-run" ] || die
+}
diff --git a/.codecov.yml b/.codecov.yml
new file mode 100644
index 0000000..6e21a7f
--- /dev/null
+++ b/.codecov.yml
@@ -0,0 +1,8 @@
+coverage:
+ ignore:
+ - "tests/*"
+ - "third_party/*"
+
+ status:
+ project: false
+ patch: false
diff --git a/.default-version b/.default-version
new file mode 100644
index 0000000..7626585
--- /dev/null
+++ b/.default-version
@@ -0,0 +1 @@
+0.01.00
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..eaad68c
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,45 @@
+# Auto normalize all files which appear to be text files.
+* text=auto
+
+# Auto normalize files which are explicitly text
+*.[ch] text
+*.[ch]pp text
+*.txt text
+*.md text
+*.yml text
+*.html text
+*.py text
+
+# Files which are explicitly binary
+*.gz binary !eol
+*.xz binary !eol
+*.bz2 binary !eol
+*.tar binary !eol
+*.png binary !eol
+*.jpg binary !eol
+*.gif binary !eol
+
+# Files normalized to always keep Unix line endings
+.default-version eol=lf
+bootstrap* eol=lf
+config.guess eol=lf
+config.status eol=lf
+configure eol=lf
+libtool eol=lf
+libtoolize eol=lf
+autoreconf eol=lf
+mkversion eol=lf
+*.sh eol=lf
+*-sh eol=lf
+*.m4 eol=lf
+configure.ac eol=lf
+Makefile.am eol=lf
+Makefile.in eol=lf
+Makefile eol=lf
+
+# Files normalized to always keep Windows line endings
+*.vcxproj eol=crlf
+*.vcxproj.filters eol=crlf
+*.sln eol=crlf
+*.rc text eol=crlf
+*.inf text eol=crlf
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..30c0e64
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,7 @@
+GitHub Issues are for bugs and feature requests. To make bugs and feature requests more easy to find and organize, we close issues that are deemed out of scope for GitHub Issues.
+
+Usage questions? Post questions to [Stack Overflow](http://stackoverflow.com/) using the [[openthread] tag](http://stackoverflow.com/questions/tagged/openthread). We also use Google Groups for discussion and announcements:
+
+* [openthread-announce](https://groups.google.com/forum/#!forum/openthread-announce) - subscribe for release notes and new updates on OpenThread
+* [openthread-users](https://groups.google.com/forum/#!forum/openthread-users) - the best place for users to discuss OpenThread and interact with the OpenThread team
+* [openthread-devel](https://groups.google.com/forum/#!forum/openthread-devel) - team members discuss the on-going development of OpenThread
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..c23efd7
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,96 @@
+#
+# Copyright (c) 2016, The OpenThread Authors.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+language: generic
+
+sudo: required
+dist: trusty
+
+before_install:
+ - .travis/before_install.sh
+
+script:
+ - .travis/script.sh
+
+after_success:
+ - bash <(curl -s https://codecov.io/bash)
+
+matrix:
+ include:
+ - env: BUILD_TARGET="pretty-check"
+ os: linux
+ - env: BUILD_TARGET="scan-build" CC="clang" CXX="clang++"
+ os: linux
+ compiler: clang
+ - env: BUILD_TARGET="arm-gcc49"
+ os: linux
+ compiler: gcc
+ - env: BUILD_TARGET="arm-gcc54"
+ os: linux
+ compiler: gcc
+ - env: BUILD_TARGET="arm-gcc63"
+ os: linux
+ compiler: gcc
+ - env: BUILD_TARGET="posix" CC="clang" CXX="clang++"
+ os: linux
+ compiler: clang
+ - env: BUILD_TARGET="posix" CC="gcc" CXX="g++"
+ os: linux
+ compiler: gcc
+ - env: BUILD_TARGET="posix" CC="gcc-5" CXX="g++-5"
+ os: linux
+ compiler: gcc
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gcc-5
+ - g++-5
+ - env: BUILD_TARGET="posix" CC="gcc-6" CXX="g++-6"
+ os: linux
+ compiler: gcc
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gcc-6
+ - g++-6
+ - env: BUILD_TARGET="posix-distcheck" VERBOSE=1
+ os: linux
+ compiler: clang
+ - env: BUILD_TARGET="posix-32-bit" VERBOSE=1
+ os: linux
+ compiler: gcc
+ - env: BUILD_TARGET="posix-ncp-spi" VERBOSE=1
+ os: linux
+ compiler: gcc
+ - env: BUILD_TARGET="posix-ncp" VERBOSE=1
+ os: linux
+ compiler: gcc
diff --git a/.travis/before_install.sh b/.travis/before_install.sh
new file mode 100755
index 0000000..087e508
--- /dev/null
+++ b/.travis/before_install.sh
@@ -0,0 +1,111 @@
+#!/bin/sh
+#
+# Copyright (c) 2016, The OpenThread Authors.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+die() {
+ echo " *** ERROR: " $*
+ exit 1
+}
+
+set -x
+
+cd /tmp || die
+
+[ $TRAVIS_OS_NAME != linux ] || {
+ sudo apt-get update || die
+
+ [ $BUILD_TARGET != posix-distcheck -a $BUILD_TARGET != posix-32-bit -a $BUILD_TARGET != posix-ncp ] || {
+ pip install --upgrade pip || die
+ pip install --user -r $TRAVIS_BUILD_DIR/tests/scripts/thread-cert/requirements.txt || die
+ [ $BUILD_TARGET != posix-ncp ] || {
+ # Packages used by ncp tools.
+ pip install --user git+https://github.com/openthread/pyspinel || die
+ }
+ }
+
+ [ $BUILD_TARGET != pretty-check ] || {
+ wget http://jaist.dl.sourceforge.net/project/astyle/astyle/astyle%202.05.1/astyle_2.05.1_linux.tar.gz || die
+ tar xzvf astyle_2.05.1_linux.tar.gz || die
+ cd astyle/build/gcc || die
+ LDFLAGS=" " make || die
+ cd ../../..
+ export PATH=/tmp/astyle/build/gcc/bin:$PATH || die
+ astyle --version || die
+ }
+
+ [ $BUILD_TARGET != scan-build ] || {
+ sudo apt-get install clang || die
+ }
+
+ [ $BUILD_TARGET != arm-gcc49 ] || {
+ sudo apt-get install lib32z1 || die
+ wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 || die
+ tar xjf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 || die
+ export PATH=/tmp/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH || die
+ arm-none-eabi-gcc --version || die
+ }
+
+ [ $BUILD_TARGET != arm-gcc54 ] || {
+ sudo apt-get install lib32z1 || die
+ wget https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q3-update/+download/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 || die
+ tar xjf gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 || die
+ export PATH=/tmp/gcc-arm-none-eabi-5_4-2016q3/bin:$PATH || die
+ arm-none-eabi-gcc --version || die
+ }
+
+ [ $BUILD_TARGET != arm-gcc63 ] || {
+ wget https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2017.03-rc2/arc_gnu_2017.03-rc2_prebuilt_elf32_le_linux_install.tar.gz || die
+ tar xzf arc_gnu_2017.03-rc2_prebuilt_elf32_le_linux_install.tar.gz
+ export PATH=/tmp/arc_gnu_2017.03-rc2_prebuilt_elf32_le_linux_install/bin:$PATH || die
+ arc-elf32-gcc --version || die
+ }
+
+ [ $BUILD_TARGET != posix-32-bit ] || {
+ sudo apt-get install g++-multilib || die
+ }
+
+ [ $BUILD_TARGET != posix-distcheck ] || {
+ sudo apt-get install clang || die
+ sudo apt-get install llvm-3.4-runtime || die
+ }
+
+ [ $BUILD_TARGET != posix -o $CC != clang ] || {
+ sudo apt-get install clang || die
+ }
+}
+
+[ $TRAVIS_OS_NAME != osx ] || {
+ sudo easy_install pexpect || die
+
+ [ $BUILD_TARGET != cc2538 ] || {
+ wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-mac.tar.bz2 || die
+ tar xjf gcc-arm-none-eabi-4_9-2015q3-20150921-mac.tar.bz2 || die
+ export PATH=/tmp/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH || die
+ arm-none-eabi-gcc --version || die
+ }
+}
diff --git a/.travis/script.sh b/.travis/script.sh
new file mode 100755
index 0000000..00cd393
--- /dev/null
+++ b/.travis/script.sh
@@ -0,0 +1,204 @@
+#!/bin/sh
+#
+# Copyright (c) 2016, The OpenThread Authors.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+die() {
+ echo " *** ERROR: " $*
+ exit 1
+}
+
+set -x
+
+[ $BUILD_TARGET != pretty-check ] || {
+ export PATH=/tmp/astyle/build/gcc/bin:$PATH || die
+ ./bootstrap || die
+ ./configure || die
+ make pretty-check || die
+}
+
+[ $BUILD_TARGET != scan-build ] || {
+ ./bootstrap || die
+ scan-build ./configure \
+ --enable-cli-app=all \
+ --enable-ncp-app=all \
+ --with-ncp-bus=uart \
+ --enable-diag \
+ --enable-default-logging \
+ --enable-raw-link-api=yes \
+ --with-examples=posix \
+ --with-platform-info=POSIX \
+ --enable-application-coap \
+ --enable-border-agent-proxy \
+ --enable-cert-log \
+ --enable-commissioner \
+ --enable-dhcp6-client \
+ --enable-dhcp6-server \
+ --enable-dns-client \
+ --enable-jam-detection \
+ --enable-joiner \
+ --enable-legacy \
+ --enable-mac-whitelist \
+ --enable-mtd-network-diagnostic || die
+ scan-build --status-bugs -analyze-headers -v make || die
+}
+
+[ $BUILD_TARGET != arm-gcc49 ] || {
+ export PATH=/tmp/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-cc2538 || die
+ arm-none-eabi-size output/cc2538/bin/ot-cli-ftd || die
+ arm-none-eabi-size output/cc2538/bin/ot-cli-mtd || die
+ arm-none-eabi-size output/cc2538/bin/ot-ncp-ftd || die
+ arm-none-eabi-size output/cc2538/bin/ot-ncp-mtd || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-da15000 || die
+ arm-none-eabi-size output/da15000/bin/ot-cli-ftd || die
+ arm-none-eabi-size output/da15000/bin/ot-cli-mtd || die
+ arm-none-eabi-size output/da15000/bin/ot-ncp-ftd || die
+ arm-none-eabi-size output/da15000/bin/ot-ncp-mtd || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-kw41z || die
+ arm-none-eabi-size output/kw41z/bin/ot-cli-ftd || die
+ arm-none-eabi-size output/kw41z/bin/ot-cli-mtd || die
+ arm-none-eabi-size output/kw41z/bin/ot-ncp-ftd || die
+ arm-none-eabi-size output/kw41z/bin/ot-ncp-mtd || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-nrf52840 || die
+ arm-none-eabi-size output/nrf52840/bin/ot-cli-ftd || die
+ arm-none-eabi-size output/nrf52840/bin/ot-cli-mtd || die
+ arm-none-eabi-size output/nrf52840/bin/ot-ncp-ftd || die
+ arm-none-eabi-size output/nrf52840/bin/ot-ncp-mtd || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ make -f examples/Makefile-cc2650 || die
+ arm-none-eabi-size output/cc2650/bin/ot-cli-mtd || die
+ arm-none-eabi-size output/cc2650/bin/ot-ncp-mtd || die
+}
+
+[ $BUILD_TARGET != arm-gcc54 ] || {
+ export PATH=/tmp/gcc-arm-none-eabi-5_4-2016q3/bin:$PATH || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-cc2538 || die
+ arm-none-eabi-size output/cc2538/bin/ot-cli-ftd || die
+ arm-none-eabi-size output/cc2538/bin/ot-cli-mtd || die
+ arm-none-eabi-size output/cc2538/bin/ot-ncp-ftd || die
+ arm-none-eabi-size output/cc2538/bin/ot-ncp-mtd || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-da15000 || die
+ arm-none-eabi-size output/da15000/bin/ot-cli-ftd || die
+ arm-none-eabi-size output/da15000/bin/ot-cli-mtd || die
+ arm-none-eabi-size output/da15000/bin/ot-ncp-ftd || die
+ arm-none-eabi-size output/da15000/bin/ot-ncp-mtd || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-kw41z || die
+ arm-none-eabi-size output/kw41z/bin/ot-cli-ftd || die
+ arm-none-eabi-size output/kw41z/bin/ot-cli-mtd || die
+ arm-none-eabi-size output/kw41z/bin/ot-ncp-ftd || die
+ arm-none-eabi-size output/kw41z/bin/ot-ncp-mtd || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-nrf52840 || die
+ arm-none-eabi-size output/nrf52840/bin/ot-cli-ftd || die
+ arm-none-eabi-size output/nrf52840/bin/ot-cli-mtd || die
+ arm-none-eabi-size output/nrf52840/bin/ot-ncp-ftd || die
+ arm-none-eabi-size output/nrf52840/bin/ot-ncp-mtd || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ make -f examples/Makefile-cc2650 || die
+ arm-none-eabi-size output/cc2650/bin/ot-cli-mtd || die
+ arm-none-eabi-size output/cc2650/bin/ot-ncp-mtd || die
+}
+
+[ $BUILD_TARGET != arm-gcc63 ] || {
+ export PATH=/tmp/arc_gnu_2017.03-rc2_prebuilt_elf32_le_linux_install/bin:$PATH || die
+
+ git checkout -- . || die
+ git clean -xfd || die
+ ./bootstrap || die
+ COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-emsk || die
+ arc-elf32-size output/emsk/bin/ot-cli-ftd || die
+ arc-elf32-size output/emsk/bin/ot-cli-mtd || die
+ arc-elf32-size output/emsk/bin/ot-ncp-ftd || die
+ arc-elf32-size output/emsk/bin/ot-ncp-mtd || die
+}
+
+[ $BUILD_TARGET != posix ] || {
+ sh -c '$CC --version' || die
+ sh -c '$CXX --version' || die
+ ./bootstrap || die
+ make -f examples/Makefile-posix || die
+}
+
+[ $BUILD_TARGET != posix-distcheck ] || {
+ export ASAN_SYMBOLIZER_PATH=`which llvm-symbolizer-3.4` || die
+ export ASAN_OPTIONS=symbolize=1 || die
+ ./bootstrap || die
+ make -f examples/Makefile-posix distcheck || die
+}
+
+[ $BUILD_TARGET != posix-32-bit ] || {
+ ./bootstrap || die
+ COVERAGE=1 CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 make -f examples/Makefile-posix check || die
+}
+
+[ $BUILD_TARGET != posix-ncp-spi ] || {
+ ./bootstrap || die
+ make -f examples/Makefile-posix check configure_OPTIONS="--enable-ncp-app=ftd --with-ncp-bus=spi --with-examples=posix --with-platform-info=POSIX" || die
+}
+
+[ $BUILD_TARGET != posix-ncp ] || {
+ ./bootstrap || die
+ COVERAGE=1 NODE_TYPE=ncp-sim make -f examples/Makefile-posix check || die
+}
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..70ab4bc
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,16 @@
+# This is the official list of OpenThread authors for copyright purposes.
+#
+# This does not necessarily list everyone who has contributed code, since in
+# some cases, their employer may be the copyright holder. To see the full list
+# of contributors, see the revision history in source control or
+# https://github.com/openthread/openthread/graphs/contributors
+#
+# Authors who wish to be recognized in this file should add themselves (or
+# their employer, as appropriate).
+
+Nest Labs, Inc.
+Microsoft Corporation
+Nordic Semiconductor
+Texas Instruments Incorporated
+NXP Semiconductors
+Synopsys, Inc.
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..c721749
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,74 @@
+# OpenThread Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, gender identity and expression, level of experience,
+nationality, personal appearance, race, religion, or sexual identity and
+orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at openthread-conduct@google.com. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..ce62736
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,142 @@
+# Contributing to OpenThread
+
+We would love for you to contribute to OpenThread and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow.
+
+* [1 Code of Conduct](#code-of-conduct)
+* [2 Bugs](#bugs)
+* [3 New Features](#new-features)
+* [4 Contributing Code](#contributing-code)
+ * [4.1 Initial Setup](#initial-setup)
+ * [4.2 Contributor License Agreement (CLA)](#contributor-license-agreement--cla-)
+ * [4.3 Submitting a Pull Request](#submitting-a-pull-request)
+
+## Code of Conduct
+
+Help us keep OpenThread open and inclusive. Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).
+
+## Bugs
+
+If you find a bug in the source code, you can help us by [submitting a GitHub Issue](https://github.com/openthread/openthread/issues/new). The best bug reports provide a detailed description of the issue and step-by-step instructions for predictably reproducing the issue. Even better, you can [submit a Pull Request](#submitting-a-pull-request) with a fix.
+
+## New Features
+
+You can request a new feature by [submitting a GitHub Issue](https://github.com/openthread/openthread/issues/new).
+
+If you would like to implement a new feature, please consider the scope of the new feature:
+
+* *Large feature*: first [submit a GitHub Issue](https://github.com/openthread/openthread/issues/new) and communicate your proposal so that the community can review and provide feedback. Getting early feedback will help ensure your implementation work is accepted by the community. This will also allow us to better coordinate our efforts and minimize duplicated effort.
+
+* *Small feature*: can be implemented and directly [submitted as a Pull Request](#submitting-a-pull-request).
+
+## Contributing Code
+
+The OpenThread Project follows the "Fork-and-Pull" model for accepting contributions.
+
+### Initial Setup
+
+Setup your GitHub fork and continuous-integration services:
+
+1. Fork the [OpenThread repository](https://github.com/openthread/openthread) by clicking "Fork" on the web UI.
+2. Enable [Travis CI](https://travis-ci.org/) and [AppVeyor](https://ci.appveyor.com/) by logging in the respective services with your GitHub account and enabling your newly created fork. We use Travis CI for Linux-based continuous integration checks and AppVeyor for Windows-based continuous integration checks. All contributions must pass these checks to be accepted.
+
+Setup your local development environment:
+
+```bash
+# Clone your fork
+git clone git@github.com:<username>/openthread.git
+
+# Configure upstream alias
+git remote add upstream git@github.com:openthread/openthread.git
+```
+
+### Contributor License Agreement (CLA)
+
+The OpenThread Project requires all contributors to sign a Contributor License Agreement ([individual](https://developers.google.com/open-source/cla/individual) or [corporate](https://developers.google.com/open-source/cla/corporate)) in order to protect contributors, users, and Google in issues of intellectual property.
+
+With each Pull Request, an automated check occurs to verify that you have signed the CLA. Make sure that you sign the CLA with the same email address associated with your commits (i.e. via the `user.email` Git config as described on GitHub's [Set up Git](https://help.github.com/articles/set-up-git/) page.
+
+NOTE: Only original source code from you and other people that have signed the CLA can be accepted into the repository. This policy does not apply to [third_party](https://github.com/openthread/openthread/tree/master/third_party).
+
+
+### Submitting a Pull Request
+
+#### Branch
+
+For each new feature, create a working branch:
+
+```bash
+# Create a working branch for your new feature
+git branch --track <branch-name> origin/master
+
+# Checkout the branch
+git checkout <branch-name>
+```
+
+#### Create Commits
+
+```bash
+# Add each modified file you'd like to include in the commit
+git add <file1> <file2>
+
+# Create a commit
+git commit
+```
+
+This will open up a text editor where you can craft your commit message.
+
+#### Upstream Sync and Clean Up
+
+Prior to submitting your pull request, you might want to do a few things to clean up your branch and make it as simple as possible for the original repo's maintainer to test, accept, and merge your work.
+
+If any commits have been made to the upstream master branch, you should rebase your development branch so that merging it will be a simple fast-forward that won't require any conflict resolution work.
+
+```bash
+# Fetch upstream master and merge with your repo's master branch
+git checkout master
+git pull upstream master
+
+# If there were any new commits, rebase your development branch
+git checkout <branch-name>
+git rebase master
+```
+
+Now, it may be desirable to squash some of your smaller commits down into a small number of larger more cohesive commits. You can do this with an interactive rebase:
+
+```bash
+# Rebase all commits on your development branch
+git checkout
+git rebase -i master
+```
+
+This will open up a text editor where you can specify which commits to squash.
+
+#### Coding Conventions and Style
+
+OpenThread uses and enforces the [OpenThread Coding Conventions and Style](STYLE_GUIDE.md) on all code, except for code located in [third_party](third_party).
+
+As part of the cleanup process, you should also run `make pretty-check` to ensure that your code passes the baseline code style checks.
+
+```bash
+./bootstrap
+./configure --enable-ftd --enable-cli --enable-diag --enable-dhcp6-client --enable-dhcp6-server --enable-commissioner --enable-joiner --with-examples=posix
+make pretty-check
+
+```
+
+Make sure to include any code format changes in your commits.
+
+#### Push and Test
+
+```bash
+# Checkout your branch
+git checkout <branch-name>
+
+# Push to your GitHub fork:
+git push origin <branch-name>
+```
+
+This will trigger the Travis CI and AppVeyor continuous-integration checks. You can view the results in the respective services. Note that the integration checks will report failures on occasion. If a failure occurs, you may try rerunning the test via the Travis and/or AppVeyor web UI.
+
+#### Submit Pull Request
+
+Once you've validated the Travis CI and AppVeyor results, go to the page for your fork on GitHub, select your development branch, and click the pull request button. If you need to make any adjustments to your pull request, just push the updates to GitHub. Your pull request will automatically track the changes on your development branch and update.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8417008
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,25 @@
+Copyright (c) 2016, The OpenThread Authors.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the copyright holder nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..81861e6
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,204 @@
+#
+# Copyright (c) 2016, The OpenThread Authors.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
+
+AM_MAKEFLAGS = --no-print-directory
+
+AM_DISTCHECK_CONFIGURE_FLAGS = \
+ --enable-address-sanitizer \
+ --enable-cli-app=all \
+ --enable-ncp-app=all \
+ --with-ncp-bus=uart \
+ --enable-diag \
+ --with-examples=posix \
+ --enable-commissioner \
+ --enable-joiner \
+ --enable-dhcp6-client \
+ --enable-dhcp6-server \
+ --enable-dns-client \
+ --enable-application-coap \
+ --enable-border-router \
+ $(NULL)
+
+SUBDIRS = \
+ include \
+ src \
+ third_party \
+ examples \
+ tests \
+ tools \
+ doc \
+ $(NULL)
+
+EXTRA_DIST = \
+ .astyle/astyle-opts \
+ .astyle/astyle-wrap.sh \
+ .default-version \
+ bootstrap \
+ etc \
+ README.md \
+ NOTICE \
+ CONTRIBUTING.md \
+ LICENSE \
+ $(NULL)
+
+BUILT_SOURCES = \
+ .local-version \
+ $(NULL)
+
+dist_doc_DATA = \
+ $(NULL)
+
+DISTCLEANFILES = \
+ .local-version \
+ $(NULL)
+
+PRETTY_SUBDIRS = \
+ examples \
+ include \
+ src \
+ tests \
+ tools \
+ $(NULL)
+
+# Ignore the pseudo flash files on Posix platform during diskcheck
+distcleancheck_listfiles = \
+ $(AM_V_at)find . -type f -name "*flash"
+
+#
+# Package version files:
+#
+# .default-version - The default package version. This file is ALWAYS checked
+# in and should always represent the current baseline
+# version of the package.
+#
+# .dist-version - The distributed package version. This file is NEVER
+# checked in within the upstream repository, is auto-
+# generated, and is only found in the package distribution.
+#
+# .local-version - The current source code controlled package version. This
+# file is NEVER checked in within the upstream repository,
+# is auto-generated, and can always be found in both the
+# build tree and distribution.
+#
+# When present, the .local-version file is preferred first, the
+# .dist-version second, and the .default-version last.
+#
+
+VERSION_FILE := $(if $(wildcard $(builddir)/.local-version),$(builddir)/.local-version,$(if $(wildcard $(srcdir)/.dist-version),$(srcdir)/.dist-version,$(srcdir)/.default-version))
+
+#
+# Override autotool's default notion of the package version variables.
+# This ensures that when we create a source distribution that the
+# version is always the current version, not the version when the
+# package was bootstrapped.
+#
+
+OPENTHREAD_VERSION ?= $(shell cat $(VERSION_FILE) 2> /dev/null)
+
+PACKAGE_VERSION = $(OPENTHREAD_VERSION)
+VERSION = $(PACKAGE_VERSION)
+
+distdir = $(PACKAGE)-$(shell \
+if [ "$(origin OPENTHREAD_VERSION)" != "file" ]; then \
+ echo "$(OPENTHREAD_VERSION)" ; \
+else \
+ $(abs_top_nlbuild_autotools_dir)/scripts/mkversion \
+ -b "$(OPENTHREAD_VERSION)" "$(top_srcdir)"; \
+fi )
+
+#
+# check-file-.local-version
+#
+# Speculatively regenerate .local-version and check to see if it needs
+# to be updated.
+#
+# If OPENTHREAD_VERSION has been supplied anywhere other than in this file
+# (which is implicitly the contents of .local-version), then use that;
+# otherwise, attempt to generate it from the SCM system.
+#
+# This is called from $(call check-file,.local-version).
+#
+define check-file-.local-version
+if [ "$(origin OPENTHREAD_VERSION)" != "file" ]; then \
+ echo "$(OPENTHREAD_VERSION)" > "$(2)"; \
+else \
+ $(abs_top_nlbuild_autotools_dir)/scripts/mkversion \
+ -b "$(OPENTHREAD_VERSION)" "$(top_srcdir)" \
+ > "$(2)"; \
+fi
+endef
+
+#
+# check-file-.dist-version
+#
+# Speculatively regenerate .dist-version and check to see if it needs
+# to be updated.
+#
+# This is called from $(call check-file,.dist-version).
+#
+define check-file-.dist-version
+cat "$(1)" > "$(2)"
+endef
+
+#
+# A convenience target to allow package users to easily rerun the
+# package configuration according to the current configuration.
+#
+.PHONY: reconfigure
+reconfigure: $(builddir)/config.status
+ $(AM_V_at)$(<) --recheck
+
+#
+# Version file regeneration rules.
+#
+.PHONY: force
+
+$(builddir)/.local-version: $(srcdir)/.default-version force
+
+$(distdir)/.dist-version: $(builddir)/.local-version force
+
+$(distdir)/.dist-version $(builddir)/.local-version:
+ $(call check-file,$(@F))
+
+dist distcheck: $(BUILT_SOURCES)
+
+dist-hook: $(distdir)/.dist-version
+
+#
+# Top-level convenience target for making a documentation-only
+# distribution whose results appear at the top level of the build tree
+# in the same fashion that the distribution would be for 'make dist'.
+#
+
+.PHONY: docdist
+docdist: $(BUILT_SOURCES)
+ $(MAKE) -C doc docdistdir=$(abs_builddir) $(@)
+
+include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..6c1dad8
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,19 @@
+OpenThread is an open source implementation of the Thread 1.0.1 Final Specification.
+The Thread 1.0.1 Final Specification is promulgated by the Thread Group. The Thread
+Group is a non-profit organization formed for the purposes of defining one or
+more specifications, best practices, reference architectures, implementation
+guidelines and certification programs to promote the availability of compliant
+implementations of the Thread protocol. Information on becoming a Member, including
+information about the benefits thereof, can be found at http://threadgroup.org.
+
+OpenThread is not affiliated with or endorsed by the Thread Group. Implementation
+of this OpenThread code does not assure compliance with the Thread 1.0.1 Final
+Specification and does not convey the right to identify any final product as Thread
+certified. Members of the Thread Group may hold patents and other intellectual
+property rights relating to the Thread 1.0.1 Final Specification, ownership and
+licenses of which are subject to the Thread Group’s IP Policies, and not this license.
+
+The included copyright to the OpenThread code is subject to the license in the
+LICENSE file, and all other rights and licenses are expressly reserved.
+No warranty or assurance is made with respect to additional rights that may be
+required to implement this code.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..213bf7f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,184 @@
+[![OpenThread][ot-logo]][ot-repo]
+[![Build Status][ot-travis-svg]][ot-travis]
+[![Build Status][ot-appveyor-svg]][ot-appveyor]
+[![Coverage Status][ot-codecov-svg]][ot-codecov]
+
+---
+
+# What is OpenThread?
+
+OpenThread is...
+<a href="http://threadgroup.org/technology/ourtechnology#certifiedproducts">
+<img src="https://cdn.rawgit.com/openthread/openthread/ab4c4e1e/doc/images/certified.svg" alt="Thread Certified Component" width="150px" align="right">
+</a>
+
+**...an open-source implementation of the [Thread](http://threadgroup.org/technology/ourtechnology) networking protocol.** Nest has released OpenThread to make the technology used in Nest products more broadly available to developers to accelerate the development of products for the connected home.
+
+**...OS and platform agnostic**, with a narrow platform abstraction layer and a small memory footprint, making it highly portable.
+
+**...a Thread Certified Component**, implementing all features defined in the [Thread 1.1.1 specification](http://threadgroup.org/technology/ourtechnology#specifications). This specification defines an IPv6-based reliable, secure and low-power wireless device-to-device communication protocol for home applications.
+
+More information about Thread can be found on [threadgroup.org](http://threadgroup.org/).
+
+[thread]: http://threadgroup.org/technology/ourtechnology
+[ot-repo]: https://github.com/openthread/openthread
+[ot-logo]: doc/images/openthread_logo.png
+[ot-travis]: https://travis-ci.org/openthread/openthread
+[ot-travis-svg]: https://travis-ci.org/openthread/openthread.svg?branch=master
+[ot-appveyor]: https://ci.appveyor.com/project/jwhui/openthread
+[ot-appveyor-svg]: https://ci.appveyor.com/api/projects/status/r5qwyhn9p26nmfk3?svg=true
+[ot-codecov]: https://codecov.io/gh/openthread/openthread
+[ot-codecov-svg]: https://codecov.io/gh/openthread/openthread/branch/master/graph/badge.svg
+
+# Get started with OpenThread
+
+<a href="https://codelabs.developers.google.com/codelabs/openthread-simulation/index.html">
+<img src="doc/images/ot-codelab.png" alt="OpenThread Codelab" width="300px" align="right">
+</a>
+
+Want to try OpenThread? The quickest way to get started is to run through our [Simulation Codelab](https://codelabs.developers.google.com/codelabs/openthread-simulation/index.html), which covers all the basics, without the need for test hardware. Using VirtualBox and Vagrant on a Mac or Linux machine, you will learn:
+
+* How to set up the OpenThread build toolchain
+* How to simulate a Thread network
+* How to authenticate Thread nodes with Commissioning
+* How to use `wpantund` to manage a simulated Thread network featuring an NCP
+
+### Next Steps
+
+The Codelab shows you how easy it is use to OpenThread to simulate a Thread network. Once complete:
+
+1. Learn more about the [OpenThread architecture and features](#openthread-features)
+1. Get familiar with [platforms and devices that support OpenThread](#who-supports-openthread)
+1. See what [testing tools](#what-tools-are-available-for-testing) are available
+1. Learn [where to get help](#need-help) and [how to contribute](#want-to-contribute) to the ongoing development of OpenThread
+
+# OpenThread Features
+
+OpenThread implements all features defined in the [Thread 1.1.1 specification](http://threadgroup.org/technology/ourtechnology#specifications), including all Thread networking layers (IPv6, 6LoWPAN, IEEE 802.15.4 with MAC security, Mesh Link Establishment, Mesh Routing) and device roles, as well as [Border Router](https://github.com/openthread/borderrouter) support.
+
+OpenThread supports both system-on-chip (SoC) and network co-processor (NCP) designs. Other features and enhancements include:
+
+* Application support and services
+ * IPv6 configuration and raw data interface
+ * UDP sockets
+ * CoAP client and server
+ * DHCPv6 client and server
+ * DNSv6 client
+ * Command Line Interface (CLI)
+* NCP support
+ * Spinel - general purpose NCP protocol
+ * `wpantund` - user-space NCP network interface driver/daemon
+ * Sniffer support via NCP Spinel nodes
+* Border Router
+ * Web UI for configuration and management
+ * Thread Border Agent to support an External Commissioner
+ * NAT64 for connecting to IPv4 networks
+ * Thread interface driver using `wpantund`
+
+### What's coming?
+
+The development of OpenThread is ongoing to provide additional features not available in the standard. Check back regularly for new updates, or visit the [openthread-announce](https://groups.google.com/forum/#!forum/openthread-announce) Google Group.
+
+# Who supports OpenThread?
+
+Led by Nest, the following companies are contributing to the ongoing development of OpenThread:
+
+<a href="https://www.arm.com/"><img src="doc/images/ot-contrib-arm.png" alt="ARM" width="200px"></a><a href="http://www.atmel.com/"><img src="doc/images/ot-contrib-atmel.png" alt="Atmel" width="200px"></a><a href="http://www.dialog-semiconductor.com/"><img src="doc/images/ot-contrib-dialog.png" alt="Dialog" width="200px"></a><a href="https://www.microsoft.com/en-us/"><img src="doc/images/ot-contrib-ms.png" alt="Microsoft" width="200px"></a><a href="https://nest.com/"><img src="doc/images/ot-contrib-nest.png" alt="Nest" width="200px"></a><a href="http://www.nordicsemi.com/"><img src="doc/images/ot-contrib-nordic.png" alt="Nordic" width="200px"></a><a href="http://www.nxp.com/"><img src="doc/images/ot-contrib-nxp.png" alt="NXP" width="200px"></a><a href="https://www.qualcomm.com/"><img src="doc/images/ot-contrib-qc.png" alt="Qualcomm" width="200px"></a><a href="https://www.synopsys.com/"><img src="doc/images/ot-contrib-synopsys.png" alt="Synopsys" width="200px"></a><a href="https://www.ti.com/"><img src="doc/images/ot-contrib-ti.png" alt="Texas Instruments" width="200px"></a>
+
+OpenThread has been ported to several devices and platforms by both the OpenThread team and the community. Build examples for all supported platforms are included in the OpenThread project.
+
+### IEEE 802.15.4 Platform Support
+
+* [Dialog Semiconductor DA15000](https://github.com/openthread/openthread/wiki/Platforms#dialog-da15000)
+* [Nordic Semiconductor nRF52840](https://github.com/openthread/openthread/wiki/Platforms#nordic-semiconductor-nrf52840)
+* [NXP KW41Z](https://github.com/openthread/openthread/wiki/Platforms#nxp-kw41z)
+* [Silicon Labs EFR32](https://github.com/openthread/openthread/wiki/Platforms#silicon-labs-efr32)
+* [Synopsys ARC EMSK with Microchip MRF24J40](https://github.com/openthread/openthread/wiki/Platforms#synopsys-arc-em-with-microchip-mrf24j40)
+* [Texas Instruments CC2538](https://github.com/openthread/openthread/wiki/Platforms#texas-instruments-cc2538)
+* [Texas Instruments CC2650](https://github.com/openthread/openthread/wiki/Platforms#texas-instruments-cc2650)
+* [POSIX Emulation](https://github.com/openthread/openthread/wiki/Platforms#posix-emulation)
+
+See the [Wiki Platform page](https://github.com/openthread/openthread/wiki/Platforms) for more detailed information on supported platforms.
+
+### Desktop Support
+
+Desktop platforms can also be used to control and interface with a Thread network using OpenThread:
+
+* **Unix** — [`wpantund`](https://github.com/openthread/wpantund) provides an interface to an NCP
+* **Windows 10** — [universal drivers](https://github.com/openthread/openthread/wiki/OpenThread-on%C2%A0Windows) to interface with devices running OpenThread
+
+### Porting
+
+If you are interested in porting OpenThread to a new platform, see the [Porting Guide](https://github.com/openthread/openthread/wiki/Porting-Guide) for hardware requirements and detailed porting instructions.
+
+### Border Router
+
+A Border Router connects a Thread network to networks at different layers, such as WiFi or Ethernet. [OpenThread Border Router](https://github.com/openthread/borderrouter) provides end-to-end IP via routing between Thread devices and other external IP networks, as well as external Thread Commissioning.
+
+# What tools are available for testing?
+
+### Certification Testing
+
+Certification testing is done with the [GRL Thread Test Harness software](http://graniteriverlabs.com/thread/), available for download to Thread member companies.
+
+Additional tools that extend the Test Harness are included in the OpenThread project:
+
+* [Thread Harness Automation](https://github.com/openthread/openthread/tree/master/tools/harness-automation) — automates the Thread Test Harness software
+* [Thread Harness THCI for OpenThread](https://github.com/openthread/openthread/tree/master/tools/harness-thci) — allows the Thread Test Harness to control OpenThread-based reference devices directly
+ * CC2538 example included in the GRL Thread Test Hardness software
+ * Library version can be modified by developers for use on other platforms
+
+### Sniffer
+
+OpenThread also provides a [sniffer](https://github.com/openthread/openthread/blob/master/tools/spinel-cli/SNIFFER.md) on the NCP build. The sniffer is exposed by the Spinel protocol and features:
+
+* Monitor mode — capture packets during operation
+* Promiscuous mode — dedicated sniffer
+* Host-side support — `wpantund`
+* pcap stream output
+
+# Need help?
+
+### Wiki
+
+Explore the [OpenThread Wiki](https://github.com/openthread/openthread/wiki) for more in-depth documentation on building, testing, automation and tools.
+
+### Interact
+
+There are numerous avenues for OpenThread support:
+
+* Bugs and feature requests — [submit to the Issue Tracker](https://github.com/openthread/openthread/issues)
+* Stack Overflow — [post questions using the `openthread` tag](http://stackoverflow.com/questions/tagged/openthread)
+* Google Groups — discussion and announcements
+ * [openthread-announce](https://groups.google.com/forum/#!forum/openthread-announce) — release notes and new updates on OpenThread
+ * [openthread-users](https://groups.google.com/forum/#!forum/openthread-users) — the best place for users to discuss OpenThread and interact with the OpenThread team
+
+### Directory Structure
+
+The OpenThread repository is structured as follows:
+
+Folder | Contents
+--------------|----------------------------------------------------------------
+`doc` | Spinel docs and Doxygen build file
+`etc` | Configuration files for other build systems (e.g. Visual Studio)
+`examples` | Sample applications and platforms demonstrating OpenThread
+`include` | Public API header files
+`src` | Core implementation of the Thread standard and related add-ons
+`tests` | Unit and Thread conformance tests
+`third_party` | Third-party code used by OpenThread
+`tools` | Helpful utilities related to the OpenThread project
+
+
+# Want to contribute?
+
+We would love for you to contribute to OpenThread and help make it even better than it is today! See the [`CONTRIBUTING.md`](https://github.com/openthread/openthread/blob/master/CONTRIBUTING.md) file for more information.
+
+# Versioning
+
+OpenThread follows the [Semantic Versioning guidelines](http://semver.org/) for release cycle transparency and to maintain backwards compatibility. OpenThread's versioning is independent of the Thread protocol specification version but will clearly indicate which version of the specification it currently supports.
+
+# License
+
+OpenThread is released under the [BSD 3-Clause license](https://github.com/openthread/openthread/blob/master/LICENSE). See the [`LICENSE`](https://github.com/openthread/openthread/blob/master/LICENSE) file for more information.
+
+Please only use the OpenThread name and marks when accurately referencing this software distribution. Do not use the marks in a way that suggests you are endorsed by or otherwise affiliated with Nest, Google, or The Thread Group.
diff --git a/STYLE_GUIDE.md b/STYLE_GUIDE.md
new file mode 100644
index 0000000..eca3494
--- /dev/null
+++ b/STYLE_GUIDE.md
@@ -0,0 +1,182 @@
+# OpenThread Coding Conventions and Style
+
+* [1 C and C++](#c-and-c)
+ * [1.1 Standards](#standards)
+ * [1.2 Conventions and Best Practices](#conventions-and-best-practices)
+ * [1.3 Tightly-constrained Systems and Shared Infrastructure](#tightly-constrained-systems-and-shared-infrastructure)
+ * [1.4 Format and Style](#format-and-style)
+ * [1.5 Comments](#comments)
+* [2 Python](#python)
+ * [2.1 Standards](#standards)
+ * [2.2 Conventions and Best Practices](#conventions-and-best-practices)
+ * [2.3 Format and Style](#format-and-style)
+
+# C and C++
+
+## Standards
+
+- C
+ - OpenThread uses and enforces the ISO9899:1999 (aka ISO C99, C99) C language standard as the minimum.
+- C++
+ - OpenThread uses and enforces the ISO14882:2003 (aka ISO C++03, C++03) C++ language standard as the minimum.
+- Extensions
+ - Wherever possible, toolchain-specific (e.g GCC/GNU) extensions or the use of later standards shall be avoided or shall be leveraged through toolchain-compatibility preprocessor macros.
+
+## Conventions and Best Practices
+
+### Language Independent
+
+- Inline functions should be used judiciously.
+ - The use of code in headers and, more specifically, the use of the non-local scope inline functions should be avoided. Exception: Simple setters and getters are fine since the compiler can efficiently optimize these and make their overhead as low as a direct data member access.
+- Return Statements
+ - There should be one return statement per free function or method at the end of the free function or method.
+- Non-local Goto
+ - There should be no calls to the functions `setjmp` or `longjmp`.
+- Local Goto
+ - There should be no calls to the C/C++ keyword goto. Exception: The use of local gotos for the purposes of common error handling blocks and single points of function return at the bottom of a function.
+- C Preprocessor
+ - Use of the C preprocessor should be limited to file inclusion and simple macros.
+ - Macros shall not be defined within a function or a block and should be defined at the top of a file.
+ - All `#else`, `#elif`, and `#endif` preprocessor directives shall reside in the same file as the `#if` or `#ifdef` directive to which they are related.
+ - All `#endif` directives equal to or greater than 20 lines away from the `#if` or `#ifdef` directive to which they are related shall be decorated by language comment indicating the conditional they are associated with.
+ - Preprocessor `#include` directives in a file shall only be preceded by other preprocessor directives or comments.
+ - Preprocessor `#include` directives shall use brace (“<”) and (“>”) style for all public headers, including C and C++ standard library, or other first- and third-party public library headers.
+ - Preprocessor `#include` directives should use double quote (‘“‘) and (‘“‘) style for all private or relative headers.
+ - Preprocessor `#include` directives should be grouped, ordered, or sorted as follows:
+ - This compilation unit's corresponding header, if any.
+ - C++ Standard Library headers
+ - C Standard Library headers
+ - Third-party library headers
+ - First-party library headers
+ - Private or local headers
+ - Alphanumeric order within each subgroup
+ - The preprocessor shall not be used to redefine reserved language keywords.
+ - Unused code shall not be disabled by commenting it out with C- or C++-style comments or with preprocessor `#if 0 ... #endif` semantics.
+ - Use of the preprocessor token concatenation operator '##' should be avoided.
+ - The `undef` preprocessor directive should be avoided and shall never be used to undefine a symbol from a foreign module.
+- Object Scope
+ - Data objects shall be declared at the smallest possible level of scope.
+ - No declaration in an inner scope shall hide or shadow a declaration in an outer scope. Compiler flags shall be set to flag and enforce this.
+- Unbounded Recursion
+ - There shall be no direct or indirect use of unbounded recursive function calls.
+- Symmetric APIs
+ - Wherever possible and appropriate, particularly around the management of resources, APIs should be symmetric. For example, if there is a free function or object method that allocates a resource, then there should be one that deallocates it. If there is a free function or object method that opens a file or network stream, then there should be one that closes it.
+- Use C stdint.h or C++ cstdint for Plain Old Data Types
+ - Standard, scalar data types defined in stdint.h (C) or cstdint (C++) should be used for basic signed and unsigned integer types, especially when size and serialization to non-volatile storage or across a network is concerned. Examples of these are: `uint8_t`, `int8_t`, etc.
+- Constant Qualifiers
+ - Read-only methods, global variables, stack variables, or data members are read-only should be qualified using the C or C++ `const` qualifier.
+ - Pointers or references to read-only objects or storage, including but not limited to function parameters, should be qualified using the C or C++ `const` qualifier.
+- Header Include Guard
+ - All C and C++ headers shall use preprocessor header include guards.
+ - The terminating endif preprocessor directive shall have a comment, C or C++ depending on the header type, containing the preprocessor symbol introduced by the ifndef directive starting the guard.
+ - The symbol used for the guard should be the file name, converted to all uppercase, with any spaces (“ “) or dots (“.”) converted to underscores (“_”).
+- Function and Method Prototypes
+ - All void functions or methods shall explicitly declare and specify the void type keyword.
+
+### C
+
+- C / C++ Linkage Wrappers
+ - All header files intended to have C symbol linkage shall use “extern C” linkage wrappers.
+
+### C++
+
+- Prefer Passing Parameters by Reference to Pointer
+ - Unlike C, C++ offers an alternate way to alias data over and above a pointer, the reference, indicated by the & symbol. Where appropriate, the reference should be preferred to the pointer.
+- Passing Base Scalars
+ - Size- and call frequency-based considerations should be made when passing scalars as to whether they should be passed by value or by constant reference; however, pass-by-value should generally be preferred.
+- Eliminate Unnecessary Destructors
+ - The creation of empty or useless destructors should be avoided. Empty or useless destructors should be removed.
+- Default Parameters
+ - When you declare C++ free functions and object methods, you should avoid or minimize using default parameters.
+ - When you declare C++ virtual object methods, you shall avoid using default parameters.
+- Global and Scoped Static Construction
+ - There shall be no use of global, static or otherwise, object construction. The use of scoped static object construction should be avoided.
+- C++-style Casts
+ - Wherever possible and practical, C++ style casts should be used and preferred to the C style cast equivalent.
+- Avoid `using namespace` Statements in Headers
+ - The C++ `using namespace` statement should not be used outside of object scope inside header files.
+
+## Tightly-constrained Systems and Shared Infrastructure
+
+- Heap-based resource allocation should be avoided.
+- There shall be no direct or indirect use of recursive function calls.
+- The use of virtual functions should be avoided.
+- The use of the C++ Standard Library shall be avoided.
+- The use of the C++ Standard Template Library (STL) should be avoided or minimized.
+- The use of the C++ templates should be avoided or minimized.
+- Code shall not use exceptions.
+- Code shall not use C++ runtime type information (RTTI), including facilities that rely upon it, such as `dynamic_cast` and `typeid`.
+
+## Format and Style
+
+- OpenThread uses the `make pretty` build target to reformat code and enforce code format and style. The `make pretty-check` build target is included in OpenThread's continuous integration and must pass before a pull request is merged.
+
+### File Names
+- File names should match the names and types of what is described in the file. If a file contains many declarations and definitions, the author should choose the one that predominantly describes or that makes the most sense.
+- File contents and names should be limited in the scope of what they contain. It may also be possible that there is too much stuff in one file and you need to break it up into multiple files.
+- File names should be all lower case.
+- File extensions shall be indicative and appropriate for the type and usage of the source or header file.
+
+### Naming
+- Names should be descriptive but not overly so and they should give some idea of scope and should be selected such that *wrong code looks wrong*.
+- Names shall not give any idea of type, such as is done with System Hungarian notation.
+- 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*. 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 ‘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.
+ - All class or structure data members shall have a `m` prepended to the name to denote member scope.
+ - All free function or method parameters should have an `a` prepended to the name to denote function parameter scope.
+ - All variables that do not have such prefixes shall be assumed to be function local scope.
+
+### White Space
+- Indentation shall be 4 space characters.
+- Conditionals shall always appear on a separate line from the code to execute as a result of the condition.
+- Scoped Variable declarations
+ - All scoped (i.e. stack) variable declarations should be placed together at the top of the enclosing scope in which they are used.
+ - There shall be an empty line after all such variable declarations.
+ - The names of all variable declarations should be left aligned.
+- Data Member declarations
+ - All data member declarations should be placed together.
+ - The names of all data member declarations should be left aligned.
+ - The data member declarations for C++ classes should be placed at the end or tail of the class.
+- Braces
+ - Braces should go on their own lines.
+ - Statements should never be on the same line following a closing brace.
+- Keywords
+ - There should be a single space after language-reserved keywords (for, while, if, etc).
+
+## Comments
+
+- All code should use Doxygen to:
+ - Detail what the various source and header files are and how they fit into the broader context.
+ - Detail what the various C++ namespaces are.
+ - Detail what the constants, C preprocessor definitions, and enumerations are.
+ - Detail what the globals are and how they are to be used.
+ - Detail what the free function and object / class methods are and how they are to be used, what their parameters are, and what their return values are.
+ - Detail any other important technical information or theory of operation unique and relevant to the stack that is not otherwise captured in architecture, design, or protocol documentation.
+- Every public, and ideally private, free function and class method should likewise have a prologue comment that:
+ - Briefly describes what it is and what it does.
+ - Describes in detail, optionally, what it is and what it does.
+ - Describes the purpose, function, and influence of each parameter as well as whether it is an input, an output, or both.
+ - Describes the return value, if present, and the expected range or constraints of it.
+
+# Python
+
+## Standards
+
+- OpenThread uses and enfores both Python 2 and Python 3. Support for Python 2 is a result of the fact that some current Linux distributions and Macs are still using 2.x as default.
+
+## Conventions and Best Practices
+
+- Run `pylint` over your code. `pylint` is a tool for finding bugs and style problems in Python source code. It finds problems that are typically caught by a compiler for less dynamic languages like C and C++. Because of the dynamic nature of Python, some warnings may be incorrect; however, spurious warnings should be fairly infrequent.
+
+## Format and Style
+
+- All code should adhere to [PEP 8](https://www.python.org/dev/peps/pep-0008/).
diff --git a/bootstrap b/bootstrap
new file mode 100755
index 0000000..b6f8ee0
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Copyright (c) 2016, The OpenThread Authors.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# Description:
+# This file is a trampoline script to the nlbuild-autotools
+# bootstrap script and augments it by providing the path to the
+# nlbuild-autotools repository for this project.
+#
+
+# Set this to the relative location of nlbuild-autotools to this script
+
+nlbuild_autotools_stem="third_party/nlbuild-autotools/repo"
+
+# Establish some key directories
+
+srcdir=`dirname ${0}`
+abs_srcdir=`pwd`
+abs_top_srcdir="${abs_srcdir}"
+
+exec ${srcdir}/${nlbuild_autotools_stem}/scripts/bootstrap -I "${abs_top_srcdir}/${nlbuild_autotools_stem}" $*
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..3f43a29
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,1438 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+#
+# Copyright (c) 2016, The OpenThread Authors.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# Declare autoconf version requirements
+#
+AC_PREREQ([2.68])
+
+#
+# Initialize autoconf for the package
+#
+AC_INIT([OPENTHREAD],
+ m4_esyscmd([third_party/nlbuild-autotools/repo/scripts/mkversion -b `cat .default-version` .]),
+ [openthread-devel@googlegroups.com],
+ [openthread],
+ [http://github.com/openthread/openthread])
+
+# Tell the rest of the build system the absolute path where the
+# nlbuild-autotools repository is rooted at.
+
+AC_SUBST(nlbuild_autotools_stem,[third_party/nlbuild-autotools/repo])
+AC_SUBST(abs_top_nlbuild_autotools_dir,[\${abs_top_srcdir}/\${nlbuild_autotools_stem}])
+
+#
+# OPENTHREAD interface current, revision, and age versions.
+#
+# Maintainters: Please manage these fields as follows:
+#
+# Interfaces removed: CURRENT++, AGE = 0, REVISION = 0
+# Interfaces added: CURRENT++, AGE++, REVISION = 0
+# No interfaces changed: REVISION++
+#
+#
+AC_SUBST(LIBOPENTHREAD_VERSION_CURRENT, [0])
+AC_SUBST(LIBOPENTHREAD_VERSION_AGE, [5])
+AC_SUBST(LIBOPENTHREAD_VERSION_REVISION, [0])
+AC_SUBST(LIBOPENTHREAD_VERSION_INFO, [${LIBOPENTHREAD_VERSION_CURRENT}:${LIBOPENTHREAD_VERSION_REVISION}:${LIBOPENTHREAD_VERSION_AGE}])
+
+#
+# Check the sanity of the source directory by checking for the
+# presence of a key watch file
+#
+AC_CONFIG_SRCDIR([include/openthread/openthread.h])
+
+#
+# Tell autoconf where to find auxilliary build tools (e.g. config.guess,
+# install-sh, missing, etc.)
+#
+AC_CONFIG_AUX_DIR([third_party/nlbuild-autotools/repo/autoconf])
+
+#
+# Tell autoconf where to find auxilliary M4 macros
+#
+AC_CONFIG_MACRO_DIR([third_party/nlbuild-autotools/repo/autoconf/m4])
+
+#
+# Tell autoconf what file the package is using to aggregate C preprocessor
+# defines.
+#
+AC_CONFIG_HEADERS([include/openthread-config-generic.h])
+
+#
+# Figure out what the canonical build and host tuples are.
+#
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+
+#
+# Mac OS X / Darwin ends up putting some versioning cruft on the end of its
+# tuple that we don't care about in this script. Create "clean" variables
+# devoid of it.
+#
+
+NL_FILTERED_CANONICAL_BUILD
+NL_FILTERED_CANONICAL_HOST
+
+#
+# Configure automake with the desired options, indicating that this is not
+# a native GNU package, that we want "silent" build rules, and that we want
+# objects built in the same subdirectory as their source rather than collapsed
+# together at the top-level directory.
+#
+# Disable silent build rules by either passing --disable-silent-rules to
+# configure or passing V=1 to make
+#
+AM_INIT_AUTOMAKE([1.14 foreign silent-rules subdir-objects tar-pax])
+
+#
+# Silent build rules requires at least automake-1.11. Employ
+# techniques for not breaking earlier versions of automake.
+#
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AM_SILENT_RULES([yes])
+
+#
+# Enable maintainer mode to prevent the package from constantly trying
+# to rebuild configure, Makefile.in, etc. Rebuilding such files rarely,
+# if ever, needs to be done "in the field".
+#
+# Use the included 'bootstrap' script instead when necessary.
+#
+AM_MAINTAINER_MODE
+
+#
+# Host-os-specific checks
+#
+
+case ${host_os} in
+
+ *darwin*)
+ OPENTHREAD_TARGET=darwin
+ OPENTHREAD_TARGET_DEFINES="-DOPENTHREAD_TARGET_DARWIN"
+ ;;
+
+ *linux*)
+ OPENTHREAD_TARGET=linux
+ OPENTHREAD_TARGET_DEFINES="-DOPENTHREAD_TARGET_LINUX"
+ ;;
+
+esac
+
+AC_SUBST(OPENTHREAD_TARGET_DARWIN)
+AM_CONDITIONAL([OPENTHREAD_TARGET_DARWIN], [test "${OPENTHREAD_TARGET}" = "darwin"])
+
+AC_SUBST(OPENTHREAD_TARGET_LINUX)
+AM_CONDITIONAL([OPENTHREAD_TARGET_LINUX], [test "${OPENTHREAD_TARGET}" = "linux"])
+
+AC_SUBST(OPENTHREAD_TARGET_DEFINES)
+
+#
+# Checks for build host programs
+#
+
+# This is a hack to restore some old broken behavior that was
+# removed in pull request #1527. It's use is highly discouraged,
+# you should try to fix your build environment instead.
+AC_ARG_ENABLE(no-executables-hack,
+ [AS_HELP_STRING([--enable-no-executables-hack],
+ [Enable hack that prevents link checks at configure time. Highly discouraged.])])
+AC_MSG_CHECKING([whether to disable executable checking])
+if test "${enable_no_executables_hack}" = "yes"
+then
+ AC_MSG_RESULT([yes])
+ AC_NO_EXECUTABLES
+ # Here we guess conservative values for tests that require link checks
+ # to test for these features. This will prevent these checks from
+ # being performed later in the configuration process.
+ ac_cv_func_strlcat=${ac_cv_func_strlcat-no}
+ ac_cv_func_strlcpy=${ac_cv_func_strlcpy-no}
+ ac_cv_func_strnlen=${ac_cv_func_strnlen-no}
+else
+ AC_MSG_RESULT([no])
+fi
+
+# Passing -Werror to GCC-based or -compatible compilers breaks some
+# autoconf tests (see
+# http://lists.gnu.org/archive/html/autoconf-patches/2008-09/msg00014.html).
+#
+# If -Werror has been passed transform it into -Wno-error. We'll
+# transform it back later with NL_RESTORE_WERROR.
+
+NL_SAVE_WERROR
+
+# Check for compilers.
+#
+# These should be checked BEFORE we check for and, implicitly,
+# initialize libtool such that libtool knows what languages it has to
+# work with.
+
+AC_PROG_CPP
+AC_PROG_CPP_WERROR
+
+AC_PROG_CC
+AC_PROG_CC_C_O
+
+AC_PROG_CXXCPP
+
+AC_PROG_CXX
+AC_PROG_CXX_C_O
+
+AM_PROG_AS
+
+# Check for other compiler toolchain tools.
+
+AC_CHECK_TOOL(AR, ar)
+AC_CHECK_TOOL(RANLIB, ranlib)
+AC_CHECK_TOOL(OBJCOPY, objcopy)
+AC_CHECK_TOOL(STRIP, strip)
+
+# Check for other host tools.
+
+AC_PROG_INSTALL
+AC_PROG_LN_S
+
+AC_PATH_PROG(CMP, cmp)
+
+#
+# Checks for specific compiler characteristics
+#
+
+#
+# Common compiler flags we would like to have.
+#
+# -Wall CC, CXX
+#
+
+PROSPECTIVE_CFLAGS="-Wall -Wextra -Wshadow -Werror -std=c99 -pedantic-errors"
+PROSPECTIVE_CXXFLAGS="-Wall -Wextra -Wshadow -Werror -std=gnu++98 -Wno-c++14-compat"
+
+AC_CACHE_CHECK([whether $CC is Clang],
+ [nl_cv_clang],
+ [nl_cv_clang=no
+ if test "x${GCC}" = "xyes"; then
+ AC_EGREP_CPP([NL_CC_IS_CLANG],
+ [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+# if defined(__clang__) && defined(__llvm__)
+ NL_CC_IS_CLANG
+# endif
+ ],
+ [nl_cv_clang=yes])
+ fi
+ ])
+
+if test "${nl_cv_clang}" = "yes"; then
+ PROSPECTIVE_CFLAGS="${PROSPECTIVE_CFLAGS} -Wconversion"
+ PROSPECTIVE_CXXFLAGS="${PROSPECTIVE_CXXFLAGS} -Wconversion"
+fi
+
+AX_CHECK_COMPILER_OPTIONS([C], ${PROSPECTIVE_CFLAGS})
+AX_CHECK_COMPILER_OPTIONS([C++], ${PROSPECTIVE_CXXFLAGS})
+
+# Check for and initialize libtool
+
+LT_INIT
+AC_PROG_LIBTOOL
+
+# Disable building shared libraries by default (can be enabled with --enable-shared)
+
+AC_DISABLE_SHARED
+
+#
+# Debug instances
+#
+AC_MSG_NOTICE([checking whether to build debug instances])
+
+# Debug
+
+NL_ENABLE_DEBUG([no])
+
+AM_CONDITIONAL([OPENTHREAD_BUILD_DEBUG], [test "${nl_cv_build_debug}" = "yes"])
+
+#
+# Code coverage and compiler optimization
+#
+
+# Coverage
+
+NL_ENABLE_COVERAGE([no])
+
+AM_CONDITIONAL([OPENTHREAD_BUILD_COVERAGE], [test "${nl_cv_build_coverage}" = "yes"])
+
+NL_ENABLE_COVERAGE_REPORTS([auto])
+
+AM_CONDITIONAL([OPENTHREAD_BUILD_COVERAGE_REPORTS], [test "${nl_cv_build_coverage_reports}" = "yes"])
+
+# Optimization
+
+NL_ENABLE_OPTIMIZATION([yes])
+
+AM_CONDITIONAL([OPENTHREAD_BUILD_OPTIMIZED], [test "${nl_cv_build_optimized}" = "yes"])
+
+# Address Sanitizer
+
+AC_MSG_CHECKING([whether to build with Address Sanitizer support])
+AC_ARG_ENABLE(address-sanitizer,
+ [AS_HELP_STRING([--enable-address-sanitizer],[Enable Address Sanitizer support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_address_sanitizer=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enableval} for --enable-address-sanitizer])
+ ;;
+
+ esac
+ ],
+ [enable_address_sanitizer=no])
+AC_MSG_RESULT(${enable_address_sanitizer})
+
+AM_CONDITIONAL([OPENTHREAD_WITH_ADDRESS_SANITIZER], [test "${enable_address_sanitizer}" = "yes"])
+
+if test "${enable_address_sanitizer}" = "yes" ; then
+
+ PROSPECTIVE_CFLAGS="-fsanitize=address"
+
+ # Check if the compilers support address sanitizer
+ AX_CHECK_COMPILER_OPTIONS([C], ${PROSPECTIVE_CFLAGS})
+ AX_CHECK_COMPILER_OPTIONS([C++], ${PROSPECTIVE_CFLAGS})
+
+fi
+
+#
+# Code style
+#
+
+AC_SUBST(PRETTY, ["\${abs_top_srcdir}/.astyle/astyle-wrap.sh"])
+AC_SUBST(PRETTY_ARGS, ["astyle --options=\${abs_top_srcdir}/.astyle/astyle-opts"])
+AC_SUBST(PRETTY_CHECK, ["\${abs_top_srcdir}/.astyle/astyle-wrap.sh"])
+AC_SUBST(PRETTY_CHECK_ARGS, ["astyle --options=\${abs_top_srcdir}/.astyle/astyle-opts --dry-run"])
+
+#
+# Tests
+#
+AC_MSG_NOTICE([checking whether to build tests])
+
+# Tests
+
+NL_ENABLE_TESTS([yes])
+
+AM_CONDITIONAL([OPENTHREAD_BUILD_TESTS], [test "${nl_cv_build_tests}" = "yes"])
+
+#
+# CLI Library
+#
+AC_ARG_ENABLE(cli-app,
+ [AS_HELP_STRING([--enable-cli-app],[Enable CLI support (no|mtd|ftd|all) @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+ all|both)
+ enable_cli_app=yes
+ enable_cli_app_mtd=yes
+ enable_cli_app_ftd=yes
+ ;;
+ no|yes)
+ enable_cli_app=${enableval}
+ enable_cli_app_mtd=${enableval}
+ enable_cli_app_ftd=${enableval}
+ ;;
+ mtd)
+ enable_cli_app=yes
+ enable_cli_app_mtd=yes
+ enable_cli_app_ftd=no
+ ;;
+ ftd)
+ enable_cli_app=yes
+ enable_cli_app_mtd=no
+ enable_cli_app_ftd=yes
+ ;;
+ *)
+ AC_MSG_ERROR([Invalid value ${enableval} for --enable-cli-app])
+ ;;
+ esac
+ ],
+ [
+ enable_cli_app=no
+ enable_cli_app_mtd=no
+ enable_cli_app_ftd=no])
+
+
+AC_MSG_CHECKING([cli-app modes])
+AC_MSG_RESULT(${enable_cli_app})
+AM_CONDITIONAL([OPENTHREAD_ENABLE_CLI], [test "${enable_cli_app}" == "yes"])
+AM_CONDITIONAL([OPENTHREAD_ENABLE_CLI_MTD], [test "${enable_cli_app_mtd}" == "yes"])
+AM_CONDITIONAL([OPENTHREAD_ENABLE_CLI_FTD], [test "${enable_cli_app_ftd}" == "yes"])
+AC_SUBST(OPENTHREAD_ENABLE_CLI)
+AC_SUBST(OPENTHREAD_ENABLE_CLI_FTD)
+AC_SUBST(OPENTHREAD_ENABLE_CLI_MTD)
+
+
+#
+# NCP app
+#
+AC_ARG_ENABLE(ncp-app,
+ [AS_HELP_STRING([--enable-ncp-app],[Enable NCP support (no|mtd|ftd|all) @<:@default=no@:>@.])],
+ [
+ # Map all & both to yes
+ case "${enableval}" in
+ all|both)
+ enableval=yes
+ ;;
+
+ *)
+ ;;
+
+ esac
+
+ case "${enableval}" in
+
+ no|yes)
+ enable_ncp_app=${enableval}
+ enable_ncp_app_mtd=${enableval}
+ enable_ncp_app_ftd=${enableval}
+ ;;
+
+ mtd)
+ enable_ncp_app=yes
+ enable_ncp_app_mtd=yes
+ enable_ncp_app_ftd=no
+ ;;
+
+ ftd)
+ enable_ncp_app=yes
+ enable_ncp_app_mtd=no
+ enable_ncp_app_ftd=yes
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enableval} for --enable-ncp-app])
+ ;;
+ esac
+ ],
+ [
+ enable_ncp_app=no
+ enable_ncp_app_ftd=no
+ enable_ncp_app_mtd=no
+ ]
+ )
+
+
+AC_MSG_CHECKING([ncp-app modes])
+AC_MSG_RESULT(${enable_ncp_app})
+AC_MSG_CHECKING([should NCP support ftd])
+AC_MSG_RESULT(${enable_ncp_app_ftd})
+AC_MSG_CHECKING([should NCP support mtd])
+AC_MSG_RESULT(${enable_ncp_app_mtd})
+
+AC_SUBST(OPENTHREAD_ENABLE_NCP)
+AC_SUBST(OPENTHREAD_ENABLE_NCP_MTD)
+AC_SUBST(OPENTHREAD_ENABLE_NCP_FTD)
+
+AM_CONDITIONAL([OPENTHREAD_ENABLE_NCP], [test "${enable_ncp_app}" == "yes"])
+AM_CONDITIONAL([OPENTHREAD_ENABLE_NCP_MTD], [test "${enable_ncp_app_mtd}" == "yes"])
+AM_CONDITIONAL([OPENTHREAD_ENABLE_NCP_FTD], [test "${enable_ncp_app_ftd}" == "yes"])
+
+#
+# NCP BUS - how does the NCP talk to the host?
+#
+
+AC_ARG_WITH(
+ [ncp-bus],
+ [AS_HELP_STRING([--with-ncp-bus],[Specify the NCP bus (none|spi|uart) @<:@default=none@:>@.])],
+ [
+ case "${with_ncp_bus}" in
+ "none")
+ OPENTHREAD_ENABLE_NCP_SPI=0
+ OPENTHREAD_ENABLE_NCP_UART=0
+ ;;
+ "spi")
+ OPENTHREAD_ENABLE_NCP_SPI=1
+ OPENTHREAD_ENABLE_NCP_UART=0
+ ;;
+ "uart")
+ OPENTHREAD_ENABLE_NCP_SPI=0
+ OPENTHREAD_ENABLE_NCP_UART=1
+ ;;
+ *)
+ AC_MSG_ERROR([unexpected --with-ncp-bus=${with_ncp_bus}])
+ ;;
+ esac
+ ],
+ [
+ OPENTHREAD_ENABLE_NCP_SPI=0
+ OPENTHREAD_ENABLE_NCP_UART=0
+ ])
+
+AC_SUBST(OPENTHREAD_ENABLE_NCP_SPI)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_NCP_SPI], [test "${with_ncp_bus}" = "spi"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_NCP_SPI],[${OPENTHREAD_ENABLE_NCP_SPI}],[Define to 1 to enable the NCP SPI interface.])
+AC_MSG_CHECKING([should NCP support SPI])
+AC_MSG_RESULT([${OPENTHREAD_ENABLE_SPI}])
+
+AC_SUBST(OPENTHREAD_ENABLE_NCP_UART)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_NCP_UART], [test "${with_ncp_bus}" = "uart"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_NCP_UART],[${OPENTHREAD_ENABLE_NCP_UART}],[Define to 1 to enable the NCP UART interface.])
+AC_MSG_CHECKING([sould NCP support UART])
+AC_MSG_RESULT([${OPENTHREAD_ENABLE_UART}])
+
+#
+# Multiple OpenThread Instances
+#
+
+AC_ARG_ENABLE(multiple-instances,
+ [AS_HELP_STRING([--enable-multiple-instances],[Enable support for multiple OpenThread instances @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_multiple_instances=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_multiple_instances} for --enable-multiple-instances])
+ ;;
+ esac
+ ],
+ [enable_multiple_instances=no])
+
+if test "$enable_multiple_instances" = "yes"; then
+ OPENTHREAD_ENABLE_MULTIPLE_INSTANCES=1
+else
+ OPENTHREAD_ENABLE_MULTIPLE_INSTANCES=0
+fi
+
+AC_MSG_RESULT(${enable_multiple_instances})
+AC_SUBST(OPENTHREAD_ENABLE_MULTIPLE_INSTANCES)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_MULTIPLE_INSTANCES], [test "${enable_multiple_instances}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_MULTIPLE_INSTANCES],[${OPENTHREAD_ENABLE_MULTIPLE_INSTANCES}],[Define to 1 if you want to enable support for multiple OpenThread instances.])
+
+#
+# Builtin mbedtls
+#
+
+AC_ARG_ENABLE(builtin-mbedtls,
+ [AS_HELP_STRING([--enable-builtin-mbedtls],[Enable builtin mbedtls @<:@default=yes@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_builtin_mbedtls=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_builtin_mbedtls} for --enable-builtin-mbedtls])
+ ;;
+ esac
+ ],
+ [enable_builtin_mbedtls=yes])
+
+if test "$enable_builtin_mbedtls" = "yes" -a ! "${MBEDTLS_CPPFLAGS}"; then
+ MBEDTLS_CPPFLAGS="-I\${abs_top_srcdir}/third_party/mbedtls"
+ MBEDTLS_CPPFLAGS="${MBEDTLS_CPPFLAGS} -I\${abs_top_srcdir}/third_party/mbedtls/repo/include"
+ MBEDTLS_CPPFLAGS="${MBEDTLS_CPPFLAGS} -I\${abs_top_srcdir}/third_party/mbedtls/repo/include/mbedtls"
+ MBEDTLS_CPPFLAGS="${MBEDTLS_CPPFLAGS} -DMBEDTLS_CONFIG_FILE=\\\"mbedtls-config.h\\\""
+fi
+AC_MSG_CHECKING([whether mbed TLS should be enabled])
+AC_MSG_RESULT(${enable_builtin_mbedtls})
+AM_CONDITIONAL([OPENTHREAD_ENABLE_BUILTIN_MBEDTLS], [test "${enable_builtin_mbedtls}" = "yes"])
+
+#
+# Thread TMF Proxy
+#
+
+AC_MSG_CHECKING([whether to enable TMF proxy])
+AC_ARG_ENABLE(tmf_proxy,
+ [AS_HELP_STRING([--enable-tmf-proxy],[Enable TMF proxy support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_tmf_proxy=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_tmf_proxy} for --enable-tmf-proxy])
+ ;;
+ esac
+ ],
+ [enable_tmf_proxy=no])
+
+if test "$enable_tmf_proxy" = "yes"; then
+ OPENTHREAD_ENABLE_TMF_PROXY=1
+else
+ OPENTHREAD_ENABLE_TMF_PROXY=0
+fi
+
+AC_MSG_RESULT(${enable_tmf_proxy})
+AC_SUBST(OPENTHREAD_ENABLE_TMF_PROXY)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_TMF_PROXY], [test "${enable_tmf_proxy}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_TMF_PROXY],[${OPENTHREAD_ENABLE_TMF_PROXY}],[Define to 1 to enable the TMF proxy feature.])
+
+#
+# Thread Network Diagnostic for MTD
+#
+
+AC_ARG_ENABLE(mtd_network_diagnostic,
+ [AS_HELP_STRING([--enable-mtd-network-diagnostic],[Enable network diagnostic support for MTD @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_mtd_network_diagnostic=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_mtd_network_diagnostic} for --enable-mtd-network-diagnostic])
+ ;;
+ esac
+ ],
+ [enable_mtd_network_diagnostic=no])
+
+if test "$enable_mtd_network_diagnostic" = "yes"; then
+ OPENTHREAD_ENABLE_MTD_NETWORK_DIAGNOSTIC=1
+else
+ OPENTHREAD_ENABLE_MTD_NETWORK_DIAGNOSTIC=0
+fi
+
+AC_MSG_CHECKING([whether to enable the network diagnostic for MTD])
+AC_MSG_RESULT(${enable_mtd_network_diagnostic})
+AC_SUBST(OPENTHREAD_ENABLE_MTD_NETWORK_DIAGNOSTIC)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_MTD_NETWORK_DIAGNOSTIC], [test "${enable_mtd_network_diagnostic}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_MTD_NETWORK_DIAGNOSTIC],[${OPENTHREAD_ENABLE_MTD_NETWORK_DIAGNOSTIC}],[Define to 1 to enable network diagnostic for MTD.])
+
+#
+# Thread Commissioner
+#
+
+AC_ARG_ENABLE(commissioner,
+ [AS_HELP_STRING([--enable-commissioner],[Enable commissioner support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_commissioner=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_commissioner} for --enable-commissioner])
+ ;;
+ esac
+ ],
+ [enable_commissioner=no])
+
+if test "$enable_commissioner" = "yes"; then
+ OPENTHREAD_ENABLE_COMMISSIONER=1
+else
+ OPENTHREAD_ENABLE_COMMISSIONER=0
+fi
+
+AC_MSG_CHECKING([whether to enable the commissioner])
+AC_MSG_RESULT(${enable_commissioner})
+AC_SUBST(OPENTHREAD_ENABLE_COMMISSIONER)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_COMMISSIONER], [test "${enable_commissioner}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_COMMISSIONER],[${OPENTHREAD_ENABLE_COMMISSIONER}],[Define to 1 to enable the commissioner role.])
+
+#
+# Thread Joiner
+#
+
+AC_ARG_ENABLE(joiner,
+ [AS_HELP_STRING([--enable-joiner],[Enable joiner support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_joiner=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_joiner} for --enable-joiner])
+ ;;
+ esac
+ ],
+ [enable_joiner=no])
+
+if test "$enable_joiner" = "yes"; then
+ OPENTHREAD_ENABLE_JOINER=1
+else
+ OPENTHREAD_ENABLE_JOINER=0
+fi
+
+AC_MSG_CHECKING([whether to enable the joiner feature])
+AC_MSG_RESULT(${enable_joiner})
+AC_SUBST(OPENTHREAD_ENABLE_JOINER)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_JOINER], [test "${enable_joiner}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_JOINER],[${OPENTHREAD_ENABLE_JOINER}],[Define to 1 to enable the joiner role.])
+
+if test "${enable_commissioner}" = "yes" -o "${enable_joiner}" = "yes"; then
+ enable_dtls="yes"
+ OPENTHREAD_ENABLE_DTLS=1
+else
+ enable_dtls="no"
+ OPENTHREAD_ENABLE_DTLS=0
+fi
+
+AC_MSG_CHECKING([whether to enable DTLS due to joiner/commissioner])
+AC_MSG_RESULT(${enable_dtls})
+AC_SUBST(OPENTHREAD_ENABLE_DTLS)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_DTLS], [test "${enable_dtls}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_DTLS],[${OPENTHREAD_ENABLE_DTLS}],[Define to 1 to enable dtls support.])
+
+#
+# Jam Detection
+#
+
+AC_ARG_ENABLE(jam_detection,
+ [AS_HELP_STRING([--enable-jam-detection],[Enable Jam Detection support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_jam_detection=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_jam_detection} for --enable-jam-detection])
+ ;;
+ esac
+ ],
+ [enable_jam_detection=no])
+
+if test "$enable_jam_detection" = "yes"; then
+ OPENTHREAD_ENABLE_JAM_DETECTION=1
+else
+ OPENTHREAD_ENABLE_JAM_DETECTION=0
+fi
+
+AC_MSG_CHECKING([whether to enable jam detection])
+AC_MSG_RESULT(${enable_jam_detection})
+AC_SUBST(OPENTHREAD_ENABLE_JAM_DETECTION)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_JAM_DETECTION], [test "${enable_jam_detection}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_JAM_DETECTION],[${OPENTHREAD_ENABLE_JAM_DETECTION}],[Define to 1 if you want to use jam detection feature])
+
+#
+# MAC Whitelist and Blacklist
+#
+
+AC_ARG_ENABLE(mac_whitelist,
+ [AS_HELP_STRING([--enable-mac-whitelist],[Enable MAC whitelist/blacklist support @<:@default=yes@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_mac_whitelist=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_mac_whitelist} for --enable-mac-whitelist])
+ ;;
+ esac
+ ],
+ [enable_mac_whitelist=yes])
+
+if test "$enable_mac_whitelist" = "yes"; then
+ OPENTHREAD_ENABLE_MAC_WHITELIST=1
+else
+ OPENTHREAD_ENABLE_MAC_WHITELIST=0
+fi
+
+AC_MSG_CHECKING([whether to enable mac whitelist])
+AC_MSG_RESULT(${enable_mac_whitelist})
+AC_SUBST(OPENTHREAD_ENABLE_MAC_WHITELIST)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_MAC_WHITELIST], [test "${enable_mac_whitelist}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_MAC_WHITELIST],[${OPENTHREAD_ENABLE_MAC_WHITELIST}],[Define to 1 if you want to use MAC whitelist/blacklist feature])
+
+#
+# Diagnostics Library
+#
+
+AC_ARG_ENABLE(diag,
+ [AS_HELP_STRING([--enable-diag],[Enable diagnostics support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_diag=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_diag} for --enable-diag])
+ ;;
+ esac
+ ],
+ [enable_diag=no])
+
+if test "$enable_diag" = "yes"; then
+ OPENTHREAD_ENABLE_DIAG=1
+else
+ OPENTHREAD_ENABLE_DIAG=0
+fi
+
+AC_MSG_CHECKING([whether to enable diag])
+AC_MSG_RESULT(${enable_diag})
+AC_SUBST(OPENTHREAD_ENABLE_DIAG)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_DIAG], [test "${enable_diag}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_DIAG],[${OPENTHREAD_ENABLE_DIAG}],[Define to 1 if you want to use diagnostics module])
+
+#
+# Legacy Network
+#
+
+AC_ARG_ENABLE(legacy,
+ [AS_HELP_STRING([--enable-legacy],[Enable legacy network support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_legacy=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_legacy} for --enable-legacy])
+ ;;
+ esac
+ ],
+ [enable_legacy=no])
+
+if test "$enable_legacy" = "yes"; then
+ OPENTHREAD_ENABLE_LEGACY=1
+else
+ OPENTHREAD_ENABLE_LEGACY=0
+fi
+
+AC_MSG_CHECKING([whether to enable legacy])
+AC_MSG_RESULT(${enable_legacy})
+AC_SUBST(OPENTHREAD_ENABLE_LEGACY)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_LEGACY], [test "${enable_legacy}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_LEGACY],[${OPENTHREAD_ENABLE_LEGACY}],[Define to 1 if you want to use legacy network support])
+
+#
+# Child Supervision
+#
+
+AC_ARG_ENABLE(child_supervision,
+ [AS_HELP_STRING([--enable-child-supervision],[Enable child supervision feature @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_child_supervision=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_child_supervision} for --enable-child-supervision])
+ ;;
+ esac
+ ],
+ [enable_child_supervision=no])
+
+if test "$enable_child_supervision" = "yes"; then
+ OPENTHREAD_ENABLE_CHILD_SUPERVISION=1
+else
+ OPENTHREAD_ENABLE_CHILD_SUPERVISION=0
+fi
+
+AC_MSG_RESULT(${enable_child_supervision})
+AC_SUBST(OPENTHREAD_ENABLE_CHILD_SUPERVISION)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_CHILD_SUPERVISION], [test "${enable_child_supervision}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_CHILD_SUPERVISION],[${OPENTHREAD_ENABLE_CHILD_SUPERVISION}],[Define to 1 if you want to use child supervision feature])
+
+#
+# Log for certification test
+#
+
+AC_ARG_ENABLE(cert_log,
+ [AS_HELP_STRING([--enable-cert-log],[Enable certification log support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_cert_log=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_cert_log} for --enable-cert-log])
+ ;;
+ esac
+ ],
+ [enable_cert_log=no])
+
+if test "$enable_cert_log" = "yes"; then
+ OPENTHREAD_ENABLE_CERT_LOG=1
+else
+ OPENTHREAD_ENABLE_CERT_LOG=0
+fi
+
+AC_SUBST(OPENTHREAD_ENABLE_CERT_LOG)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_CERT_LOG], [test "${enable_cert_log}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_CERT_LOG],[${OPENTHREAD_ENABLE_CERT_LOG}],[Define to 1 if you want to enable log for certification test])
+
+#
+# DHCPv6 Client
+#
+
+AC_ARG_ENABLE(dhcp6_client,
+ [AS_HELP_STRING([--enable-dhcp6-client],[Enable DHCPv6 client support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_dhcp6_client=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_dhcp6_client} for --enable-dhcp6-client])
+ ;;
+ esac
+ ],
+ [enable_dhcp6_client=no])
+
+if test "$enable_dhcp6_client" = "yes"; then
+ OPENTHREAD_ENABLE_DHCP6_CLIENT=1
+else
+ OPENTHREAD_ENABLE_DHCP6_CLIENT=0
+fi
+
+AC_SUBST(OPENTHREAD_ENABLE_DHCP6_CLIENT)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_DHCP6_CLIENT], [test "${enable_dhcp6_client}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_DHCP6_CLIENT],[${OPENTHREAD_ENABLE_DHCP6_CLIENT}],[Define to 1 if you want to enable DHCPv6 Client])
+
+#
+# DHCPv6 Server
+#
+
+AC_ARG_ENABLE(dhcp6_server,
+ [AS_HELP_STRING([--enable-dhcp6-server],[Enable DHCPv6 server support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_dhcp6_server=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_dhcp6_server} for --enable-dhcp6-server])
+ ;;
+ esac
+ ],
+ [enable_dhcp6_server=no])
+
+if test "$enable_dhcp6_server" = "yes"; then
+ OPENTHREAD_ENABLE_DHCP6_SERVER=1
+else
+ OPENTHREAD_ENABLE_DHCP6_SERVER=0
+fi
+
+AC_SUBST(OPENTHREAD_ENABLE_DHCP6_SERVER)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_DHCP6_SERVER], [test "${enable_dhcp6_server}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_DHCP6_SERVER],[${OPENTHREAD_ENABLE_DHCP6_SERVER}],[Define to 1 if you want to enable DHCPv6 Server])
+
+#
+# DNS Client
+#
+
+AC_ARG_ENABLE(dns_client,
+ [AS_HELP_STRING([--enable-dns-client],[Enable DNS client support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_dns_client=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_dns_client} for --enable-dns-client])
+ ;;
+ esac
+ ],
+ [enable_dns_client=no])
+
+if test "$enable_dns_client" = "yes"; then
+ OPENTHREAD_ENABLE_DNS_CLIENT=1
+else
+ OPENTHREAD_ENABLE_DNS_CLIENT=0
+fi
+
+AC_SUBST(OPENTHREAD_ENABLE_DNS_CLIENT)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_DNS_CLIENT], [test "${enable_dns_client}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_DNS_CLIENT],[${OPENTHREAD_ENABLE_DNS_CLIENT}],[Define to 1 if you want to enable DNS Client])
+
+#
+# Application CoAP
+#
+
+AC_ARG_ENABLE(application_coap,
+ [AS_HELP_STRING([--enable-application-coap],[Enable CoAP to an application.@<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_application_coap=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_application_coap} for --enable-application-coap])
+ ;;
+ esac
+ ],
+ [enable_application_coap=no])
+
+if test "$enable_application_coap" = "yes"; then
+ OPENTHREAD_ENABLE_APPLICATION_COAP=1
+else
+ OPENTHREAD_ENABLE_APPLICATION_COAP=0
+fi
+
+AC_SUBST(OPENTHREAD_ENABLE_APPLICATION_COAP)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_APPLICATION_COAP], [test "${enable_application_coap}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_APPLICATION_COAP],[${OPENTHREAD_ENABLE_APPLICATION_COAP}],[Define to 1 if you want to enable CoAP to an application.])
+
+#
+# otLinkRaw API
+#
+
+AC_ARG_ENABLE(raw_link_api,
+ [AS_HELP_STRING([--enable-raw-link-api],[Enable raw link-layer API support @<:@default=yes@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_raw_link_api=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_raw_link_api} for --enable-raw-link-api])
+ ;;
+ esac
+ ],
+ [enable_raw_link_api=yes])
+
+if test "$enable_raw_link_api" = "yes"; then
+ OPENTHREAD_ENABLE_RAW_LINK_API=1
+else
+ OPENTHREAD_ENABLE_RAW_LINK_API=0
+fi
+
+AC_SUBST(OPENTHREAD_ENABLE_RAW_LINK_API)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_RAW_LINK_API], [test "${enable_raw_link_api}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_RAW_LINK_API],[${OPENTHREAD_ENABLE_RAW_LINK_API}],[Define to 1 if you want to enable raw link-layer API])
+
+#
+# Border Router
+#
+
+AC_ARG_ENABLE(border_router,
+ [AS_HELP_STRING([--enable-border-router],[Enable Border Router support @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ enable_border_router=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enable_border_router} for --enable-border-router])
+ ;;
+ esac
+ ],
+ [enable_border_router=no])
+
+if test "$enable_border_router" = "yes"; then
+ OPENTHREAD_ENABLE_BORDER_ROUTER=1
+else
+ OPENTHREAD_ENABLE_BORDER_ROUTER=0
+fi
+
+AC_SUBST(OPENTHREAD_ENABLE_BORDER_ROUTER)
+AM_CONDITIONAL([OPENTHREAD_ENABLE_BORDER_ROUTER], [test "${enable_border_router}" = "yes"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_BORDER_ROUTER],[${OPENTHREAD_ENABLE_BORDER_ROUTER}],[Define to 1 if you want to enable Border Router])
+
+#
+# Examples
+#
+
+AC_ARG_WITH(examples,
+ [AS_HELP_STRING([--with-examples=TARGET],
+ [Specify the examples from one of: none, posix, cc2538, cc2650, da15000, efr32, emsk, kw41z, nrf52840 @<:@default=none@:>@.])],
+ [
+ case "${with_examples}" in
+
+ none|posix|cc2538|cc2650|da15000|efr32|emsk|kw41z|nrf52840)
+ ;;
+ *)
+ AC_MSG_ERROR([Invalid value ${with_examples} for --with-examples])
+ ;;
+ esac
+ ],
+ [with_examples=none])
+
+OPENTHREAD_EXAMPLES=${with_examples}
+
+case ${with_examples} in
+
+ posix)
+ OPENTHREAD_EXAMPLES_POSIX=1
+ AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_POSIX],[${OPENTHREAD_EXAMPLES_POSIX}],[Define to 1 if you want to use posix examples])
+ ;;
+
+ cc2538)
+ OPENTHREAD_EXAMPLES_CC2538=1
+ AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_CC2538],[${OPENTHREAD_EXAMPLES_CC2538}],[Define to 1 if you want to use cc2538 examples])
+ ;;
+
+ cc2650)
+ OPENTHREAD_EXAMPLES_CC2650=1
+ AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_CC2650],[${OPENTHREAD_EXAMPLES_CC2650}],[Define to 1 if you want to use cc2650 examples])
+ ;;
+
+ da15000)
+ OPENTHREAD_EXAMPLES_DA15000=1
+ AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_DA15000],[${OPENTHREAD_EXAMPLES_DA15000}],[Define to 1 if you want to use da15000 examples])
+ ;;
+
+ efr32)
+ OPENTHREAD_EXAMPLES_EFR32=1
+ AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_EFR32],[${OPENTHREAD_EXAMPLES_EFR32}],[Define to 1 if you want to use efr32 examples])
+ ;;
+
+ emsk)
+ OPENTHREAD_EXAMPLES_EMSK=1
+ AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_EMSK],[${OPENTHREAD_EXAMPLES_EMSK}],[Define to 1 if you want to use emsk examples])
+ ;;
+
+ kw41z)
+ OPENTHREAD_EXAMPLES_KW41Z=1
+ AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_KW41Z],[${OPENTHREAD_EXAMPLES_KW41Z}],[Define to 1 if you want to use kw41z examples])
+ ;;
+
+ nrf52840)
+ OPENTHREAD_EXAMPLES_NRF52840=1
+ AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_NRF52840],[${OPENTHREAD_EXAMPLES_NRF52840}],[Define to 1 if you want to use nrf52840 examples])
+ ;;
+
+esac
+
+AC_MSG_CHECKING([whether to enable examples])
+AC_MSG_RESULT(${OPENTHREAD_EXAMPLES})
+
+AC_SUBST(OPENTHREAD_EXAMPLES)
+AM_CONDITIONAL([OPENTHREAD_EXAMPLES], [test ${with_examples} != "none"])
+AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES],[${OPENTHREAD_EXAMPLES}],[OpenThread examples])
+
+AC_SUBST(OPENTHREAD_EXAMPLES_POSIX)
+AM_CONDITIONAL([OPENTHREAD_EXAMPLES_POSIX], [test "${OPENTHREAD_EXAMPLES}" = "posix"])
+
+AC_SUBST(OPENTHREAD_EXAMPLES_CC2538)
+AM_CONDITIONAL([OPENTHREAD_EXAMPLES_CC2538], [test "${OPENTHREAD_EXAMPLES}" = "cc2538"])
+
+AC_SUBST(OPENTHREAD_EXAMPLES_CC2650)
+AM_CONDITIONAL([OPENTHREAD_EXAMPLES_CC2650], [test "${OPENTHREAD_EXAMPLES}" = "cc2650"])
+
+AC_SUBST(OPENTHREAD_EXAMPLES_DA15000)
+AM_CONDITIONAL([OPENTHREAD_EXAMPLES_DA15000], [test "${OPENTHREAD_EXAMPLES}" = "da15000"])
+
+AC_SUBST(OPENTHREAD_EXAMPLES_EFR32)
+AM_CONDITIONAL([OPENTHREAD_EXAMPLES_EFR32], [test "${OPENTHREAD_EXAMPLES}" = "efr32"])
+
+AC_SUBST(OPENTHREAD_EXAMPLES_EMSK)
+AM_CONDITIONAL([OPENTHREAD_EXAMPLES_EMSK], [test "${OPENTHREAD_EXAMPLES}" = "emsk"])
+
+AC_SUBST(OPENTHREAD_EXAMPLES_KW41Z)
+AM_CONDITIONAL([OPENTHREAD_EXAMPLES_KW41Z], [test "${OPENTHREAD_EXAMPLES}" = "kw41z"])
+
+AC_SUBST(OPENTHREAD_EXAMPLES_NRF52840)
+AM_CONDITIONAL([OPENTHREAD_EXAMPLES_NRF52840], [test "${OPENTHREAD_EXAMPLES}" = "nrf52840"])
+
+#
+# Platform Information
+#
+
+AC_ARG_WITH(platform-info,
+ [AS_HELP_STRING([--with-platform-info=PLATFORM],
+ [Specify the platform information @<:@default=none@:>@.])],
+ [],
+ [with_platform_info=none])
+
+PLATFORM_INFO=${with_platform_info}
+
+AC_MSG_CHECKING([with platform info])
+AC_MSG_RESULT(${PLATFORM_INFO})
+
+AC_SUBST(PLATFORM_INFO)
+AC_DEFINE_UNQUOTED([PLATFORM_INFO],["${PLATFORM_INFO}"],[OpenThread platform information])
+
+#
+# Tools
+#
+
+AC_MSG_CHECKING([whether to build tools])
+AC_ARG_ENABLE(tools,
+ [AS_HELP_STRING([--disable-tools],[Disable building of tools @<:@default=no@:>@.])],
+ [
+ case "${enableval}" in
+
+ no|yes)
+ build_tools=${enableval}
+ ;;
+
+ *)
+ AC_MSG_ERROR([Invalid value ${enableval} for --enable-tools])
+ ;;
+
+ esac
+ ],
+ [build_tools=yes])
+AC_MSG_RESULT(${build_tools})
+AM_CONDITIONAL([OPENTHREAD_BUILD_TOOLS], [test "${build_tools}" = "yes"])
+
+#
+# Documentation
+#
+
+# Determine whether or not documentation (via Doxygen) should be built
+# or not, with 'auto' as the default and establish a default support
+# value for GraphViz 'dot' support.
+
+NL_ENABLE_DOCS([auto],[NO])
+
+AM_CONDITIONAL(OPENTHREAD_BUILD_DOCS, [test "${nl_cv_build_docs}" = "yes"])
+
+#
+# Checks for libraries and packages.
+#
+# At minimum, the following packages are optional, depending on
+# configuration:
+#
+# * TBD
+#
+AC_MSG_NOTICE([checking required package dependencies])
+
+# NL_WITH_PACKAGE(...)
+
+#
+# Check for headers
+#
+
+#---------------------------------------------------
+# Enable BSD Security Features
+# This enables strlcpy() and other friends in GNU land.
+# While the references below generally speak of: "glibc"
+# The ARM Embedded platform uses the nano instance of NEWLIB
+# Which greatly follows and mirrors glibc.
+# --------------------------------------------------
+#
+# References:
+# 1) http://stackoverflow.com/questions/29201515/what-does-d-default-source-do
+# 2) http://man7.org/linux/man-pages/man7/feature_test_macros.7.html
+#
+CFLAGS="${CFLAGS} -D_BSD_SOURCE=1 -D_DEFAULT_SOURCE=1"
+CXXFLAGS="${CXXFLAGS} -D_BSD_SOURCE=1 -D_DEFAULT_SOURCE=1"
+
+OLD_CFLAGS="${CFLAGS}"
+CFLAGS="${CFLAGS} -Wno-error=address"
+AC_HEADER_STDBOOL
+CFLAGS="${OLD_CFLAGS}"
+AC_HEADER_STDC
+
+AC_CHECK_HEADERS([stdint.h])
+AC_CHECK_HEADERS([string.h])
+
+#
+# Missing Functions
+#
+AC_CHECK_FUNC([strlcpy], [AC_DEFINE([HAVE_STRLCPY], [1], [Define if strlcpy exists.])])
+AC_CHECK_FUNC([strlcat], [AC_DEFINE([HAVE_STRLCAT], [1], [Define if strlcat exists.])])
+AC_CHECK_FUNC([strnlen], [AC_DEFINE([HAVE_STRNLEN], [1], [Define if strnlen exists.])])
+
+#
+# Check for types and structures
+#
+AC_TYPE_INT8_T
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_INT64_T
+AC_TYPE_UINT8_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
+
+#
+# Checks for library functions
+#
+
+if test "${ac_no_link}" != "yes"; then
+ AC_CHECK_FUNCS([memcpy])
+fi
+
+# Add any mbedtls CPPFLAGS
+
+CPPFLAGS="${CPPFLAGS} ${MBEDTLS_CPPFLAGS}"
+
+# Add any code coverage CPPFLAGS and LDFLAGS
+
+CPPFLAGS="${CPPFLAGS} ${NL_COVERAGE_CPPFLAGS}"
+LDFLAGS="${LDFLAGS} ${NL_COVERAGE_LDFLAGS}"
+
+# At this point, we can restore the compiler flags to whatever the
+# user passed in, now that we're clear of an -Werror issues by
+# transforming -Wno-error back to -Werror.
+
+NL_RESTORE_WERROR
+
+#
+# Identify the various makefiles and auto-generated files for the package
+#
+AC_CONFIG_FILES([
+Makefile
+include/Makefile
+include/openthread/Makefile
+include/openthread/platform/Makefile
+src/Makefile
+src/cli/Makefile
+src/ncp/Makefile
+src/core/Makefile
+src/diag/Makefile
+third_party/Makefile
+third_party/mbedtls/Makefile
+examples/Makefile
+examples/apps/Makefile
+examples/apps/cli/Makefile
+examples/apps/ncp/Makefile
+examples/platforms/Makefile
+examples/platforms/cc2538/Makefile
+examples/platforms/cc2650/Makefile
+examples/platforms/da15000/Makefile
+examples/platforms/efr32/Makefile
+examples/platforms/emsk/Makefile
+examples/platforms/kw41z/Makefile
+examples/platforms/nrf52840/Makefile
+examples/platforms/posix/Makefile
+examples/platforms/utils/Makefile
+tools/Makefile
+tools/harness-automation/Makefile
+tools/harness-thci/Makefile
+tools/spi-hdlc-adapter/Makefile
+tests/Makefile
+tests/scripts/Makefile
+tests/scripts/thread-cert/Makefile
+tests/unit/Makefile
+doc/Makefile
+])
+
+#
+# Generate the auto-generated files for the package
+#
+AC_OUTPUT
+
+#
+# Summarize the package configuration
+#
+
+AC_MSG_NOTICE([
+
+ Configuration Summary
+ ---------------------
+ Package : ${PACKAGE_NAME}
+ Version : ${PACKAGE_VERSION}
+ Interface : ${LIBOPENTHREAD_VERSION_INFO//:/.}
+ Build system : ${build}
+ Host system : ${host}
+ Host architecture : ${host_cpu}
+ Host OS : ${host_os}
+ Cross compiling : ${cross_compiling}
+ Build shared libraries : ${enable_shared}
+ Build static libraries : ${enable_static}
+ Build debug libraries : ${nl_cv_build_debug}
+ Build optimized libraries : ${nl_cv_build_optimized}
+ Build coverage libraries : ${nl_cv_build_coverage}
+ Build coverage reports : ${nl_cv_build_coverage_reports}
+ Address sanitizer support : ${enable_address_sanitizer}
+ Lcov : ${LCOV:--}
+ Genhtml : ${GENHTML:--}
+ Build tests : ${nl_cv_build_tests}
+ Build tools : ${build_tools}
+ OpenThread tests : ${with_tests}
+ Prefix : ${prefix}
+ Documentation support : ${nl_cv_build_docs}
+ Doxygen : ${DOXYGEN:--}
+ GraphViz dot : ${DOT:--}
+ C Preprocessor : ${CPP}
+ C Compiler : ${CC}
+ C++ Preprocessor : ${CXXCPP}
+ C++ Compiler : ${CXX}
+ Assembler Compiler : ${CCAS}
+ Archiver : ${AR}
+ Archive Indexer : ${RANLIB}
+ Symbol Stripper : ${STRIP}
+ Object Copier : ${OBJCOPY}
+ C Preprocessor flags : ${CPPFLAGS:--}
+ C Compile flags : ${CFLAGS:--}
+ C++ Compile flags : ${CXXFLAGS:--}
+ Assembler flags : ${CCASFLAGS:--}
+ Link flags : ${LDFLAGS:--}
+ Link libraries : ${LIBS}
+ Pretty : ${PRETTY:--}
+ Pretty args : ${PRETTY_ARGS:--}
+ Pretty check : ${PRETTY_CHECK:--}
+ Pretty check args : ${PRETTY_CHECK_ARGS:--}
+ OpenThread CLI support : ${enable_cli_app}
+ OpenThread CLI-MTD support : ${enable_cli_app_mtd}
+ OpenThread CLI-FTD support : ${enable_cli_app_ftd}
+ OpenThread NCP support : ${enable_ncp_app}
+ OpenThread NCP-MTD support : ${enable_ncp_app_mtd}
+ OpenThread NCP-FTD support : ${enable_ncp_app_ftd}
+ OpenThread NCP-BUS Configuration : ${with_ncp_bus}
+ OpenThread Multiple Instances support : ${enable_multiple_instances}
+ OpenThread MTD Network Diagnostic support : ${enable_mtd_network_diagnostic}
+ OpenThread builtin mbedtls support : ${enable_builtin_mbedtls}
+ OpenThread TMF Proxy support : ${enable_tmf_proxy}
+ OpenThread Commissioner support : ${enable_commissioner}
+ OpenThread Joiner support : ${enable_joiner}
+ OpenThread DTLS support : ${enable_dtls}
+ OpenThread Jam Detection support : ${enable_jam_detection}
+ OpenThread MAC Whitelist support : ${enable_mac_whitelist}
+ OpenThread Diagnostics support : ${enable_diag}
+ OpenThread Child Supervision support : ${enable_child_supervision}
+ OpenThread Legacy network support : ${enable_legacy}
+ OpenThread Certification log support : ${enable_cert_log}
+ OpenThread DHCPv6 Server support : ${enable_dhcp6_server}
+ OpenThread DHCPv6 Client support : ${enable_dhcp6_client}
+ OpenThread DNS Client support : ${enable_dns_client}
+ OpenThread Application CoAP support : ${enable_application_coap}
+ OpenThread Raw Link-Layer support : ${enable_raw_link_api}
+ OpenThread Border Router support : ${enable_border_router}
+ OpenThread examples : ${OPENTHREAD_EXAMPLES}
+ OpenThread platform information : ${PLATFORM_INFO}
+
+])
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
new file mode 100644
index 0000000..e8e7261
--- /dev/null
+++ b/doc/Doxyfile.in
@@ -0,0 +1,2384 @@
+# Doxyfile 1.8.6
+
+#
+# Copyright (c) 2016, The OpenThread Authors.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+# Description:
+# This file describes the settings to be used by the
+# documentation system # doxygen (www.doxygen.org) for OpenThread.
+#
+# This was initially autogenerated 'doxywizard' and then hand-tuned.
+#
+# All text after a hash (#) is considered a comment and will be
+# ignored.
+#
+# The format is:
+#
+# TAG = value [value, ...]
+#
+# For lists items can also be appended using:
+#
+# TAG += value [value, ...]
+#
+# Values that contain spaces should be placed between quotes (" ")
+#
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = OpenThread
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER = @PACKAGE_VERSION@
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO = @abs_srcdir@/images/Open-Thread-Logo-200x42.png
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = @abs_builddir@
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH = @abs_top_srcdir@ \
+ @abs_top_builddir@
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH = @abs_top_srcdir@
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = YES
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = @abs_top_builddir@/src \
+ @abs_top_srcdir@/include \
+ @abs_top_srcdir@/doc \
+ @abs_top_srcdir@/README.md
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.d \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.idl \
+ *.odl \
+ *.cs \
+ *.php \
+ *.php3 \
+ *.inc \
+ *.m \
+ *.mm \
+ *.dox \
+ *.py \
+ *.f90 \
+ *.f \
+ *.for \
+ *.vhd \
+ *.vhdl
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE = ../src/ncp/ncp.pb-c.h \
+ ../src/ncp/ncp.pb-c.c
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH = @abs_srcdir@/images/
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE = README.md
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER = @abs_srcdir@/header.html
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = YES
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 1
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavours of web server based searching depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools. See
+# the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = letter
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = YES
+
+# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF = YES
+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH = @abs_top_srcdir@/include
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED = __attribute__(x)=
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all refrences to function-like macros that are alone on a line, have an
+# all uppercase name, and do not end with a semicolon. Such function macros are
+# typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have an unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS = YES
+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH = @PERL@
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT = @DOXYGEN_USE_DOT@
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# When you want a differently looking font n the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH = YES
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS = YES
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP = YES
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..3272f64
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,114 @@
+#
+# Copyright (c) 2016, The OpenThread Authors.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
+
+EXTRA_DIST = \
+ $(srcdir)/Doxyfile.in \
+ $(srcdir)/header.html \
+ $(srcdir)/images/Open-Thread-Logo-200x42.png \
+ $(srcdir)/images/openthread_contrib.png \
+ $(srcdir)/images/openthread_logo.png \
+ draft-rquattle-spinel-unified.html \
+ draft-rquattle-spinel-unified.txt \
+ $(NULL)
+
+#
+# Override autotool's default notion of the package version variables.
+# This ensures that when we create a doc distribution that the
+# version is always the current version, not the version when the
+# package was bootstrapped.
+#
+PACKAGE_VERSION = $(shell cat $(top_builddir)/.local-version)
+VERSION = $(PACKAGE_VERSION)
+
+
+docdistdir ?= .
+
+openthread_docdist_alias = \
+ $(PACKAGE_TARNAME)-docs
+
+openthread_docdist_name = \
+ $(openthread_docdist_alias)-$(VERSION)
+
+openthread_docdist_archive = \
+ $(docdistdir)/$(openthread_docdist_name).tar.gz
+
+CLEANFILES = \
+ Doxyfile \
+ $(openthread_docdist_archive) \
+ $(NULL)
+
+if OPENTHREAD_BUILD_DOCS
+
+all-local: html/index.html
+
+#
+# We choose to manually transform Doxyfile.in into Doxyfile here in
+# the makefile rather than in the configure script so that we can take
+# advantage of live, at build time (rather than at configure time),
+# updating of the package version number.
+#
+
+Doxyfile: $(srcdir)/Doxyfile.in Makefile
+ $(AM_V_GEN)$(SED) \
+ -e "s,\@DOXYGEN_USE_DOT\@,$(DOXYGEN_USE_DOT),g" \
+ -e "s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),g" \
+ -e "s,\@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g" \
+ -e "s,\@PERL\@,$(PERL),g" \
+ -e "s,\@abs_builddir\@,$(abs_builddir),g" \
+ -e "s,\@abs_srcdir\@,$(abs_srcdir),g" \
+ -e "s,\@abs_top_builddir\@,$(abs_top_builddir),g" \
+ -e "s,\@abs_top_srcdir\@,$(abs_top_srcdir),g" \
+ < "$(srcdir)/Doxyfile.in" > "$(@)"
+
+html/index.html: Doxyfile
+ $(AM_V_GEN)$(DOXYGEN) $(<)
+
+#
+# Addition rules and commands to create a documentation-only
+# distribution of openthread
+#
+
+$(openthread_docdist_name): html/index.html
+ $(AM_V_at)rm -f -r $(@)
+ $(call create-directory)
+ $(AM_V_at)cp -R html $(@)
+
+$(openthread_docdist_archive): $(openthread_docdist_name)
+ $(AM_V_at)echo " TAR $(@)"
+ $(AM_V_at)tardir="$(<)" && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c > "$(@)" && rm -rf $(<)
+
+docdist $(openthread_docdist_alias): $(openthread_docdist_archive)
+
+clean-local:
+ $(AM_V_at)rm -f -r html
+
+endif # OPENTHREAD_BUILD_DOCS
+
+include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/doc/draft-rquattle-spinel-unified.html b/doc/draft-rquattle-spinel-unified.html
new file mode 100644
index 0000000..1c4d49a
--- /dev/null
+++ b/doc/draft-rquattle-spinel-unified.html
@@ -0,0 +1,4925 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+
+ <title>Spinel Host-Controller Protocol</title>
+
+ <style type="text/css" title="Xml2Rfc (sans serif)">
+ /*<![CDATA[*/
+ a {
+ text-decoration: none;
+ }
+ /* info code from SantaKlauss at http://www.madaboutstyle.com/tooltip2.html */
+ a.info {
+ /* This is the key. */
+ position: relative;
+ z-index: 24;
+ text-decoration: none;
+ }
+ a.info:hover {
+ z-index: 25;
+ color: #FFF; background-color: #900;
+ }
+ a.info span { display: none; }
+ a.info:hover span.info {
+ /* The span will display just on :hover state. */
+ display: block;
+ position: absolute;
+ font-size: smaller;
+ top: 2em; left: -5em; width: 15em;
+ padding: 2px; border: 1px solid #333;
+ color: #900; background-color: #EEE;
+ text-align: left;
+ }
+ a.smpl {
+ color: black;
+ }
+ a:hover {
+ text-decoration: underline;
+ }
+ a:active {
+ text-decoration: underline;
+ }
+ address {
+ margin-top: 1em;
+ margin-left: 2em;
+ font-style: normal;
+ }
+ body {
+ color: black;
+ font-family: verdana, helvetica, arial, sans-serif;
+ font-size: 10pt;
+ max-width: 55em;
+
+ }
+ cite {
+ font-style: normal;
+ }
+ dd {
+ margin-right: 2em;
+ }
+ dl {
+ margin-left: 2em;
+ }
+
+ ul.empty {
+ list-style-type: none;
+ }
+ ul.empty li {
+ margin-top: .5em;
+ }
+ dl p {
+ margin-left: 0em;
+ }
+ dt {
+ margin-top: .5em;
+ }
+ h1 {
+ font-size: 14pt;
+ line-height: 21pt;
+ page-break-after: avoid;
+ }
+ h1.np {
+ page-break-before: always;
+ }
+ h1 a {
+ color: #333333;
+ }
+ h2 {
+ font-size: 12pt;
+ line-height: 15pt;
+ page-break-after: avoid;
+ }
+ h3, h4, h5, h6 {
+ font-size: 10pt;
+ page-break-after: avoid;
+ }
+ h2 a, h3 a, h4 a, h5 a, h6 a {
+ color: black;
+ }
+ img {
+ margin-left: 3em;
+ }
+ li {
+ margin-left: 2em;
+ margin-right: 2em;
+ }
+ ol {
+ margin-left: 2em;
+ margin-right: 2em;
+ }
+ ol p {
+ margin-left: 0em;
+ }
+ p {
+ margin-left: 2em;
+ margin-right: 2em;
+ }
+ pre {
+ margin-left: 3em;
+ background-color: lightyellow;
+ padding: .25em;
+ }
+ pre.text2 {
+ border-style: dotted;
+ border-width: 1px;
+ background-color: #f0f0f0;
+ width: 69em;
+ }
+ pre.inline {
+ background-color: white;
+ padding: 0em;
+ }
+ pre.text {
+ border-style: dotted;
+ border-width: 1px;
+ background-color: #f8f8f8;
+ width: 69em;
+ }
+ pre.drawing {
+ border-style: solid;
+ border-width: 1px;
+ background-color: #f8f8f8;
+ padding: 2em;
+ }
+ table {
+ margin-left: 2em;
+ }
+ table.tt {
+ vertical-align: top;
+ }
+ table.full {
+ border-style: outset;
+ border-width: 1px;
+ }
+ table.headers {
+ border-style: outset;
+ border-width: 1px;
+ }
+ table.tt td {
+ vertical-align: top;
+ }
+ table.full td {
+ border-style: inset;
+ border-width: 1px;
+ }
+ table.tt th {
+ vertical-align: top;
+ }
+ table.full th {
+ border-style: inset;
+ border-width: 1px;
+ }
+ table.headers th {
+ border-style: none none inset none;
+ border-width: 1px;
+ }
+ table.left {
+ margin-right: auto;
+ }
+ table.right {
+ margin-left: auto;
+ }
+ table.center {
+ margin-left: auto;
+ margin-right: auto;
+ }
+ caption {
+ caption-side: bottom;
+ font-weight: bold;
+ font-size: 9pt;
+ margin-top: .5em;
+ }
+
+ table.header {
+ border-spacing: 1px;
+ width: 95%;
+ font-size: 10pt;
+ color: white;
+ }
+ td.top {
+ vertical-align: top;
+ }
+ td.topnowrap {
+ vertical-align: top;
+ white-space: nowrap;
+ }
+ table.header td {
+ background-color: gray;
+ width: 50%;
+ }
+ table.header a {
+ color: white;
+ }
+ td.reference {
+ vertical-align: top;
+ white-space: nowrap;
+ padding-right: 1em;
+ }
+ thead {
+ display:table-header-group;
+ }
+ ul.toc, ul.toc ul {
+ list-style: none;
+ margin-left: 1.5em;
+ margin-right: 0em;
+ padding-left: 0em;
+ }
+ ul.toc li {
+ line-height: 150%;
+ font-weight: bold;
+ font-size: 10pt;
+ margin-left: 0em;
+ margin-right: 0em;
+ }
+ ul.toc li li {
+ line-height: normal;
+ font-weight: normal;
+ font-size: 9pt;
+ margin-left: 0em;
+ margin-right: 0em;
+ }
+ li.excluded {
+ font-size: 0pt;
+ }
+ ul p {
+ margin-left: 0em;
+ }
+
+ .comment {
+ background-color: yellow;
+ }
+ .center {
+ text-align: center;
+ }
+ .error {
+ color: red;
+ font-style: italic;
+ font-weight: bold;
+ }
+ .figure {
+ font-weight: bold;
+ text-align: center;
+ font-size: 9pt;
+ }
+ .filename {
+ color: #333333;
+ font-weight: bold;
+ font-size: 12pt;
+ line-height: 21pt;
+ text-align: center;
+ }
+ .fn {
+ font-weight: bold;
+ }
+ .hidden {
+ display: none;
+ }
+ .left {
+ text-align: left;
+ }
+ .right {
+ text-align: right;
+ }
+ .title {
+ color: #990000;
+ font-size: 18pt;
+ line-height: 18pt;
+ font-weight: bold;
+ text-align: center;
+ margin-top: 36pt;
+ }
+ .vcardline {
+ display: block;
+ }
+ .warning {
+ font-size: 14pt;
+ background-color: yellow;
+ }
+
+
+ @media print {
+ .noprint {
+ display: none;
+ }
+
+ a {
+ color: black;
+ text-decoration: none;
+ }
+
+ table.header {
+ width: 90%;
+ }
+
+ td.header {
+ width: 50%;
+ color: black;
+ background-color: white;
+ vertical-align: top;
+ font-size: 12pt;
+ }
+
+ ul.toc a::after {
+ content: leader('.') target-counter(attr(href), page);
+ }
+
+ ul.ind li li a {
+ content: target-counter(attr(href), page);
+ }
+
+ .print2col {
+ column-count: 2;
+ -moz-column-count: 2;
+ column-fill: auto;
+ }
+ }
+
+ @page {
+ @top-left {
+ content: "Internet-Draft";
+ }
+ @top-right {
+ content: "December 2010";
+ }
+ @top-center {
+ content: "Abbreviated Title";
+ }
+ @bottom-left {
+ content: "Doe";
+ }
+ @bottom-center {
+ content: "Expires June 2011";
+ }
+ @bottom-right {
+ content: "[Page " counter(page) "]";
+ }
+ }
+
+ @page:first {
+ @top-left {
+ content: normal;
+ }
+ @top-right {
+ content: normal;
+ }
+ @top-center {
+ content: normal;
+ }
+ }
+ /*]]>*/
+ </style>
+
+ <link href="#rfc.toc" rel="Contents"/>
+<link href="#rfc.section.1" rel="Chapter" title="1 Introduction"/>
+<link href="#rfc.section.1.1" rel="Chapter" title="1.1 About this Draft"/>
+<link href="#rfc.section.1.1.1" rel="Chapter" title="1.1.1 Scope"/>
+<link href="#rfc.section.1.1.2" rel="Chapter" title="1.1.2 Renumbering"/>
+<link href="#rfc.section.2" rel="Chapter" title="2 Frame Format"/>
+<link href="#rfc.section.2.1" rel="Chapter" title="2.1 Header Format"/>
+<link href="#rfc.section.2.1.1" rel="Chapter" title="2.1.1 FLG: Flag"/>
+<link href="#rfc.section.2.1.2" rel="Chapter" title="2.1.2 NLI: Network Link Identifier"/>
+<link href="#rfc.section.2.1.3" rel="Chapter" title="2.1.3 TID: Transaction Identifier"/>
+<link href="#rfc.section.2.1.4" rel="Chapter" title="2.1.4 Command Identifier (CMD)"/>
+<link href="#rfc.section.2.1.5" rel="Chapter" title="2.1.5 Command Payload (Optional)"/>
+<link href="#rfc.section.3" rel="Chapter" title="3 Data Packing"/>
+<link href="#rfc.section.3.1" rel="Chapter" title="3.1 Primitive Types"/>
+<link href="#rfc.section.3.2" rel="Chapter" title="3.2 Packed Unsigned Integer"/>
+<link href="#rfc.section.3.3" rel="Chapter" title="3.3 Data Blobs"/>
+<link href="#rfc.section.3.4" rel="Chapter" title="3.4 Structured Data"/>
+<link href="#rfc.section.3.5" rel="Chapter" title="3.5 Arrays"/>
+<link href="#rfc.section.4" rel="Chapter" title="4 Commands"/>
+<link href="#rfc.section.4.1" rel="Chapter" title="4.1 CMD 0: (Host->NCP) CMD_NOOP"/>
+<link href="#rfc.section.4.2" rel="Chapter" title="4.2 CMD 1: (Host->NCP) CMD_RESET"/>
+<link href="#rfc.section.4.3" rel="Chapter" title="4.3 CMD 2: (Host->NCP) CMD_PROP_VALUE_GET"/>
+<link href="#rfc.section.4.4" rel="Chapter" title="4.4 CMD 3: (Host->NCP) CMD_PROP_VALUE_SET"/>
+<link href="#rfc.section.4.5" rel="Chapter" title="4.5 CMD 4: (Host->NCP) CMD_PROP_VALUE_INSERT"/>
+<link href="#rfc.section.4.6" rel="Chapter" title="4.6 CMD 5: (Host->NCP) CMD_PROP_VALUE_REMOVE"/>
+<link href="#rfc.section.4.7" rel="Chapter" title="4.7 CMD 6: (NCP->Host) CMD_PROP_VALUE_IS"/>
+<link href="#rfc.section.4.8" rel="Chapter" title="4.8 CMD 7: (NCP->Host) CMD_PROP_VALUE_INSERTED"/>
+<link href="#rfc.section.4.9" rel="Chapter" title="4.9 CMD 8: (NCP->Host) CMD_PROP_VALUE_REMOVED"/>
+<link href="#rfc.section.4.10" rel="Chapter" title="4.10 CMD 18: (Host->NCP) CMD_PEEK"/>
+<link href="#rfc.section.4.11" rel="Chapter" title="4.11 CMD 19: (NCP->Host) CMD_PEEK_RET"/>
+<link href="#rfc.section.4.12" rel="Chapter" title="4.12 CMD 20: (Host->NCP) CMD_POKE"/>
+<link href="#rfc.section.4.13" rel="Chapter" title="4.13 CMD 21: (Host->NCP) CMD_PROP_VALUE_MULTI_GET"/>
+<link href="#rfc.section.4.14" rel="Chapter" title="4.14 CMD 22: (Host->NCP) CMD_PROP_VALUE_MULTI_SET"/>
+<link href="#rfc.section.4.15" rel="Chapter" title="4.15 CMD 23: (NCP->Host) CMD_PROP_VALUES_ARE"/>
+<link href="#rfc.section.5" rel="Chapter" title="5 Properties"/>
+<link href="#rfc.section.5.1" rel="Chapter" title="5.1 Property Methods"/>
+<link href="#rfc.section.5.2" rel="Chapter" title="5.2 Property Types"/>
+<link href="#rfc.section.5.2.1" rel="Chapter" title="5.2.1 Single-Value Properties"/>
+<link href="#rfc.section.5.2.2" rel="Chapter" title="5.2.2 Multiple-Value Properties"/>
+<link href="#rfc.section.5.2.3" rel="Chapter" title="5.2.3 Stream Properties"/>
+<link href="#rfc.section.5.3" rel="Chapter" title="5.3 Property Numbering"/>
+<link href="#rfc.section.5.4" rel="Chapter" title="5.4 Property Sections"/>
+<link href="#rfc.section.5.5" rel="Chapter" title="5.5 Core Properties"/>
+<link href="#rfc.section.5.5.1" rel="Chapter" title="5.5.1 PROP 0: PROP_LAST_STATUS"/>
+<link href="#rfc.section.5.5.2" rel="Chapter" title="5.5.2 PROP 1: PROP_PROTOCOL_VERSION"/>
+<link href="#rfc.section.5.5.3" rel="Chapter" title="5.5.3 PROP 2: PROP_NCP_VERSION"/>
+<link href="#rfc.section.5.5.4" rel="Chapter" title="5.5.4 PROP 3: PROP_INTERFACE_TYPE"/>
+<link href="#rfc.section.5.5.5" rel="Chapter" title="5.5.5 PROP 4: PROP_INTERFACE_VENDOR_ID"/>
+<link href="#rfc.section.5.5.6" rel="Chapter" title="5.5.6 PROP 5: PROP_CAPS"/>
+<link href="#rfc.section.5.5.7" rel="Chapter" title="5.5.7 PROP 6: PROP_INTERFACE_COUNT"/>
+<link href="#rfc.section.5.5.8" rel="Chapter" title="5.5.8 PROP 7: PROP_POWER_STATE"/>
+<link href="#rfc.section.5.5.9" rel="Chapter" title="5.5.9 PROP 8: PROP_HWADDR"/>
+<link href="#rfc.section.5.5.10" rel="Chapter" title="5.5.10 PROP 9: PROP_LOCK"/>
+<link href="#rfc.section.5.5.11" rel="Chapter" title="5.5.11 PROP 10: PROP_HOST_POWER_STATE"/>
+<link href="#rfc.section.5.5.12" rel="Chapter" title="5.5.12 PROP 4104: PROP_UNSOL_UPDATE_FILTER"/>
+<link href="#rfc.section.5.5.13" rel="Chapter" title="5.5.13 PROP 4105: PROP_UNSOL_UPDATE_LIST"/>
+<link href="#rfc.section.5.6" rel="Chapter" title="5.6 Stream Properties"/>
+<link href="#rfc.section.5.6.1" rel="Chapter" title="5.6.1 PROP 112: PROP_STREAM_DEBUG"/>
+<link href="#rfc.section.5.6.2" rel="Chapter" title="5.6.2 PROP 113: PROP_STREAM_RAW"/>
+<link href="#rfc.section.5.6.3" rel="Chapter" title="5.6.3 PROP 114: PROP_STREAM_NET"/>
+<link href="#rfc.section.5.6.4" rel="Chapter" title="5.6.4 PROP 115: PROP_STREAM_NET_INSECURE"/>
+<link href="#rfc.section.5.7" rel="Chapter" title="5.7 PHY Properties"/>
+<link href="#rfc.section.5.7.1" rel="Chapter" title="5.7.1 PROP 32: PROP_PHY_ENABLED"/>
+<link href="#rfc.section.5.7.2" rel="Chapter" title="5.7.2 PROP 33: PROP_PHY_CHAN"/>
+<link href="#rfc.section.5.7.3" rel="Chapter" title="5.7.3 PROP 34: PROP_PHY_CHAN_SUPPORTED"/>
+<link href="#rfc.section.5.7.4" rel="Chapter" title="5.7.4 PROP 35: PROP_PHY_FREQ"/>
+<link href="#rfc.section.5.7.5" rel="Chapter" title="5.7.5 PROP 36: PROP_PHY_CCA_THRESHOLD"/>
+<link href="#rfc.section.5.7.6" rel="Chapter" title="5.7.6 PROP 37: PROP_PHY_TX_POWER"/>
+<link href="#rfc.section.5.7.7" rel="Chapter" title="5.7.7 PROP 38: PROP_PHY_RSSI"/>
+<link href="#rfc.section.5.7.8" rel="Chapter" title="5.7.8 PROP 39: PROP_PHY_RX_SENSITIVITY"/>
+<link href="#rfc.section.5.8" rel="Chapter" title="5.8 MAC Properties"/>
+<link href="#rfc.section.5.8.1" rel="Chapter" title="5.8.1 PROP 48: PROP_MAC_SCAN_STATE"/>
+<link href="#rfc.section.5.8.2" rel="Chapter" title="5.8.2 PROP 49: PROP_MAC_SCAN_MASK"/>
+<link href="#rfc.section.5.8.3" rel="Chapter" title="5.8.3 PROP 50: PROP_MAC_SCAN_PERIOD"/>
+<link href="#rfc.section.5.8.4" rel="Chapter" title="5.8.4 PROP 51: PROP_MAC_SCAN_BEACON"/>
+<link href="#rfc.section.5.8.5" rel="Chapter" title="5.8.5 PROP 52: PROP_MAC_15_4_LADDR"/>
+<link href="#rfc.section.5.8.6" rel="Chapter" title="5.8.6 PROP 53: PROP_MAC_15_4_SADDR"/>
+<link href="#rfc.section.5.8.7" rel="Chapter" title="5.8.7 PROP 54: PROP_MAC_15_4_PANID"/>
+<link href="#rfc.section.5.8.8" rel="Chapter" title="5.8.8 PROP 55: PROP_MAC_RAW_STREAM_ENABLED"/>
+<link href="#rfc.section.5.8.9" rel="Chapter" title="5.8.9 PROP 56: PROP_MAC_PROMISCUOUS_MODE"/>
+<link href="#rfc.section.5.8.10" rel="Chapter" title="5.8.10 PROP 57: PROP_MAC_ENERGY_SCAN_RESULT"/>
+<link href="#rfc.section.5.8.11" rel="Chapter" title="5.8.11 PROP 4864: PROP_MAC_WHITELIST"/>
+<link href="#rfc.section.5.8.12" rel="Chapter" title="5.8.12 PROP 4865: PROP_MAC_WHITELIST_ENABLED"/>
+<link href="#rfc.section.5.8.13" rel="Chapter" title="5.8.13 PROP 4867: SPINEL_PROP_MAC_SRC_MATCH_ENABLED"/>
+<link href="#rfc.section.5.8.14" rel="Chapter" title="5.8.14 PROP 4868: SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES"/>
+<link href="#rfc.section.5.8.15" rel="Chapter" title="5.8.15 PROP 4869: SPINEL_PROP_MAC_SRC_MATCH_EXTENDED_ADDRESSES"/>
+<link href="#rfc.section.5.8.16" rel="Chapter" title="5.8.16 PROP 4870: PROP_MAC_BLACKLIST"/>
+<link href="#rfc.section.5.8.17" rel="Chapter" title="5.8.17 PROP 4871: PROP_MAC_BLACKLIST_ENABLED"/>
+<link href="#rfc.section.5.9" rel="Chapter" title="5.9 NET Properties"/>
+<link href="#rfc.section.5.9.1" rel="Chapter" title="5.9.1 PROP 64: PROP_NET_SAVED"/>
+<link href="#rfc.section.5.9.2" rel="Chapter" title="5.9.2 PROP 65: PROP_NET_IF_UP"/>
+<link href="#rfc.section.5.9.3" rel="Chapter" title="5.9.3 PROP 66: PROP_NET_STACK_UP"/>
+<link href="#rfc.section.5.9.4" rel="Chapter" title="5.9.4 PROP 67: PROP_NET_ROLE"/>
+<link href="#rfc.section.5.9.5" rel="Chapter" title="5.9.5 PROP 68: PROP_NET_NETWORK_NAME"/>
+<link href="#rfc.section.5.9.6" rel="Chapter" title="5.9.6 PROP 69: PROP_NET_XPANID"/>
+<link href="#rfc.section.5.9.7" rel="Chapter" title="5.9.7 PROP 70: PROP_NET_MASTER_KEY"/>
+<link href="#rfc.section.5.9.8" rel="Chapter" title="5.9.8 PROP 71: PROP_NET_KEY_SEQUENCE_COUNTER"/>
+<link href="#rfc.section.5.9.9" rel="Chapter" title="5.9.9 PROP 72: PROP_NET_PARTITION_ID"/>
+<link href="#rfc.section.5.9.10" rel="Chapter" title="5.9.10 PROP 73: PROP_NET_REQUIRE_JOIN_EXISTING"/>
+<link href="#rfc.section.5.9.11" rel="Chapter" title="5.9.11 PROP 74: PROP_NET_KEY_SWITCH_GUARDTIME"/>
+<link href="#rfc.section.5.9.12" rel="Chapter" title="5.9.12 PROP 75: PROP_NET_PSKC"/>
+<link href="#rfc.section.5.10" rel="Chapter" title="5.10 IPv6 Properties"/>
+<link href="#rfc.section.5.10.1" rel="Chapter" title="5.10.1 PROP 96: PROP_IPV6_LL_ADDR"/>
+<link href="#rfc.section.5.10.2" rel="Chapter" title="5.10.2 PROP 97: PROP_IPV6_ML_ADDR"/>
+<link href="#rfc.section.5.10.3" rel="Chapter" title="5.10.3 PROP 98: PROP_IPV6_ML_PREFIX"/>
+<link href="#rfc.section.5.10.4" rel="Chapter" title="5.10.4 PROP 99: PROP_IPV6_ADDRESS_TABLE"/>
+<link href="#rfc.section.5.10.5" rel="Chapter" title="5.10.5 PROP 101: PROP_IPv6_ICMP_PING_OFFLOAD"/>
+<link href="#rfc.section.5.11" rel="Chapter" title="5.11 Debug Properties"/>
+<link href="#rfc.section.5.11.1" rel="Chapter" title="5.11.1 PROP 16384: PROP_DEBUG_TEST_ASSERT"/>
+<link href="#rfc.section.5.11.2" rel="Chapter" title="5.11.2 PROP 16385: PROP_DEBUG_NCP_LOG_LEVEL"/>
+<link href="#rfc.section.6" rel="Chapter" title="6 Status Codes"/>
+<link href="#rfc.section.7" rel="Chapter" title="7 Technology: Thread(R)"/>
+<link href="#rfc.section.7.1" rel="Chapter" title="7.1 Capabilities"/>
+<link href="#rfc.section.7.2" rel="Chapter" title="7.2 Properties"/>
+<link href="#rfc.section.7.2.1" rel="Chapter" title="7.2.1 PROP 80: PROP_THREAD_LEADER_ADDR"/>
+<link href="#rfc.section.7.2.2" rel="Chapter" title="7.2.2 PROP 81: PROP_THREAD_PARENT"/>
+<link href="#rfc.section.7.2.3" rel="Chapter" title="7.2.3 PROP 82: PROP_THREAD_CHILD_TABLE"/>
+<link href="#rfc.section.7.2.4" rel="Chapter" title="7.2.4 PROP 83: PROP_THREAD_LEADER_RID"/>
+<link href="#rfc.section.7.2.5" rel="Chapter" title="7.2.5 PROP 84: PROP_THREAD_LEADER_WEIGHT"/>
+<link href="#rfc.section.7.2.6" rel="Chapter" title="7.2.6 PROP 85: PROP_THREAD_LOCAL_LEADER_WEIGHT"/>
+<link href="#rfc.section.7.2.7" rel="Chapter" title="7.2.7 PROP 86: PROP_THREAD_NETWORK_DATA"/>
+<link href="#rfc.section.7.2.8" rel="Chapter" title="7.2.8 PROP 87: PROP_THREAD_NETWORK_DATA_VERSION"/>
+<link href="#rfc.section.7.2.9" rel="Chapter" title="7.2.9 PROP 88: PROP_THREAD_STABLE_NETWORK_DATA"/>
+<link href="#rfc.section.7.2.10" rel="Chapter" title="7.2.10 PROP 89: PROP_THREAD_STABLE_NETWORK_DATA_VERSION"/>
+<link href="#rfc.section.7.2.11" rel="Chapter" title="7.2.11 PROP 90: PROP_THREAD_ON_MESH_NETS"/>
+<link href="#rfc.section.7.2.12" rel="Chapter" title="7.2.12 PROP 91: PROP_THREAD_OFF_MESH_ROUTES"/>
+<link href="#rfc.section.7.2.13" rel="Chapter" title="7.2.13 PROP 92: PROP_THREAD_ASSISTING_PORTS"/>
+<link href="#rfc.section.7.2.14" rel="Chapter" title="7.2.14 PROP 93: PROP_THREAD_ALLOW_LOCAL_NET_DATA_CHANGE"/>
+<link href="#rfc.section.7.2.15" rel="Chapter" title="7.2.15 PROP 94: PROP_THREAD_MODE"/>
+<link href="#rfc.section.7.2.16" rel="Chapter" title="7.2.16 PROP 5376: PROP_THREAD_CHILD_TIMEOUT"/>
+<link href="#rfc.section.7.2.17" rel="Chapter" title="7.2.17 PROP 5377: PROP_THREAD_RLOC16"/>
+<link href="#rfc.section.7.2.18" rel="Chapter" title="7.2.18 PROP 5378: PROP_THREAD_ROUTER_UPGRADE_THRESHOLD"/>
+<link href="#rfc.section.7.2.19" rel="Chapter" title="7.2.19 PROP 5379: PROP_THREAD_CONTEXT_REUSE_DELAY"/>
+<link href="#rfc.section.7.2.20" rel="Chapter" title="7.2.20 PROP 5380: PROP_THREAD_NETWORK_ID_TIMEOUT"/>
+<link href="#rfc.section.7.2.21" rel="Chapter" title="7.2.21 PROP 5381: PROP_THREAD_ACTIVE_ROUTER_IDS"/>
+<link href="#rfc.section.7.2.22" rel="Chapter" title="7.2.22 PROP 5382: PROP_THREAD_RLOC16_DEBUG_PASSTHRU"/>
+<link href="#rfc.section.7.2.23" rel="Chapter" title="7.2.23 PROP 5383: PROP_THREAD_ROUTER_ROLE_ENABLED"/>
+<link href="#rfc.section.7.2.24" rel="Chapter" title="7.2.24 PROP 5384: PROP_THREAD_ROUTER_DOWNGRADE_THRESHOLD"/>
+<link href="#rfc.section.7.2.25" rel="Chapter" title="7.2.25 PROP 5385: PROP_THREAD_ROUTER_SELECTION_JITTER"/>
+<link href="#rfc.section.7.2.26" rel="Chapter" title="7.2.26 PROP 5386: PROP_THREAD_PREFERRED_ROUTER_ID"/>
+<link href="#rfc.section.7.2.27" rel="Chapter" title="7.2.27 PROP 5387: PROP_THREAD_NEIGHBOR_TABLE"/>
+<link href="#rfc.section.7.2.28" rel="Chapter" title="7.2.28 PROP 5388: PROP_THREAD_CHILD_COUNT_MAX"/>
+<link href="#rfc.section.7.2.29" rel="Chapter" title="7.2.29 PROP 5389: PROP_THREAD_LEADER_NETWORK_DATA"/>
+<link href="#rfc.section.7.2.30" rel="Chapter" title="7.2.30 PROP 5390: PROP_THREAD_STABLE_LEADER_NETWORK_DATA"/>
+<link href="#rfc.section.7.2.31" rel="Chapter" title="7.2.31 PROP 5391: PROP_THREAD_JOINERS"/>
+<link href="#rfc.section.7.2.32" rel="Chapter" title="7.2.32 PROP 5392: PROP_THREAD_COMMISSIONER_ENABLED"/>
+<link href="#rfc.section.7.2.33" rel="Chapter" title="7.2.33 PROP 5393: PROP_THREAD_TMF_PROXY_ENABLED"/>
+<link href="#rfc.section.7.2.34" rel="Chapter" title="7.2.34 PROP 5394: PROP_THREAD_TMF_PROXY_STREAM"/>
+<link href="#rfc.section.7.2.35" rel="Chapter" title="7.2.35 PROP 5395: PROP_THREAD_DISOVERY_SCAN_JOINER_FLAG"/>
+<link href="#rfc.section.7.2.36" rel="Chapter" title="7.2.36 PROP 5396: PROP_THREAD_DISCOVERY_SCAN_ENABLE_FILTERING"/>
+<link href="#rfc.section.7.2.37" rel="Chapter" title="7.2.37 PROP 5397: PROP_THREAD_DISCOVERY_SCAN_PANID"/>
+<link href="#rfc.section.7.2.38" rel="Chapter" title="7.2.38 PROP 5398: PROP_THREAD_STEERING_DATA"/>
+<link href="#rfc.section.8" rel="Chapter" title="8 Feature: Network Save"/>
+<link href="#rfc.section.8.1" rel="Chapter" title="8.1 Commands"/>
+<link href="#rfc.section.8.1.1" rel="Chapter" title="8.1.1 CMD 9: (Host->NCP) CMD_NET_SAVE"/>
+<link href="#rfc.section.8.1.2" rel="Chapter" title="8.1.2 CMD 10: (Host->NCP) CMD_NET_CLEAR"/>
+<link href="#rfc.section.8.1.3" rel="Chapter" title="8.1.3 CMD 11: (Host->NCP) CMD_NET_RECALL"/>
+<link href="#rfc.section.9" rel="Chapter" title="9 Feature: Host Buffer Offload"/>
+<link href="#rfc.section.9.1" rel="Chapter" title="9.1 Commands"/>
+<link href="#rfc.section.9.1.1" rel="Chapter" title="9.1.1 CMD 12: (NCP->Host) CMD_HBO_OFFLOAD"/>
+<link href="#rfc.section.9.1.2" rel="Chapter" title="9.1.2 CMD 13: (NCP->Host) CMD_HBO_RECLAIM"/>
+<link href="#rfc.section.9.1.3" rel="Chapter" title="9.1.3 CMD 14: (NCP->Host) CMD_HBO_DROP"/>
+<link href="#rfc.section.9.1.4" rel="Chapter" title="9.1.4 CMD 15: (Host->NCP) CMD_HBO_OFFLOADED"/>
+<link href="#rfc.section.9.1.5" rel="Chapter" title="9.1.5 CMD 16: (Host->NCP) CMD_HBO_RECLAIMED"/>
+<link href="#rfc.section.9.1.6" rel="Chapter" title="9.1.6 CMD 17: (Host->NCP) CMD_HBO_DROPPED"/>
+<link href="#rfc.section.9.2" rel="Chapter" title="9.2 Properties"/>
+<link href="#rfc.section.9.2.1" rel="Chapter" title="9.2.1 PROP 10: PROP_HBO_MEM_MAX"/>
+<link href="#rfc.section.9.2.2" rel="Chapter" title="9.2.2 PROP 11: PROP_HBO_BLOCK_MAX"/>
+<link href="#rfc.section.10" rel="Chapter" title="10 Feature: Jam Detection"/>
+<link href="#rfc.section.10.1" rel="Chapter" title="10.1 Properties"/>
+<link href="#rfc.section.10.1.1" rel="Chapter" title="10.1.1 PROP 4608: PROP_JAM_DETECT_ENABLE"/>
+<link href="#rfc.section.10.1.2" rel="Chapter" title="10.1.2 PROP 4609: PROP_JAM_DETECTED"/>
+<link href="#rfc.section.10.1.3" rel="Chapter" title="10.1.3 PROP 4610: PROP_JAM_DETECT_RSSI_THRESHOLD"/>
+<link href="#rfc.section.10.1.4" rel="Chapter" title="10.1.4 PROP 4611: PROP_JAM_DETECT_WINDOW"/>
+<link href="#rfc.section.10.1.5" rel="Chapter" title="10.1.5 PROP 4612: PROP_JAM_DETECT_BUSY"/>
+<link href="#rfc.section.10.1.6" rel="Chapter" title="10.1.6 PROP 4613: PROP_JAM_DETECT_HISTORY_BITMAP"/>
+<link href="#rfc.section.11" rel="Chapter" title="11 Feature: GPIO Access"/>
+<link href="#rfc.section.11.1" rel="Chapter" title="11.1 Properties"/>
+<link href="#rfc.section.11.1.1" rel="Chapter" title="11.1.1 PROP 4096: PROP_GPIO_CONFIG"/>
+<link href="#rfc.section.11.1.2" rel="Chapter" title="11.1.2 PROP 4098: PROP_GPIO_STATE"/>
+<link href="#rfc.section.11.1.3" rel="Chapter" title="11.1.3 PROP 4099: PROP_GPIO_STATE_SET"/>
+<link href="#rfc.section.11.1.4" rel="Chapter" title="11.1.4 PROP 4100: PROP_GPIO_STATE_CLEAR"/>
+<link href="#rfc.section.12" rel="Chapter" title="12 Feature: True Random Number Generation"/>
+<link href="#rfc.section.12.1" rel="Chapter" title="12.1 Properties"/>
+<link href="#rfc.section.12.1.1" rel="Chapter" title="12.1.1 PROP 4101: PROP_TRNG_32"/>
+<link href="#rfc.section.12.1.2" rel="Chapter" title="12.1.2 PROP 4102: PROP_TRNG_128"/>
+<link href="#rfc.section.12.1.3" rel="Chapter" title="12.1.3 PROP 4103: PROP_TRNG_RAW_32"/>
+<link href="#rfc.section.13" rel="Chapter" title="13 Security Considerations"/>
+<link href="#rfc.section.13.1" rel="Chapter" title="13.1 Raw Application Access"/>
+<link href="#rfc.appendix.A" rel="Chapter" title="A Framing Protocol"/>
+<link href="#rfc.appendix.A.1" rel="Chapter" title="A.1 UART Recommendations"/>
+<link href="#rfc.appendix.A.1.1" rel="Chapter" title="A.1.1 UART Bit Rate Detection"/>
+<link href="#rfc.appendix.A.1.2" rel="Chapter" title="A.1.2 HDLC-Lite"/>
+<link href="#rfc.appendix.A.2" rel="Chapter" title="A.2 SPI Recommendations"/>
+<link href="#rfc.appendix.A.2.1" rel="Chapter" title="A.2.1 SPI Framing Protocol"/>
+<link href="#rfc.appendix.A.3" rel="Chapter" title="A.3 I²C Recommendations"/>
+<link href="#rfc.appendix.A.4" rel="Chapter" title="A.4 Native USB Recommendations"/>
+<link href="#rfc.appendix.B" rel="Chapter" title="B Test Vectors"/>
+<link href="#rfc.appendix.B.1" rel="Chapter" title="B.1 Test Vector: Packed Unsigned Integer"/>
+<link href="#rfc.appendix.B.2" rel="Chapter" title="B.2 Test Vector: Reset Command"/>
+<link href="#rfc.appendix.B.3" rel="Chapter" title="B.3 Test Vector: Reset Notification"/>
+<link href="#rfc.appendix.B.4" rel="Chapter" title="B.4 Test Vector: Scan Beacon"/>
+<link href="#rfc.appendix.B.5" rel="Chapter" title="B.5 Test Vector: Inbound IPv6 Packet"/>
+<link href="#rfc.appendix.B.6" rel="Chapter" title="B.6 Test Vector: Outbound IPv6 Packet"/>
+<link href="#rfc.appendix.B.7" rel="Chapter" title="B.7 Test Vector: Fetch list of on-mesh networks"/>
+<link href="#rfc.appendix.B.8" rel="Chapter" title="B.8 Test Vector: Returned list of on-mesh networks"/>
+<link href="#rfc.appendix.B.9" rel="Chapter" title="B.9 Test Vector: Adding an on-mesh network"/>
+<link href="#rfc.appendix.B.10" rel="Chapter" title="B.10 Test Vector: Insertion notification of an on-mesh network"/>
+<link href="#rfc.appendix.B.11" rel="Chapter" title="B.11 Test Vector: Removing a local on-mesh network"/>
+<link href="#rfc.appendix.B.12" rel="Chapter" title="B.12 Test Vector: Removal notification of an on-mesh network"/>
+<link href="#rfc.appendix.C" rel="Chapter" title="C Example Sessions"/>
+<link href="#rfc.appendix.C.1" rel="Chapter" title="C.1 NCP Initialization"/>
+<link href="#rfc.appendix.C.2" rel="Chapter" title="C.2 Attaching to a network"/>
+<link href="#rfc.appendix.C.3" rel="Chapter" title="C.3 Successfully joining a pre-existing network"/>
+<link href="#rfc.appendix.C.4" rel="Chapter" title="C.4 Unsuccessfully joining a pre-existing network"/>
+<link href="#rfc.appendix.C.5" rel="Chapter" title="C.5 Detaching from a network"/>
+<link href="#rfc.appendix.C.6" rel="Chapter" title="C.6 Attaching to a saved network"/>
+<link href="#rfc.appendix.C.7" rel="Chapter" title="C.7 NCP Software Reset"/>
+<link href="#rfc.appendix.C.8" rel="Chapter" title="C.8 Adding an on-mesh prefix"/>
+<link href="#rfc.appendix.C.9" rel="Chapter" title="C.9 Entering low-power modes"/>
+<link href="#rfc.appendix.C.10" rel="Chapter" title="C.10 Sniffing raw packets"/>
+<link href="#rfc.appendix.D" rel="Chapter" title="D Glossary"/>
+<link href="#rfc.appendix.E" rel="Chapter" title="E Acknowledgments"/>
+<link href="#rfc.authors" rel="Chapter"/>
+
+
+ <meta name="generator" content="xml2rfc version 2.5.2 - http://tools.ietf.org/tools/xml2rfc" />
+ <link rel="schema.dct" href="http://purl.org/dc/terms/" />
+
+ <meta name="dct.creator" content="Quattlebaum, R. and J. Woodyatt, Ed." />
+ <meta name="dct.identifier" content="urn:ietf:id:draft-rquattle-spinel-unified-ab5628a5" />
+ <meta name="dct.issued" scheme="ISO8601" content="2017-6-22" />
+ <meta name="dct.abstract" content="This document describes the Spinel protocol, which facilitates the control and management of IPv6 network interfaces on devices where general purpose application processors offload network functions at their interfaces to network co-processors (NCP) connected by simple communication links like serial data channels. While initially developed to support Thread(R), Spinel's layered design allows it to be easily adapted to other similar network technologies. " />
+ <meta name="description" content="This document describes the Spinel protocol, which facilitates the control and management of IPv6 network interfaces on devices where general purpose application processors offload network functions at their interfaces to network co-processors (NCP) connected by simple communication links like serial data channels. While initially developed to support Thread(R), Spinel's layered design allows it to be easily adapted to other similar network technologies. " />
+
+</head>
+
+<body>
+
+ <table class="header">
+ <tbody>
+
+ <tr>
+ <td class="left">Network Working Group</td>
+ <td class="right">R. Quattlebaum</td>
+</tr>
+<tr>
+ <td class="left">Internet-Draft</td>
+ <td class="right">J. Woodyatt, Ed.</td>
+</tr>
+<tr>
+ <td class="left">Intended status: Informational</td>
+ <td class="right">Nest Labs, Inc.</td>
+</tr>
+<tr>
+ <td class="left">Expires: December 24, 2017</td>
+ <td class="right">June 22, 2017</td>
+</tr>
+
+
+ </tbody>
+ </table>
+
+ <p class="title">Spinel Host-Controller Protocol<br />
+ <span class="filename">draft-rquattle-spinel-unified-ab5628a5</span></p>
+
+ <h1 id="rfc.abstract">
+ <a href="#rfc.abstract">Abstract</a>
+</h1>
+<p>This document describes the Spinel protocol, which facilitates the control and management of IPv6 network interfaces on devices where general purpose application processors offload network functions at their interfaces to network co-processors (NCP) connected by simple communication links like serial data channels. While initially developed to support Thread(R), Spinel's layered design allows it to be easily adapted to other similar network technologies. </p>
+<p>This document also describes various Spinel specializations, including support for the Thread(R) low-power mesh network technology. </p>
+<h1 id="rfc.status">
+ <a href="#rfc.status">Status of This Memo</a>
+</h1>
+<p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
+<p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.</p>
+<p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."</p>
+<p>This Internet-Draft will expire on December 24, 2017.</p>
+<h1 id="rfc.copyrightnotice">
+ <a href="#rfc.copyrightnotice">Copyright Notice</a>
+</h1>
+<p>Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
+<p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.</p>
+<p>This document may not be modified, and derivative works of it may not be created, and it may not be published except as an Internet-Draft.</p>
+
+
+ <hr class="noprint" />
+ <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
+ <ul class="toc">
+
+ <li>1. <a href="#rfc.section.1">Introduction</a></li>
+<ul><li>1.1. <a href="#rfc.section.1.1">About this Draft</a></li>
+<ul><li>1.1.1. <a href="#rfc.section.1.1.1">Scope</a></li>
+<li>1.1.2. <a href="#rfc.section.1.1.2">Renumbering</a></li>
+</ul></ul><li>2. <a href="#rfc.section.2">Frame Format</a></li>
+<ul><li>2.1. <a href="#rfc.section.2.1">Header Format</a></li>
+<ul><li>2.1.1. <a href="#rfc.section.2.1.1">FLG: Flag</a></li>
+<li>2.1.2. <a href="#rfc.section.2.1.2">NLI: Network Link Identifier</a></li>
+<li>2.1.3. <a href="#rfc.section.2.1.3">TID: Transaction Identifier</a></li>
+<li>2.1.4. <a href="#rfc.section.2.1.4">Command Identifier (CMD)</a></li>
+<li>2.1.5. <a href="#rfc.section.2.1.5">Command Payload (Optional)</a></li>
+</ul></ul><li>3. <a href="#rfc.section.3">Data Packing</a></li>
+<ul><li>3.1. <a href="#rfc.section.3.1">Primitive Types</a></li>
+<li>3.2. <a href="#rfc.section.3.2">Packed Unsigned Integer</a></li>
+<li>3.3. <a href="#rfc.section.3.3">Data Blobs</a></li>
+<li>3.4. <a href="#rfc.section.3.4">Structured Data</a></li>
+<li>3.5. <a href="#rfc.section.3.5">Arrays</a></li>
+</ul><li>4. <a href="#rfc.section.4">Commands</a></li>
+<ul><li>4.1. <a href="#rfc.section.4.1">CMD 0: (Host->NCP) CMD_NOOP</a></li>
+<li>4.2. <a href="#rfc.section.4.2">CMD 1: (Host->NCP) CMD_RESET</a></li>
+<li>4.3. <a href="#rfc.section.4.3">CMD 2: (Host->NCP) CMD_PROP_VALUE_GET</a></li>
+<li>4.4. <a href="#rfc.section.4.4">CMD 3: (Host->NCP) CMD_PROP_VALUE_SET</a></li>
+<li>4.5. <a href="#rfc.section.4.5">CMD 4: (Host->NCP) CMD_PROP_VALUE_INSERT</a></li>
+<li>4.6. <a href="#rfc.section.4.6">CMD 5: (Host->NCP) CMD_PROP_VALUE_REMOVE</a></li>
+<li>4.7. <a href="#rfc.section.4.7">CMD 6: (NCP->Host) CMD_PROP_VALUE_IS</a></li>
+<li>4.8. <a href="#rfc.section.4.8">CMD 7: (NCP->Host) CMD_PROP_VALUE_INSERTED</a></li>
+<li>4.9. <a href="#rfc.section.4.9">CMD 8: (NCP->Host) CMD_PROP_VALUE_REMOVED</a></li>
+<li>4.10. <a href="#rfc.section.4.10">CMD 18: (Host->NCP) CMD_PEEK</a></li>
+<li>4.11. <a href="#rfc.section.4.11">CMD 19: (NCP->Host) CMD_PEEK_RET</a></li>
+<li>4.12. <a href="#rfc.section.4.12">CMD 20: (Host->NCP) CMD_POKE</a></li>
+<li>4.13. <a href="#rfc.section.4.13">CMD 21: (Host->NCP) CMD_PROP_VALUE_MULTI_GET</a></li>
+<li>4.14. <a href="#rfc.section.4.14">CMD 22: (Host->NCP) CMD_PROP_VALUE_MULTI_SET</a></li>
+<li>4.15. <a href="#rfc.section.4.15">CMD 23: (NCP->Host) CMD_PROP_VALUES_ARE</a></li>
+</ul><li>5. <a href="#rfc.section.5">Properties</a></li>
+<ul><li>5.1. <a href="#rfc.section.5.1">Property Methods</a></li>
+<li>5.2. <a href="#rfc.section.5.2">Property Types</a></li>
+<ul><li>5.2.1. <a href="#rfc.section.5.2.1">Single-Value Properties</a></li>
+<li>5.2.2. <a href="#rfc.section.5.2.2">Multiple-Value Properties</a></li>
+<li>5.2.3. <a href="#rfc.section.5.2.3">Stream Properties</a></li>
+</ul><li>5.3. <a href="#rfc.section.5.3">Property Numbering</a></li>
+<li>5.4. <a href="#rfc.section.5.4">Property Sections</a></li>
+<li>5.5. <a href="#rfc.section.5.5">Core Properties</a></li>
+<ul><li>5.5.1. <a href="#rfc.section.5.5.1">PROP 0: PROP_LAST_STATUS</a></li>
+<li>5.5.2. <a href="#rfc.section.5.5.2">PROP 1: PROP_PROTOCOL_VERSION</a></li>
+<li>5.5.3. <a href="#rfc.section.5.5.3">PROP 2: PROP_NCP_VERSION</a></li>
+<li>5.5.4. <a href="#rfc.section.5.5.4">PROP 3: PROP_INTERFACE_TYPE</a></li>
+<li>5.5.5. <a href="#rfc.section.5.5.5">PROP 4: PROP_INTERFACE_VENDOR_ID</a></li>
+<li>5.5.6. <a href="#rfc.section.5.5.6">PROP 5: PROP_CAPS</a></li>
+<li>5.5.7. <a href="#rfc.section.5.5.7">PROP 6: PROP_INTERFACE_COUNT</a></li>
+<li>5.5.8. <a href="#rfc.section.5.5.8">PROP 7: PROP_POWER_STATE</a></li>
+<li>5.5.9. <a href="#rfc.section.5.5.9">PROP 8: PROP_HWADDR</a></li>
+<li>5.5.10. <a href="#rfc.section.5.5.10">PROP 9: PROP_LOCK</a></li>
+<li>5.5.11. <a href="#rfc.section.5.5.11">PROP 10: PROP_HOST_POWER_STATE</a></li>
+<li>5.5.12. <a href="#rfc.section.5.5.12">PROP 4104: PROP_UNSOL_UPDATE_FILTER</a></li>
+<li>5.5.13. <a href="#rfc.section.5.5.13">PROP 4105: PROP_UNSOL_UPDATE_LIST</a></li>
+</ul><li>5.6. <a href="#rfc.section.5.6">Stream Properties</a></li>
+<ul><li>5.6.1. <a href="#rfc.section.5.6.1">PROP 112: PROP_STREAM_DEBUG</a></li>
+<li>5.6.2. <a href="#rfc.section.5.6.2">PROP 113: PROP_STREAM_RAW</a></li>
+<li>5.6.3. <a href="#rfc.section.5.6.3">PROP 114: PROP_STREAM_NET</a></li>
+<li>5.6.4. <a href="#rfc.section.5.6.4">PROP 115: PROP_STREAM_NET_INSECURE</a></li>
+</ul><li>5.7. <a href="#rfc.section.5.7">PHY Properties</a></li>
+<ul><li>5.7.1. <a href="#rfc.section.5.7.1">PROP 32: PROP_PHY_ENABLED</a></li>
+<li>5.7.2. <a href="#rfc.section.5.7.2">PROP 33: PROP_PHY_CHAN</a></li>
+<li>5.7.3. <a href="#rfc.section.5.7.3">PROP 34: PROP_PHY_CHAN_SUPPORTED</a></li>
+<li>5.7.4. <a href="#rfc.section.5.7.4">PROP 35: PROP_PHY_FREQ</a></li>
+<li>5.7.5. <a href="#rfc.section.5.7.5">PROP 36: PROP_PHY_CCA_THRESHOLD</a></li>
+<li>5.7.6. <a href="#rfc.section.5.7.6">PROP 37: PROP_PHY_TX_POWER</a></li>
+<li>5.7.7. <a href="#rfc.section.5.7.7">PROP 38: PROP_PHY_RSSI</a></li>
+<li>5.7.8. <a href="#rfc.section.5.7.8">PROP 39: PROP_PHY_RX_SENSITIVITY</a></li>
+</ul><li>5.8. <a href="#rfc.section.5.8">MAC Properties</a></li>
+<ul><li>5.8.1. <a href="#rfc.section.5.8.1">PROP 48: PROP_MAC_SCAN_STATE</a></li>
+<li>5.8.2. <a href="#rfc.section.5.8.2">PROP 49: PROP_MAC_SCAN_MASK</a></li>
+<li>5.8.3. <a href="#rfc.section.5.8.3">PROP 50: PROP_MAC_SCAN_PERIOD</a></li>
+<li>5.8.4. <a href="#rfc.section.5.8.4">PROP 51: PROP_MAC_SCAN_BEACON</a></li>
+<li>5.8.5. <a href="#rfc.section.5.8.5">PROP 52: PROP_MAC_15_4_LADDR</a></li>
+<li>5.8.6. <a href="#rfc.section.5.8.6">PROP 53: PROP_MAC_15_4_SADDR</a></li>
+<li>5.8.7. <a href="#rfc.section.5.8.7">PROP 54: PROP_MAC_15_4_PANID</a></li>
+<li>5.8.8. <a href="#rfc.section.5.8.8">PROP 55: PROP_MAC_RAW_STREAM_ENABLED</a></li>
+<li>5.8.9. <a href="#rfc.section.5.8.9">PROP 56: PROP_MAC_PROMISCUOUS_MODE</a></li>
+<li>5.8.10. <a href="#rfc.section.5.8.10">PROP 57: PROP_MAC_ENERGY_SCAN_RESULT</a></li>
+<li>5.8.11. <a href="#rfc.section.5.8.11">PROP 4864: PROP_MAC_WHITELIST</a></li>
+<li>5.8.12. <a href="#rfc.section.5.8.12">PROP 4865: PROP_MAC_WHITELIST_ENABLED</a></li>
+<li>5.8.13. <a href="#rfc.section.5.8.13">PROP 4867: SPINEL_PROP_MAC_SRC_MATCH_ENABLED</a></li>
+<li>5.8.14. <a href="#rfc.section.5.8.14">PROP 4868: SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES</a></li>
+<li>5.8.15. <a href="#rfc.section.5.8.15">PROP 4869: SPINEL_PROP_MAC_SRC_MATCH_EXTENDED_ADDRESSES</a></li>
+<li>5.8.16. <a href="#rfc.section.5.8.16">PROP 4870: PROP_MAC_BLACKLIST</a></li>
+<li>5.8.17. <a href="#rfc.section.5.8.17">PROP 4871: PROP_MAC_BLACKLIST_ENABLED</a></li>
+</ul><li>5.9. <a href="#rfc.section.5.9">NET Properties</a></li>
+<ul><li>5.9.1. <a href="#rfc.section.5.9.1">PROP 64: PROP_NET_SAVED</a></li>
+<li>5.9.2. <a href="#rfc.section.5.9.2">PROP 65: PROP_NET_IF_UP</a></li>
+<li>5.9.3. <a href="#rfc.section.5.9.3">PROP 66: PROP_NET_STACK_UP</a></li>
+<li>5.9.4. <a href="#rfc.section.5.9.4">PROP 67: PROP_NET_ROLE</a></li>
+<li>5.9.5. <a href="#rfc.section.5.9.5">PROP 68: PROP_NET_NETWORK_NAME</a></li>
+<li>5.9.6. <a href="#rfc.section.5.9.6">PROP 69: PROP_NET_XPANID</a></li>
+<li>5.9.7. <a href="#rfc.section.5.9.7">PROP 70: PROP_NET_MASTER_KEY</a></li>
+<li>5.9.8. <a href="#rfc.section.5.9.8">PROP 71: PROP_NET_KEY_SEQUENCE_COUNTER</a></li>
+<li>5.9.9. <a href="#rfc.section.5.9.9">PROP 72: PROP_NET_PARTITION_ID</a></li>
+<li>5.9.10. <a href="#rfc.section.5.9.10">PROP 73: PROP_NET_REQUIRE_JOIN_EXISTING</a></li>
+<li>5.9.11. <a href="#rfc.section.5.9.11">PROP 74: PROP_NET_KEY_SWITCH_GUARDTIME</a></li>
+<li>5.9.12. <a href="#rfc.section.5.9.12">PROP 75: PROP_NET_PSKC</a></li>
+</ul><li>5.10. <a href="#rfc.section.5.10">IPv6 Properties</a></li>
+<ul><li>5.10.1. <a href="#rfc.section.5.10.1">PROP 96: PROP_IPV6_LL_ADDR</a></li>
+<li>5.10.2. <a href="#rfc.section.5.10.2">PROP 97: PROP_IPV6_ML_ADDR</a></li>
+<li>5.10.3. <a href="#rfc.section.5.10.3">PROP 98: PROP_IPV6_ML_PREFIX</a></li>
+<li>5.10.4. <a href="#rfc.section.5.10.4">PROP 99: PROP_IPV6_ADDRESS_TABLE</a></li>
+<li>5.10.5. <a href="#rfc.section.5.10.5">PROP 101: PROP_IPv6_ICMP_PING_OFFLOAD</a></li>
+</ul><li>5.11. <a href="#rfc.section.5.11">Debug Properties</a></li>
+<ul><li>5.11.1. <a href="#rfc.section.5.11.1">PROP 16384: PROP_DEBUG_TEST_ASSERT</a></li>
+<li>5.11.2. <a href="#rfc.section.5.11.2">PROP 16385: PROP_DEBUG_NCP_LOG_LEVEL</a></li>
+</ul></ul><li>6. <a href="#rfc.section.6">Status Codes</a></li>
+<li>7. <a href="#rfc.section.7">Technology: Thread(R)</a></li>
+<ul><li>7.1. <a href="#rfc.section.7.1">Capabilities</a></li>
+<li>7.2. <a href="#rfc.section.7.2">Properties</a></li>
+<ul><li>7.2.1. <a href="#rfc.section.7.2.1">PROP 80: PROP_THREAD_LEADER_ADDR</a></li>
+<li>7.2.2. <a href="#rfc.section.7.2.2">PROP 81: PROP_THREAD_PARENT</a></li>
+<li>7.2.3. <a href="#rfc.section.7.2.3">PROP 82: PROP_THREAD_CHILD_TABLE</a></li>
+<li>7.2.4. <a href="#rfc.section.7.2.4">PROP 83: PROP_THREAD_LEADER_RID</a></li>
+<li>7.2.5. <a href="#rfc.section.7.2.5">PROP 84: PROP_THREAD_LEADER_WEIGHT</a></li>
+<li>7.2.6. <a href="#rfc.section.7.2.6">PROP 85: PROP_THREAD_LOCAL_LEADER_WEIGHT</a></li>
+<li>7.2.7. <a href="#rfc.section.7.2.7">PROP 86: PROP_THREAD_NETWORK_DATA</a></li>
+<li>7.2.8. <a href="#rfc.section.7.2.8">PROP 87: PROP_THREAD_NETWORK_DATA_VERSION</a></li>
+<li>7.2.9. <a href="#rfc.section.7.2.9">PROP 88: PROP_THREAD_STABLE_NETWORK_DATA</a></li>
+<li>7.2.10. <a href="#rfc.section.7.2.10">PROP 89: PROP_THREAD_STABLE_NETWORK_DATA_VERSION</a></li>
+<li>7.2.11. <a href="#rfc.section.7.2.11">PROP 90: PROP_THREAD_ON_MESH_NETS</a></li>
+<li>7.2.12. <a href="#rfc.section.7.2.12">PROP 91: PROP_THREAD_OFF_MESH_ROUTES</a></li>
+<li>7.2.13. <a href="#rfc.section.7.2.13">PROP 92: PROP_THREAD_ASSISTING_PORTS</a></li>
+<li>7.2.14. <a href="#rfc.section.7.2.14">PROP 93: PROP_THREAD_ALLOW_LOCAL_NET_DATA_CHANGE</a></li>
+<li>7.2.15. <a href="#rfc.section.7.2.15">PROP 94: PROP_THREAD_MODE</a></li>
+<li>7.2.16. <a href="#rfc.section.7.2.16">PROP 5376: PROP_THREAD_CHILD_TIMEOUT</a></li>
+<li>7.2.17. <a href="#rfc.section.7.2.17">PROP 5377: PROP_THREAD_RLOC16</a></li>
+<li>7.2.18. <a href="#rfc.section.7.2.18">PROP 5378: PROP_THREAD_ROUTER_UPGRADE_THRESHOLD</a></li>
+<li>7.2.19. <a href="#rfc.section.7.2.19">PROP 5379: PROP_THREAD_CONTEXT_REUSE_DELAY</a></li>
+<li>7.2.20. <a href="#rfc.section.7.2.20">PROP 5380: PROP_THREAD_NETWORK_ID_TIMEOUT</a></li>
+<li>7.2.21. <a href="#rfc.section.7.2.21">PROP 5381: PROP_THREAD_ACTIVE_ROUTER_IDS</a></li>
+<li>7.2.22. <a href="#rfc.section.7.2.22">PROP 5382: PROP_THREAD_RLOC16_DEBUG_PASSTHRU</a></li>
+<li>7.2.23. <a href="#rfc.section.7.2.23">PROP 5383: PROP_THREAD_ROUTER_ROLE_ENABLED</a></li>
+<li>7.2.24. <a href="#rfc.section.7.2.24">PROP 5384: PROP_THREAD_ROUTER_DOWNGRADE_THRESHOLD</a></li>
+<li>7.2.25. <a href="#rfc.section.7.2.25">PROP 5385: PROP_THREAD_ROUTER_SELECTION_JITTER</a></li>
+<li>7.2.26. <a href="#rfc.section.7.2.26">PROP 5386: PROP_THREAD_PREFERRED_ROUTER_ID</a></li>
+<li>7.2.27. <a href="#rfc.section.7.2.27">PROP 5387: PROP_THREAD_NEIGHBOR_TABLE</a></li>
+<li>7.2.28. <a href="#rfc.section.7.2.28">PROP 5388: PROP_THREAD_CHILD_COUNT_MAX</a></li>
+<li>7.2.29. <a href="#rfc.section.7.2.29">PROP 5389: PROP_THREAD_LEADER_NETWORK_DATA</a></li>
+<li>7.2.30. <a href="#rfc.section.7.2.30">PROP 5390: PROP_THREAD_STABLE_LEADER_NETWORK_DATA</a></li>
+<li>7.2.31. <a href="#rfc.section.7.2.31">PROP 5391: PROP_THREAD_JOINERS</a></li>
+<li>7.2.32. <a href="#rfc.section.7.2.32">PROP 5392: PROP_THREAD_COMMISSIONER_ENABLED</a></li>
+<li>7.2.33. <a href="#rfc.section.7.2.33">PROP 5393: PROP_THREAD_TMF_PROXY_ENABLED</a></li>
+<li>7.2.34. <a href="#rfc.section.7.2.34">PROP 5394: PROP_THREAD_TMF_PROXY_STREAM</a></li>
+<li>7.2.35. <a href="#rfc.section.7.2.35">PROP 5395: PROP_THREAD_DISOVERY_SCAN_JOINER_FLAG</a></li>
+<li>7.2.36. <a href="#rfc.section.7.2.36">PROP 5396: PROP_THREAD_DISCOVERY_SCAN_ENABLE_FILTERING</a></li>
+<li>7.2.37. <a href="#rfc.section.7.2.37">PROP 5397: PROP_THREAD_DISCOVERY_SCAN_PANID</a></li>
+<li>7.2.38. <a href="#rfc.section.7.2.38">PROP 5398: PROP_THREAD_STEERING_DATA</a></li>
+</ul></ul><li>8. <a href="#rfc.section.8">Feature: Network Save</a></li>
+<ul><li>8.1. <a href="#rfc.section.8.1">Commands</a></li>
+<ul><li>8.1.1. <a href="#rfc.section.8.1.1">CMD 9: (Host->NCP) CMD_NET_SAVE</a></li>
+<li>8.1.2. <a href="#rfc.section.8.1.2">CMD 10: (Host->NCP) CMD_NET_CLEAR</a></li>
+<li>8.1.3. <a href="#rfc.section.8.1.3">CMD 11: (Host->NCP) CMD_NET_RECALL</a></li>
+</ul></ul><li>9. <a href="#rfc.section.9">Feature: Host Buffer Offload</a></li>
+<ul><li>9.1. <a href="#rfc.section.9.1">Commands</a></li>
+<ul><li>9.1.1. <a href="#rfc.section.9.1.1">CMD 12: (NCP->Host) CMD_HBO_OFFLOAD</a></li>
+<li>9.1.2. <a href="#rfc.section.9.1.2">CMD 13: (NCP->Host) CMD_HBO_RECLAIM</a></li>
+<li>9.1.3. <a href="#rfc.section.9.1.3">CMD 14: (NCP->Host) CMD_HBO_DROP</a></li>
+<li>9.1.4. <a href="#rfc.section.9.1.4">CMD 15: (Host->NCP) CMD_HBO_OFFLOADED</a></li>
+<li>9.1.5. <a href="#rfc.section.9.1.5">CMD 16: (Host->NCP) CMD_HBO_RECLAIMED</a></li>
+<li>9.1.6. <a href="#rfc.section.9.1.6">CMD 17: (Host->NCP) CMD_HBO_DROPPED</a></li>
+</ul><li>9.2. <a href="#rfc.section.9.2">Properties</a></li>
+<ul><li>9.2.1. <a href="#rfc.section.9.2.1">PROP 10: PROP_HBO_MEM_MAX</a></li>
+<li>9.2.2. <a href="#rfc.section.9.2.2">PROP 11: PROP_HBO_BLOCK_MAX</a></li>
+</ul></ul><li>10. <a href="#rfc.section.10">Feature: Jam Detection</a></li>
+<ul><li>10.1. <a href="#rfc.section.10.1">Properties</a></li>
+<ul><li>10.1.1. <a href="#rfc.section.10.1.1">PROP 4608: PROP_JAM_DETECT_ENABLE</a></li>
+<li>10.1.2. <a href="#rfc.section.10.1.2">PROP 4609: PROP_JAM_DETECTED</a></li>
+<li>10.1.3. <a href="#rfc.section.10.1.3">PROP 4610: PROP_JAM_DETECT_RSSI_THRESHOLD</a></li>
+<li>10.1.4. <a href="#rfc.section.10.1.4">PROP 4611: PROP_JAM_DETECT_WINDOW</a></li>
+<li>10.1.5. <a href="#rfc.section.10.1.5">PROP 4612: PROP_JAM_DETECT_BUSY</a></li>
+<li>10.1.6. <a href="#rfc.section.10.1.6">PROP 4613: PROP_JAM_DETECT_HISTORY_BITMAP</a></li>
+</ul></ul><li>11. <a href="#rfc.section.11">Feature: GPIO Access</a></li>
+<ul><li>11.1. <a href="#rfc.section.11.1">Properties</a></li>
+<ul><li>11.1.1. <a href="#rfc.section.11.1.1">PROP 4096: PROP_GPIO_CONFIG</a></li>
+<li>11.1.2. <a href="#rfc.section.11.1.2">PROP 4098: PROP_GPIO_STATE</a></li>
+<li>11.1.3. <a href="#rfc.section.11.1.3">PROP 4099: PROP_GPIO_STATE_SET</a></li>
+<li>11.1.4. <a href="#rfc.section.11.1.4">PROP 4100: PROP_GPIO_STATE_CLEAR</a></li>
+</ul></ul><li>12. <a href="#rfc.section.12">Feature: True Random Number Generation</a></li>
+<ul><li>12.1. <a href="#rfc.section.12.1">Properties</a></li>
+<ul><li>12.1.1. <a href="#rfc.section.12.1.1">PROP 4101: PROP_TRNG_32</a></li>
+<li>12.1.2. <a href="#rfc.section.12.1.2">PROP 4102: PROP_TRNG_128</a></li>
+<li>12.1.3. <a href="#rfc.section.12.1.3">PROP 4103: PROP_TRNG_RAW_32</a></li>
+</ul></ul><li>13. <a href="#rfc.section.13">Security Considerations</a></li>
+<ul><li>13.1. <a href="#rfc.section.13.1">Raw Application Access</a></li>
+</ul><li>Appendix A. <a href="#rfc.appendix.A">Framing Protocol</a></li>
+<ul><li>A.1. <a href="#rfc.appendix.A.1">UART Recommendations</a></li>
+<ul><li>A.1.1. <a href="#rfc.appendix.A.1.1">UART Bit Rate Detection</a></li>
+<li>A.1.2. <a href="#rfc.appendix.A.1.2">HDLC-Lite</a></li>
+</ul><li>A.2. <a href="#rfc.appendix.A.2">SPI Recommendations</a></li>
+<ul><li>A.2.1. <a href="#rfc.appendix.A.2.1">SPI Framing Protocol</a></li>
+</ul><li>A.3. <a href="#rfc.appendix.A.3">I²C Recommendations</a></li>
+<li>A.4. <a href="#rfc.appendix.A.4">Native USB Recommendations</a></li>
+</ul><li>Appendix B. <a href="#rfc.appendix.B">Test Vectors</a></li>
+<ul><li>B.1. <a href="#rfc.appendix.B.1">Test Vector: Packed Unsigned Integer</a></li>
+<li>B.2. <a href="#rfc.appendix.B.2">Test Vector: Reset Command</a></li>
+<li>B.3. <a href="#rfc.appendix.B.3">Test Vector: Reset Notification</a></li>
+<li>B.4. <a href="#rfc.appendix.B.4">Test Vector: Scan Beacon</a></li>
+<li>B.5. <a href="#rfc.appendix.B.5">Test Vector: Inbound IPv6 Packet</a></li>
+<li>B.6. <a href="#rfc.appendix.B.6">Test Vector: Outbound IPv6 Packet</a></li>
+<li>B.7. <a href="#rfc.appendix.B.7">Test Vector: Fetch list of on-mesh networks</a></li>
+<li>B.8. <a href="#rfc.appendix.B.8">Test Vector: Returned list of on-mesh networks</a></li>
+<li>B.9. <a href="#rfc.appendix.B.9">Test Vector: Adding an on-mesh network</a></li>
+<li>B.10. <a href="#rfc.appendix.B.10">Test Vector: Insertion notification of an on-mesh network</a></li>
+<li>B.11. <a href="#rfc.appendix.B.11">Test Vector: Removing a local on-mesh network</a></li>
+<li>B.12. <a href="#rfc.appendix.B.12">Test Vector: Removal notification of an on-mesh network</a></li>
+</ul><li>Appendix C. <a href="#rfc.appendix.C">Example Sessions</a></li>
+<ul><li>C.1. <a href="#rfc.appendix.C.1">NCP Initialization</a></li>
+<li>C.2. <a href="#rfc.appendix.C.2">Attaching to a network</a></li>
+<li>C.3. <a href="#rfc.appendix.C.3">Successfully joining a pre-existing network</a></li>
+<li>C.4. <a href="#rfc.appendix.C.4">Unsuccessfully joining a pre-existing network</a></li>
+<li>C.5. <a href="#rfc.appendix.C.5">Detaching from a network</a></li>
+<li>C.6. <a href="#rfc.appendix.C.6">Attaching to a saved network</a></li>
+<li>C.7. <a href="#rfc.appendix.C.7">NCP Software Reset</a></li>
+<li>C.8. <a href="#rfc.appendix.C.8">Adding an on-mesh prefix</a></li>
+<li>C.9. <a href="#rfc.appendix.C.9">Entering low-power modes</a></li>
+<li>C.10. <a href="#rfc.appendix.C.10">Sniffing raw packets</a></li>
+</ul><li>Appendix D. <a href="#rfc.appendix.D">Glossary</a></li>
+<li>Appendix E. <a href="#rfc.appendix.E">Acknowledgments</a></li>
+<li><a href="#rfc.authors">Authors' Addresses</a></li>
+
+
+ </ul>
+
+ <h1 id="rfc.section.1"><a href="#rfc.section.1">1.</a> <a href="#introduction" id="introduction">Introduction</a></h1>
+<p id="rfc.section.1.p.1">Spinel is a host-controller protocol designed to enable interoperation over simple serial connections between general purpose device operating systems (OS) and network co-processors (NCP) for the purpose of controlling and managing their IPv6 network interfaces, achieving the following goals: </p>
+<p/>
+
+<ul>
+ <li>Adopt a layered approach to the protocol design, allowing future support for other network protocols.</li>
+ <li>Minimize the number of required commands/methods by providing a rich, property-based API.</li>
+ <li>Support NCPs capable of being connected to more than one network at a time.</li>
+ <li>Gracefully handle the addition of new features and capabilities without necessarily breaking backward compatibility.</li>
+ <li>Be as minimal and light-weight as possible without unnecessarily sacrificing flexibility.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.1.p.3">On top of this core framework, we define the properties and commands to enable various features and network protocols. </p>
+<h1 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1.</a> <a href="#about-this-draft" id="about-this-draft">About this Draft</a></h1>
+<p id="rfc.section.1.1.p.1">This document is currently in a draft status and is changing often. This section discusses some ideas for changes to the protocol that haven't yet been fully specified, as well as some of the impetus for the current design. </p>
+<h1 id="rfc.section.1.1.1"><a href="#rfc.section.1.1.1">1.1.1.</a> <a href="#scope" id="scope">Scope</a></h1>
+<p id="rfc.section.1.1.1.p.1">The eventual intent is to have two documents: A Spinel basis document which discusses the network-technology-agnostic mechanisms and a Thread(R) specialization document which describes all of the Thread(R)-specific implementation details. Currently, this document covers both. </p>
+<h1 id="rfc.section.1.1.2"><a href="#rfc.section.1.1.2">1.1.2.</a> <a href="#renumbering" id="renumbering">Renumbering</a></h1>
+<p id="rfc.section.1.1.2.p.1">Efforts are currently maintained to try to prevent overtly backward-incompatible changes to the existing protocol, but if you are implementing Spinel in your own products you should expect there to be at least one large renumbering event and major version number change before the standard is considered "baked". All changes will be clearly marked and documented to make such a transition as easy as possible. </p>
+<p id="rfc.section.1.1.2.p.2">To allow conclusive detection of protocol (in)compatibility between the host and the NCP, the following commands and properties are already considered to be "baked" and will not change: </p>
+<p/>
+
+<ul>
+ <li>Command IDs zero through eight. (Reset, No-op, and Property-Value Commands)</li>
+ <li>Property IDs zero through two. (Last status, Protocol Version, and NCP Version)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.1.1.2.p.4">Renumbering would be undertaken in order to better organize the allocation of property IDs and capability IDs. One of the initial goals of this protocol was for it to be possible for a host or NCP to only implement properties with values less than 127 and for the NCP to still be usable---relegating all larger property values for extra features or other capabilities that aren't strictly necessary. This would allow simple implementations to avoid the need to implement support for PUIs (<a href="#packed-unsigned-integer">Section 3.2</a>). </p>
+<p id="rfc.section.1.1.2.p.5">As time has gone by and the protocol has become more fleshed out, it has become clear that some of the initial allocations were inadequate and should be revisited if we want to try to achieve the original goal. </p>
+<h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a> <a href="#frame-format" id="frame-format">Frame Format</a></h1>
+<p id="rfc.section.2.p.1">A frame is defined simply as the concatenation of </p>
+<p/>
+
+<ul>
+ <li>A header byte</li>
+ <li>A command (up to three bytes, see <a href="#packed-unsigned-integer">Section 3.2</a> for format)</li>
+ <li>An optional command payload</li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1-3</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD</td>
+ <td class="center">CMD_PAYLOAD</td>
+ </tr>
+ </tbody>
+</table>
+<h1 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1.</a> <a href="#header-format" id="header-format">Header Format</a></h1>
+<p id="rfc.section.2.1.p.1">The header byte is broken down as follows: </p>
+<pre>
+ 0 1 2 3 4 5 6 7
++---+---+---+---+---+---+---+---+
+| FLG | NLI | TID |
++---+---+---+---+---+---+---+---+
+</pre>
+<p>
+ <a id="CREF1" class="info">[CREF1]<span class="info">RQ: Eventually, when https://github.com/miekg/mmark/issues/95 is addressed, the above table should be swapped out with this: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |---|---|---|---|---|---|---|---| | FLG || NLI || TID ||||</span></a>
+</p>
+<h1 id="rfc.section.2.1.1"><a href="#rfc.section.2.1.1">2.1.1.</a> <a href="#flg-flag" id="flg-flag">FLG: Flag</a></h1>
+<p id="rfc.section.2.1.1.p.1">The flag field of the header byte (<samp>FLG</samp>) is always set to the value two (or <samp>10</samp> in binary). Any frame received with these bits set to any other value else MUST NOT be considered a Spinel frame. </p>
+<p id="rfc.section.2.1.1.p.2">This convention allows Spinel to be line compatible with BTLE HCI. By defining the first two bit in this way we can disambiguate between Spinel frames and HCI frames (which always start with either <samp>0x01</samp> or <samp>0x04</samp>) without any additional framing overhead. </p>
+<h1 id="rfc.section.2.1.2"><a href="#rfc.section.2.1.2">2.1.2.</a> <a href="#nli-network-link-identifier" id="nli-network-link-identifier">NLI: Network Link Identifier</a></h1>
+<p id="rfc.section.2.1.2.p.1">The Network Link Identifier (NLI) is a number between 0 and 3, which is associated by the OS with one of up to four IPv6 zone indices corresponding to conceptual IPv6 interfaces on the NCP. This allows the protocol to support IPv6 nodes connecting simultaneously to more than one IPv6 network link using a single NCP instance. The first Network Link Identifier (0) MUST refer to a distinguished conceptual interface provided by the NCP for its IPv6 link type. The other three Network Link Identifiers (1, 2 and 3) MAY be dissociated from any conceptual interface. </p>
+<h1 id="rfc.section.2.1.3"><a href="#rfc.section.2.1.3">2.1.3.</a> <a href="#tid-transaction-identifier" id="tid-transaction-identifier">TID: Transaction Identifier</a></h1>
+<p id="rfc.section.2.1.3.p.1">The least significant bits of the header represent the Transaction Identifier(TID). The TID is used for correlating responses to the commands which generated them. </p>
+<p id="rfc.section.2.1.3.p.2">When a command is sent from the host, any reply to that command sent by the NCP will use the same value for the TID. When the host receives a frame that matches the TID of the command it sent, it can easily recognize that frame as the actual response to that command. </p>
+<p id="rfc.section.2.1.3.p.3">The TID value of zero (0) is used for commands to which a correlated response is not expected or needed, such as for unsolicited update commands sent to the host from the NCP. </p>
+<h1 id="rfc.section.2.1.4"><a href="#rfc.section.2.1.4">2.1.4.</a> <a href="#command-identifier-cmd" id="command-identifier-cmd">Command Identifier (CMD)</a></h1>
+<p id="rfc.section.2.1.4.p.1">The command identifier is a 21-bit unsigned integer encoded in up to three bytes using the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>. This encoding allows for up to 2,097,152 individual commands, with the first 127 commands represented as a single byte. Command identifiers larger than 2,097,151 are explicitly forbidden. </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">CID Range</th>
+ <th class="center">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">0 - 63</td>
+ <td class="center">Reserved for core commands</td>
+ </tr>
+ <tr>
+ <td class="center">64 - 15,359</td>
+ <td class="center">
+ <em>UNALLOCATED</em>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">15,360 - 16,383</td>
+ <td class="center">Vendor-specific</td>
+ </tr>
+ <tr>
+ <td class="center">16,384 - 1,999,999</td>
+ <td class="center">
+ <em>UNALLOCATED</em>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">2,000,000 - 2,097,151</td>
+ <td class="center">Experimental use only</td>
+ </tr>
+ </tbody>
+</table>
+<h1 id="rfc.section.2.1.5"><a href="#rfc.section.2.1.5">2.1.5.</a> <a href="#command-payload-optional" id="command-payload-optional">Command Payload (Optional)</a></h1>
+<p id="rfc.section.2.1.5.p.1">Depending on the semantics of the command in question, a payload MAY be included in the frame. The exact composition and length of the payload is defined by the command identifier. </p>
+<h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a> <a href="#data-packing" id="data-packing">Data Packing</a></h1>
+<p id="rfc.section.3.p.1">Data serialization for properties is performed using a light-weight data packing format which was loosely inspired by D-Bus. The format of a serialization is defined by a specially formatted string. </p>
+<p id="rfc.section.3.p.2">This packing format is used for notational convenience. While this string-based datatype format has been designed so that the strings may be directly used by a structured data parser, such a thing is not required to implement Spinel. Indeed, higly constrained applications may find such a thing to be too heavyweight. </p>
+<p id="rfc.section.3.p.3">Goals: </p>
+<p/>
+
+<ul>
+ <li>Be lightweight and favor direct representation of values.</li>
+ <li>Use an easily readable and memorable format string.</li>
+ <li>Support lists and structures.</li>
+ <li>Allow properties to be appended to structures while maintaining backward compatibility.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.3.p.5">Each primitive datatype has an ASCII character associated with it. Structures can be represented as strings of these characters. For example: </p>
+<p/>
+
+<ul>
+ <li><samp>C</samp>: A single unsigned byte.</li>
+ <li><samp>C6U</samp>: A single unsigned byte, followed by a 128-bit IPv6 address, followed by a zero-terminated UTF8 string.</li>
+ <li><samp>A(6)</samp>: An array of concatenated IPv6 addresses</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.3.p.7">In each case, the data is represented exactly as described. For example, an array of 10 IPv6 address is stored as 160 bytes. </p>
+<h1 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1.</a> <a href="#primitive-types" id="primitive-types">Primitive Types</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Char</th>
+ <th class="left">Name</th>
+ <th class="left">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">
+ <samp>.</samp>
+ </td>
+ <td class="left">DATATYPE_VOID</td>
+ <td class="left">Empty data type. Used internally.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>b</samp>
+ </td>
+ <td class="left">DATATYPE_BOOL</td>
+ <td class="left">Boolean value. Encoded in 8-bits as either 0x00 or 0x01. All other values are illegal.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>C</samp>
+ </td>
+ <td class="left">DATATYPE_UINT8</td>
+ <td class="left">Unsigned 8-bit integer.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>c</samp>
+ </td>
+ <td class="left">DATATYPE_INT8</td>
+ <td class="left">Signed 8-bit integer.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>S</samp>
+ </td>
+ <td class="left">DATATYPE_UINT16</td>
+ <td class="left">Unsigned 16-bit integer.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>s</samp>
+ </td>
+ <td class="left">DATATYPE_INT16</td>
+ <td class="left">Signed 16-bit integer.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>L</samp>
+ </td>
+ <td class="left">DATATYPE_UINT32</td>
+ <td class="left">Unsigned 32-bit integer.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>l</samp>
+ </td>
+ <td class="left">DATATYPE_INT32</td>
+ <td class="left">Signed 32-bit integer.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>i</samp>
+ </td>
+ <td class="left">DATATYPE_UINT_PACKED</td>
+ <td class="left">Packed Unsigned Integer. See <a href="#packed-unsigned-integer">Section 3.2</a>.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>6</samp>
+ </td>
+ <td class="left">DATATYPE_IPv6ADDR</td>
+ <td class="left">IPv6 Address. (Big-endian)</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>E</samp>
+ </td>
+ <td class="left">DATATYPE_EUI64</td>
+ <td class="left">EUI-64 Address. (Big-endian)</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>e</samp>
+ </td>
+ <td class="left">DATATYPE_EUI48</td>
+ <td class="left">EUI-48 Address. (Big-endian)</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>D</samp>
+ </td>
+ <td class="left">DATATYPE_DATA</td>
+ <td class="left">Arbitrary data. See <a href="#data-blobs">Section 3.3</a>.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>d</samp>
+ </td>
+ <td class="left">DATATYPE_DATA_WLEN</td>
+ <td class="left">Arbitrary data with prepended length. See <a href="#data-blobs">Section 3.3</a>.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>U</samp>
+ </td>
+ <td class="left">DATATYPE_UTF8</td>
+ <td class="left">Zero-terminated UTF8-encoded string.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>t(...)</samp>
+ </td>
+ <td class="left">DATATYPE_STRUCT</td>
+ <td class="left">Structured datatype with prepended length. See <a href="#structured-data">Section 3.4</a>.</td>
+ </tr>
+ <tr>
+ <td class="center">
+ <samp>A(...)</samp>
+ </td>
+ <td class="left">DATATYPE_ARRAY</td>
+ <td class="left">Array of datatypes. Compound type. See <a href="#arrays">Section 3.5</a>.</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.3.1.p.1">All multi-byte values are little-endian unless explicitly stated otherwise. </p>
+<h1 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2.</a> <a href="#packed-unsigned-integer" id="packed-unsigned-integer">Packed Unsigned Integer</a></h1>
+<p id="rfc.section.3.2.p.1">For certain types of integers, such command or property identifiers, usually have a value on the wire that is less than 127. However, in order to not preclude the use of values larger than 255, we would need to add an extra byte. Doing this would add an extra byte to the majority of instances, which can add up in terms of bandwidth. </p>
+<p id="rfc.section.3.2.p.2">The packed unsigned integer format is based on the <a href="https://www.w3.org/TR/exi/#encodingUnsignedInteger">unsigned integer format in EXI</a>, except that we limit the maximum value to the largest value that can be encoded into three bytes(2,097,151). </p>
+<p id="rfc.section.3.2.p.3">For all values less than 127, the packed form of the number is simply a single byte which directly represents the number. For values larger than 127, the following process is used to encode the value: </p>
+<p/>
+
+<ol>
+ <li>The unsigned integer is broken up into <em>n</em> 7-bit chunks and placed into <em>n</em> octets, leaving the most significant bit of each octet unused.</li>
+ <li>Order the octets from least-significant to most-significant. (Little-endian)</li>
+ <li>Clear the most significant bit of the most significant octet. Set the least significant bit on all other octets.</li>
+</ol>
+
+<p> </p>
+<p id="rfc.section.3.2.p.5">Where <em>n</em> is the smallest number of 7-bit chunks you can use to represent the given value. </p>
+<p id="rfc.section.3.2.p.6">Take the value 1337, for example: </p>
+<pre>
+1337 => 0x0539
+ => [39 0A]
+ => [B9 0A]
+</pre>
+<p id="rfc.section.3.2.p.7">To decode the value, you collect the 7-bit chunks until you find an octet with the most significant bit clear. </p>
+<h1 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3.</a> <a href="#data-blobs" id="data-blobs">Data Blobs</a></h1>
+<p id="rfc.section.3.3.p.1">There are two types for data blobs: <samp>d</samp> and <samp>D</samp>. </p>
+<p/>
+
+<ul>
+ <li><samp>d</samp> has the length of the data (in bytes) prepended to the data (with the length encoded as type <samp>S</samp>). The size of the length field is not included in the length.</li>
+ <li><samp>D</samp> does not have a prepended length: the length of the data is implied by the bytes remaining to be parsed. It is an error for <samp>D</samp> to not be the last type in a type in a type signature.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.3.3.p.3">This dichotomy allows for more efficient encoding by eliminating redundency. If the rest of the buffer is a data blob, encoding the length would be redundant because we already know how many bytes are in the rest of the buffer. </p>
+<p id="rfc.section.3.3.p.4">In some cases we use <samp>d</samp> even if it is the last field in a type signature. We do this to allow for us to be able to append additional fields to the type signature if necessary in the future. This is usually the case with embedded structs, like in the scan results. </p>
+<p id="rfc.section.3.3.p.5">For example, let's say we have a buffer that is encoded with the datatype signature of <samp>CLLD</samp>. In this case, it is pretty easy to tell where the start and end of the data blob is: the start is 9 bytes from the start of the buffer, and its length is the length of the buffer minus 9. (9 is the number of bytes taken up by a byte and two longs) </p>
+<p id="rfc.section.3.3.p.6">The datatype signature <samp>CLLDU</samp> is illegal because we can't determine where the last field (a zero-terminated UTF8 string) starts. But the datatype <samp>CLLdU</samp> <em>is</em> legal, because the parser can determine the exact length of the data blob-- allowing it to know where the start of the next field would be. </p>
+<h1 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4.</a> <a href="#structured-data" id="structured-data">Structured Data</a></h1>
+<p id="rfc.section.3.4.p.1">The structure data type (<samp>t(...)</samp>) is a way of bundling together several fields into a single structure. It can be thought of as a <samp>d</samp> type except that instead of being opaque, the fields in the content are known. This is useful for things like scan results where you have substructures which are defined by different layers. </p>
+<p id="rfc.section.3.4.p.2">For example, consider the type signature <samp>Lt(ES)t(6C)</samp>. In this hypothetical case, the first struct is defined by the MAC layer, and the second struct is defined by the PHY layer. Because of the use of structures, we know exactly what part comes from that layer. Additionally, we can add fields to each structure without introducing backward compatability problems: Data encoded as <samp>Lt(ESU)t(6C)</samp> (Notice the extra <samp>U</samp>) will decode just fine as <samp>Lt(ES)t(6C)</samp>. Additionally, if we don't care about the MAC layer and only care about the network layer, we could parse as <samp>Lt()t(6C)</samp>. </p>
+<p id="rfc.section.3.4.p.3">Note that data encoded as <samp>Lt(ES)t(6C)</samp> will also parse as <samp>Ldd</samp>, with the structures from both layers now being opaque data blobs. </p>
+<h1 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5.</a> <a href="#arrays" id="arrays">Arrays</a></h1>
+<p id="rfc.section.3.5.p.1">An array is simply a concatenated set of <em>n</em> data encodings. For example, the type <samp>A(6)</samp> is simply a list of IPv6 addresses---one after the other. The type <samp>A(6E)</samp> likewise a concatenation of IPv6-address/EUI-64 pairs. </p>
+<p id="rfc.section.3.5.p.2">If an array contains many fields, the fields will often be surrounded by a structure (<samp>t(...)</samp>). This effectively prepends each item in the array with its length. This is useful for improving parsing performance or to allow additional fields to be added in the future in a backward compatible way. If there is a high certainty that additional fields will never be added, the struct may be omitted (saving two bytes per item). </p>
+<p id="rfc.section.3.5.p.3">This specification does not define a way to embed an array as a field alongside other fields. </p>
+<h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> <a href="#commands" id="commands">Commands</a></h1>
+<h1 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1.</a> <a href="#cmd-noop" id="cmd-noop">CMD 0: (Host->NCP) CMD_NOOP</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_NOOP</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.1.p.1">No-Operation command. Induces the NCP to send a success status back to the host. This is primarily used for liveliness checks. </p>
+<p id="rfc.section.4.1.p.2">The command payload for this command SHOULD be empty. The receiver MUST ignore any non-empty command payload. </p>
+<p id="rfc.section.4.1.p.3">There is no error condition for this command. </p>
+<h1 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2.</a> <a href="#cmd-reset" id="cmd-reset">CMD 1: (Host->NCP) CMD_RESET</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_RESET</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.2.p.1">Reset NCP command. Causes the NCP to perform a software reset. Due to the nature of this command, the TID is ignored. The host should instead wait for a <samp>CMD_PROP_VALUE_IS</samp> command from the NCP indicating <samp>PROP_LAST_STATUS</samp> has been set to <samp>STATUS_RESET_SOFTWARE</samp>. </p>
+<p id="rfc.section.4.2.p.2">The command payload for this command SHOULD be empty. The receiver MUST ignore any non-empty command payload. </p>
+<p id="rfc.section.4.2.p.3">If an error occurs, the value of <samp>PROP_LAST_STATUS</samp> will be emitted instead with the value set to the generated status code for the error. </p>
+<h1 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3.</a> <a href="#cmd-prop-value-get" id="cmd-prop-value-get">CMD 2: (Host->NCP) CMD_PROP_VALUE_GET</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">1-3</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PROP_VALUE_GET</td>
+ <td class="center">PROP_ID</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.3.p.1">Get property value command. Causes the NCP to emit a <samp>CMD_PROP_VALUE_IS</samp> command for the given property identifier. </p>
+<p id="rfc.section.4.3.p.2">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>. </p>
+<p id="rfc.section.4.3.p.3">If an error occurs, the value of <samp>PROP_LAST_STATUS</samp> will be emitted instead with the value set to the generated status code for the error. </p>
+<h1 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4.</a> <a href="#cmd-prop-value-set" id="cmd-prop-value-set">CMD 3: (Host->NCP) CMD_PROP_VALUE_SET</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">1-3</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PROP_VALUE_SET</td>
+ <td class="center">PROP_ID</td>
+ <td class="center">VALUE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.4.p.1">Set property value command. Instructs the NCP to set the given property to the specific given value, replacing any previous value. </p>
+<p id="rfc.section.4.4.p.2">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the property value. The exact format of the property value is defined by the property. </p>
+<p id="rfc.section.4.4.p.3">If an error occurs, the value of <samp>PROP_LAST_STATUS</samp> will be emitted with the value set to the generated status code for the error. </p>
+<h1 id="rfc.section.4.5"><a href="#rfc.section.4.5">4.5.</a> <a href="#cmd-prop-value-insert" id="cmd-prop-value-insert">CMD 4: (Host->NCP) CMD_PROP_VALUE_INSERT</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">1-3</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PROP_VALUE_INSERT</td>
+ <td class="center">PROP_ID</td>
+ <td class="center">VALUE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.5.p.1">Insert value into property command. Instructs the NCP to insert the given value into a list-oriented property, without removing other items in the list. The resulting order of items in the list is defined by the individual property being operated on. </p>
+<p id="rfc.section.4.5.p.2">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the value to be inserted. The exact format of the value is defined by the property. </p>
+<p id="rfc.section.4.5.p.3">If the type signature of the property specified by <samp>PROP_ID</samp> consists of a single structure enclosed by an array (<samp>A(t(...))</samp>), then the contents of <samp>VALUE</samp> MUST contain the contents of the structure (<samp>...</samp>) rather than the serialization of the whole item (<samp>t(...)</samp>). Specifically, the length of the structure MUST NOT be prepended to <samp>VALUE</samp>. This helps to eliminate redundant data. </p>
+<p id="rfc.section.4.5.p.4">If an error occurs, the value of <samp>PROP_LAST_STATUS</samp> will be emitted with the value set to the generated status code for the error. </p>
+<h1 id="rfc.section.4.6"><a href="#rfc.section.4.6">4.6.</a> <a href="#cmd-prop-value-remove" id="cmd-prop-value-remove">CMD 5: (Host->NCP) CMD_PROP_VALUE_REMOVE</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">1-3</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PROP_VALUE_REMOVE</td>
+ <td class="center">PROP_ID</td>
+ <td class="center">VALUE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.6.p.1">Remove value from property command. Instructs the NCP to remove the given value from a list-oriented property, without affecting other items in the list. The resulting order of items in the list is defined by the individual property being operated on. </p>
+<p id="rfc.section.4.6.p.2">Note that this command operates <em>by value</em>, not by index! </p>
+<p id="rfc.section.4.6.p.3">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the value to be removed. The exact format of the value is defined by the property. </p>
+<p id="rfc.section.4.6.p.4">If the type signature of the property specified by <samp>PROP_ID</samp> consists of a single structure enclosed by an array (<samp>A(t(...))</samp>), then the contents of <samp>VALUE</samp> MUST contain the contents of the structure (<samp>...</samp>) rather than the serialization of the whole item (<samp>t(...)</samp>). Specifically, the length of the structure MUST NOT be prepended to <samp>VALUE</samp>. This helps to eliminate redundant data. </p>
+<p id="rfc.section.4.6.p.5">If an error occurs, the value of <samp>PROP_LAST_STATUS</samp> will be emitted with the value set to the generated status code for the error. </p>
+<h1 id="rfc.section.4.7"><a href="#rfc.section.4.7">4.7.</a> <a href="#cmd-prop-value-is" id="cmd-prop-value-is">CMD 6: (NCP->Host) CMD_PROP_VALUE_IS</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">1-3</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PROP_VALUE_IS</td>
+ <td class="center">PROP_ID</td>
+ <td class="center">VALUE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.7.p.1">Property value notification command. This command can be sent by the NCP in response to a previous command from the host, or it can be sent by the NCP in an unsolicited fashion to notify the host of various state changes asynchronously. </p>
+<p id="rfc.section.4.7.p.2">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the current value of the given property. </p>
+<h1 id="rfc.section.4.8"><a href="#rfc.section.4.8">4.8.</a> <a href="#cmd-prop-value-inserted" id="cmd-prop-value-inserted">CMD 7: (NCP->Host) CMD_PROP_VALUE_INSERTED</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">1-3</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PROP_VALUE_INSERTED</td>
+ <td class="center">PROP_ID</td>
+ <td class="center">VALUE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.8.p.1">Property value insertion notification command. This command can be sent by the NCP in response to the <samp>CMD_PROP_VALUE_INSERT</samp> command, or it can be sent by the NCP in an unsolicited fashion to notify the host of various state changes asynchronously. </p>
+<p id="rfc.section.4.8.p.2">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the value that was inserted into the given property. </p>
+<p id="rfc.section.4.8.p.3">If the type signature of the property specified by <samp>PROP_ID</samp> consists of a single structure enclosed by an array (<samp>A(t(...))</samp>), then the contents of <samp>VALUE</samp> MUST contain the contents of the structure (<samp>...</samp>) rather than the serialization of the whole item (<samp>t(...)</samp>). Specifically, the length of the structure MUST NOT be prepended to <samp>VALUE</samp>. This helps to eliminate redundant data. </p>
+<p id="rfc.section.4.8.p.4">The resulting order of items in the list is defined by the given property. </p>
+<h1 id="rfc.section.4.9"><a href="#rfc.section.4.9">4.9.</a> <a href="#cmd-prop-value-removed" id="cmd-prop-value-removed">CMD 8: (NCP->Host) CMD_PROP_VALUE_REMOVED</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">1-3</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PROP_VALUE_REMOVED</td>
+ <td class="center">PROP_ID</td>
+ <td class="center">VALUE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.9.p.1">Property value removal notification command. This command can be sent by the NCP in response to the <samp>CMD_PROP_VALUE_REMOVE</samp> command, or it can be sent by the NCP in an unsolicited fashion to notify the host of various state changes asynchronously. </p>
+<p id="rfc.section.4.9.p.2">Note that this command operates <em>by value</em>, not by index! </p>
+<p id="rfc.section.4.9.p.3">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the value that was removed from the given property. </p>
+<p id="rfc.section.4.9.p.4">If the type signature of the property specified by <samp>PROP_ID</samp> consists of a single structure enclosed by an array (<samp>A(t(...))</samp>), then the contents of <samp>VALUE</samp> MUST contain the contents of the structure (<samp>...</samp>) rather than the serialization of the whole item (<samp>t(...)</samp>). Specifically, the length of the structure MUST NOT be prepended to <samp>VALUE</samp>. This helps to eliminate redundant data. </p>
+<p id="rfc.section.4.9.p.5">The resulting order of items in the list is defined by the given property. </p>
+<h1 id="rfc.section.4.10"><a href="#rfc.section.4.10">4.10.</a> <a href="#cmd-peek" id="cmd-peek">CMD 18: (Host->NCP) CMD_PEEK</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">4</th>
+ <th class="center">2</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PEEK</td>
+ <td class="center">ADDRESS</td>
+ <td class="center">COUNT</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.10.p.1">This command allows the NCP to fetch values from the RAM of the NCP for debugging purposes. Upon success, <samp>CMD_PEEK_RET</samp> is sent from the NCP to the host. Upon failure, <samp>PROP_LAST_STATUS</samp> is emitted with the appropriate error indication. </p>
+<p id="rfc.section.4.10.p.2">Due to the low-level nature of this command, certain error conditions may induce the NCP to reset. </p>
+<p id="rfc.section.4.10.p.3">The NCP MAY prevent certain regions of memory from being accessed. </p>
+<p id="rfc.section.4.10.p.4">The implementation of this command has security implications. See <a href="#security-considerations">Section 13</a> for more information. </p>
+<p id="rfc.section.4.10.p.5">This command requires the capability <samp>CAP_PEEK_POKE</samp> to be present. </p>
+<h1 id="rfc.section.4.11"><a href="#rfc.section.4.11">4.11.</a> <a href="#cmd-peek-ret" id="cmd-peek-ret">CMD 19: (NCP->Host) CMD_PEEK_RET</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">4</th>
+ <th class="center">2</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PEEK_RET</td>
+ <td class="center">ADDRESS</td>
+ <td class="center">COUNT</td>
+ <td class="center">BYTES</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.11.p.1">This command contains the contents of memory that was requested by a previous call to <samp>CMD_PEEK</samp>. </p>
+<p id="rfc.section.4.11.p.2">This command requires the capability <samp>CAP_PEEK_POKE</samp> to be present. </p>
+<h1 id="rfc.section.4.12"><a href="#rfc.section.4.12">4.12.</a> <a href="#cmd-poke" id="cmd-poke">CMD 20: (Host->NCP) CMD_POKE</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">4</th>
+ <th class="center">2</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_POKE</td>
+ <td class="center">ADDRESS</td>
+ <td class="center">COUNT</td>
+ <td class="center">BYTES</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.12.p.1">This command writes the bytes to the specified memory address for debugging purposes. </p>
+<p id="rfc.section.4.12.p.2">Due to the low-level nature of this command, certain error conditions may induce the NCP to reset. </p>
+<p id="rfc.section.4.12.p.3">The implementation of this command has security implications. See <a href="#security-considerations">Section 13</a> for more information. </p>
+<p id="rfc.section.4.12.p.4">This command requires the capability <samp>CAP_PEEK_POKE</samp> to be present. </p>
+<h1 id="rfc.section.4.13"><a href="#rfc.section.4.13">4.13.</a> <a href="#cmd-prop-value-multi-get" id="cmd-prop-value-multi-get">CMD 21: (Host->NCP) CMD_PROP_VALUE_MULTI_GET</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>A(i)</samp></li>
+ <li>Required Capability: <samp>CAP_CMD_MULTI</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.4.13.p.2">Fetch the value of multiple properties in one command. Arguments are an array of property IDs. If all properties are fetched successfully, a <samp>CMD_PROP_VALUES_ARE</samp> command is sent back to the host containing the propertyid and value of each fetched property. The order of the results in <samp>CMD_PROP_VALUES_ARE</samp> match the order of properties given in <samp>CMD_PROP_VALUE_GET</samp>. </p>
+<p id="rfc.section.4.13.p.3">Errors fetching individual properties are reflected as indicating a change to <samp>PROP_LAST_STATUS</samp> for that property's place. </p>
+<p id="rfc.section.4.13.p.4">Not all properties can be fetched using this method. As a general rule of thumb, any property that blocks when getting will fail for that individual property with <samp>STATUS_INVALID_COMMAND_FOR_PROP</samp>. </p>
+<h1 id="rfc.section.4.14"><a href="#rfc.section.4.14">4.14.</a> <a href="#cmd-prop-value-multi-set" id="cmd-prop-value-multi-set">CMD 22: (Host->NCP) CMD_PROP_VALUE_MULTI_SET</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>A(iD)</samp></li>
+ <li>Required Capability: <samp>CAP_CMD_MULTI</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PROP_VALUE_MULTI_SET</td>
+ <td class="center">Property/Value Pairs</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.14.p.2">With each property/value pair being: </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">2</th>
+ <th class="center">1-3</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">LENGTH</td>
+ <td class="center">PROP_ID</td>
+ <td class="center">PROP_VALUE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.14.p.3">This command sets the value of several properties at once in the given order. The setting of properties stops at the first error, ignoring any later properties. </p>
+<p id="rfc.section.4.14.p.4">The result of this command is generally <samp>CMD_PROP_VALUES_ARE</samp> unless (for example) a parsing error has occured (in which case <samp>CMD_PROP_VALUE_IS</samp> for <samp>PROP_LAST_STATUS</samp> would be the result). The order of the results in <samp>CMD_PROP_VALUES_ARE</samp> match the order of properties given in <samp>CMD_PROP_VALUE_MULTI_SET</samp>. </p>
+<p id="rfc.section.4.14.p.5">Since the processing of properties to set stops at the first error, the resulting <samp>CMD_PROP_VALUES_ARE</samp> can contain fewer items than the requested number of properties to set. </p>
+<p id="rfc.section.4.14.p.6">Not all properties can be set using this method. As a general rule of thumb, any property that blocks when setting will fail for that individual property with <samp>STATUS_INVALID_COMMAND_FOR_PROP</samp>. </p>
+<h1 id="rfc.section.4.15"><a href="#rfc.section.4.15">4.15.</a> <a href="#cmd-prop-values-are" id="cmd-prop-values-are">CMD 23: (NCP->Host) CMD_PROP_VALUES_ARE</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>A(iD)</samp></li>
+ <li>Required Capability: <samp>CAP_CMD_MULTI</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_PROP_VALUES_ARE</td>
+ <td class="center">Property/Value Pairs</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.15.p.2">With each property/value pair being: </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">2</th>
+ <th class="center">1-3</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">LENGTH</td>
+ <td class="center">PROP_ID</td>
+ <td class="center">PROP_VALUE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.4.15.p.3">This command is emitted by the NCP as the response to both the <samp>CMD_PROP_VALUE_MULTI_GET</samp> and <samp>CMD_PROP_VALUE_MULTI_SET</samp> commands. It is roughly analogous to <samp>CMD_PROP_VALUE_IS</samp>, except that it contains more than one property. </p>
+<p id="rfc.section.4.15.p.4">This command SHOULD NOT be emitted asynchronously, or in response to any command other than <samp>CMD_PROP_VALUE_MULTI_GET</samp> or <samp>CMD_PROP_VALUE_MULTI_SET</samp>. </p>
+<p id="rfc.section.4.15.p.5">The arguments are a list of structures containing the emitted property and the associated value. These are presented in the same order as given in the associated initiating command. In cases where getting or setting a specific property resulted in an error, the associated slot in this command will describe <samp>PROP_LAST_STATUS</samp>. </p>
+<h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a href="#properties" id="properties">Properties</a></h1>
+<p id="rfc.section.5.p.1">Spinel is largely a property-based protocol, similar to representational state transfer (REST), with a property defined for every attribute that an OS needs to create, read, update or delete in the function of an IPv6 interface. The inspiration of this approach was memory-mapped hardware registers for peripherals. The goal is to avoid, as much as possible, the use of large complicated structures and/or method argument lists. The reason for avoiding these is because they have a tendency to change, especially early in development. Adding or removing a property from a structure can render the entire protocol incompatible. By using properties, you simply extend the protocol with an additional property. </p>
+<p id="rfc.section.5.p.2">Almost all features and capabilities are implemented using properties. Most new features that are initially proposed as commands can be adapted to be property-based instead. Notable exceptions include "Host Buffer Offload" (<a href="#feature-host-buffer-offload">Section 9</a>) and "Network Save" (<a href="#feature-network-save">Section 8</a>). </p>
+<p id="rfc.section.5.p.3">In Spinel, properties are keyed by an unsigned integer between 0 and 2,097,151 (See <a href="#packed-unsigned-integer">Section 3.2</a>). </p>
+<h1 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1.</a> <a href="#property-methods" id="property-methods">Property Methods</a></h1>
+<p id="rfc.section.5.1.p.1">Properties may support one or more of the following methods: </p>
+<p/>
+
+<ul>
+ <li><samp>VALUE_GET</samp> (<a href="#cmd-prop-value-get">Section 4.3</a>)</li>
+ <li><samp>VALUE_SET</samp> (<a href="#cmd-prop-value-set">Section 4.4</a>)</li>
+ <li><samp>VALUE_INSERT</samp> (<a href="#cmd-prop-value-insert">Section 4.5</a>)</li>
+ <li><samp>VALUE_REMOVE</samp> (<a href="#cmd-prop-value-remove">Section 4.6</a>)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.1.p.3">Additionally, the NCP can send updates to the host (either synchronously or asynchronously) that inform the host about changes to specific properties: </p>
+<p/>
+
+<ul>
+ <li><samp>VALUE_IS</samp> (<a href="#cmd-prop-value-is">Section 4.7</a>)</li>
+ <li><samp>VALUE_INSERTED</samp> (<a href="#cmd-prop-value-inserted">Section 4.8</a>)</li>
+ <li><samp>VALUE_REMOVED</samp> (<a href="#cmd-prop-value-removed">Section 4.9</a>)</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2.</a> <a href="#property-types" id="property-types">Property Types</a></h1>
+<p id="rfc.section.5.2.p.1">Conceptually, there are three different types of properties: </p>
+<p/>
+
+<ul>
+ <li>Single-value properties</li>
+ <li>Multiple-value (Array) properties</li>
+ <li>Stream properties</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.2.1"><a href="#rfc.section.5.2.1">5.2.1.</a> <a href="#singlevalue-properties" id="singlevalue-properties">Single-Value Properties</a></h1>
+<p id="rfc.section.5.2.1.p.1">Single-value properties are properties that have a simple representation of a single value. Examples would be: </p>
+<p/>
+
+<ul>
+ <li>Current radio channel (Represented as an unsigned 8-bit integer)</li>
+ <li>Network name (Represented as a UTF-8 encoded string)</li>
+ <li>802.15.4 PAN ID (Represented as an unsigned 16-bit integer)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.2.1.p.3">The valid operations on these sorts of properties are <samp>GET</samp> and <samp>SET</samp>. </p>
+<h1 id="rfc.section.5.2.2"><a href="#rfc.section.5.2.2">5.2.2.</a> <a href="#multiplevalue-properties" id="multiplevalue-properties">Multiple-Value Properties</a></h1>
+<p id="rfc.section.5.2.2.p.1">Multiple-Value Properties have more than one value associated with them. Examples would be: </p>
+<p/>
+
+<ul>
+ <li>List of channels supported by the radio hardware.</li>
+ <li>List of IPv6 addresses assigned to the interface.</li>
+ <li>List of capabilities supported by the NCP.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.2.2.p.3">The valid operations on these sorts of properties are <samp>VALUE_GET</samp>, <samp>VALUE_SET</samp>, <samp>VALUE_INSERT</samp>, and <samp>VALUE_REMOVE</samp>. </p>
+<p id="rfc.section.5.2.2.p.4">When the value is fetched using <samp>VALUE_GET</samp>, the returned value is the concatenation of all of the individual values in the list. If the length of the value for an individual item in the list is not defined by the type then each item returned in the list is prepended with a length (See <a href="#arrays">Section 3.5</a>). The order of the returned items, unless explicitly defined for that specific property, is undefined. </p>
+<p><samp>VALUE_SET</samp> provides a way to completely replace all previous values. Calling <samp>VALUE_SET</samp> with an empty value effectively instructs the NCP to clear the value of that property. </p>
+<p><samp>VALUE_INSERT</samp> and <samp>VALUE_REMOVE</samp> provide mechanisms for the insertion or removal of individual items <em>by value</em>. The payload for these commands is a plain single value. </p>
+<h1 id="rfc.section.5.2.3"><a href="#rfc.section.5.2.3">5.2.3.</a> <a href="#stream-properties" id="stream-properties">Stream Properties</a></h1>
+<p id="rfc.section.5.2.3.p.1">Stream properties are special properties representing streams of data. Examples would be: </p>
+<p/>
+
+<ul>
+ <li>Network packet stream (<a href="#prop-stream-net">Section 5.6.3</a>)</li>
+ <li>Raw packet stream (<a href="#prop-stream-raw">Section 5.6.2</a>)</li>
+ <li>Debug message stream (<a href="#prop-stream-debug">Section 5.6.1</a>)</li>
+ <li>Network Beacon stream (<a href="#prop-mac-scan-beacon">Section 5.8.4</a>)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.2.3.p.3">All such properties emit changes asynchronously using the <samp>VALUE_IS</samp> command, sent from the NCP to the host. For example, as IPv6 traffic is received by the NCP, the IPv6 packets are sent to the host by way of asynchronous <samp>VALUE_IS</samp> notifications. </p>
+<p id="rfc.section.5.2.3.p.4">Some of these properties also support the host send data back to the NCP. For example, this is how the host sends IPv6 traffic to the NCP. </p>
+<p id="rfc.section.5.2.3.p.5">These types of properties generally do not support <samp>VALUE_GET</samp>, as it is meaningless. </p>
+<h1 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3.</a> <a href="#property-numbering" id="property-numbering">Property Numbering</a></h1>
+<p id="rfc.section.5.3.p.1">While the majority of the properties that allow the configuration of network connectivity are network protocol specific, there are several properties that are required in all implementations. </p>
+<p id="rfc.section.5.3.p.2">Future property allocations SHALL be made from the following allocation plan: </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="left">Property ID Range</th>
+ <th class="left">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="left">0 - 127</td>
+ <td class="left">Reserved for frequently-used properties</td>
+ </tr>
+ <tr>
+ <td class="left">128 - 15,359</td>
+ <td class="left">Unallocated</td>
+ </tr>
+ <tr>
+ <td class="left">15,360 - 16,383</td>
+ <td class="left">Vendor-specific</td>
+ </tr>
+ <tr>
+ <td class="left">16,384 - 1,999,999</td>
+ <td class="left">Unallocated</td>
+ </tr>
+ <tr>
+ <td class="left">2,000,000 - 2,097,151</td>
+ <td class="left">Experimental use only</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.3.p.3">For an explanation of the data format encoding shorthand used throughout this document, see <a href="#data-packing">Section 3</a>. </p>
+<h1 id="rfc.section.5.4"><a href="#rfc.section.5.4">5.4.</a> <a href="#property-sections" id="property-sections">Property Sections</a></h1>
+<p id="rfc.section.5.4.p.1">The currently assigned properties are broken up into several sections, each with reserved ranges of property identifiers. These ranges are: </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Name</th>
+ <th class="center">Range (Inclusive)</th>
+ <th class="center">Documentation</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Core</td>
+ <td class="center">0x00 - 0x1F, 0x1000 - 0x11FF</td>
+ <td class="center">
+ <a href="#prop-core">Section 5.5</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">PHY</td>
+ <td class="center">0x20 - 0x2F, 0x1200 - 0x12FF</td>
+ <td class="center">
+ <a href="#prop-phy">Section 5.7</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">MAC</td>
+ <td class="center">0x30 - 0x3F, 0x1300 - 0x13FF</td>
+ <td class="center">
+ <a href="#prop-mac">Section 5.8</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">NET</td>
+ <td class="center">0x40 - 0x4F, 0x1400 - 0x14FF</td>
+ <td class="center">
+ <a href="#prop-net">Section 5.9</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">Tech</td>
+ <td class="center">0x50 - 0x5F, 0x1500 - 0x15FF</td>
+ <td class="center">Technology-specific</td>
+ </tr>
+ <tr>
+ <td class="center">IPv6</td>
+ <td class="center">0x60 - 0x6F, 0x1600 - 0x16FF</td>
+ <td class="center">
+ <a href="#prop-ipv6">Section 5.10</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">Stream</td>
+ <td class="center">0x70 - 0x7F, 0x1700 - 0x17FF</td>
+ <td class="center">
+ <a href="#prop-core">Section 5.5</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">Debug</td>
+ <td class="center">0x4000 - 0x4400</td>
+ <td class="center">
+ <a href="#prop-debug">Section 5.11</a>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.4.p.2">Note that some of the property sections have two reserved ranges: a primary range (which is encoded as a single byte) and an extended range (which is encoded as two bytes). properties which are used more frequently are generally allocated from the former range. </p>
+<h1 id="rfc.section.5.5"><a href="#rfc.section.5.5">5.5.</a> <a href="#prop-core" id="prop-core">Core Properties</a></h1>
+<h1 id="rfc.section.5.5.1"><a href="#rfc.section.5.5.1">5.5.1.</a> <a href="#prop-last-status" id="prop-last-status">PROP 0: PROP_LAST_STATUS</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Encoding: <samp>i</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="right">Octets:</th>
+ <th class="center">1-3</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="right">Fields:</td>
+ <td class="center">LAST_STATUS</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.1.p.2">Describes the status of the last operation. Encoded as a packed unsigned integer. </p>
+<p id="rfc.section.5.5.1.p.3">This property is emitted often to indicate the result status of pretty much any Host-to-NCP operation. </p>
+<p id="rfc.section.5.5.1.p.4">It is emitted automatically at NCP startup with a value indicating the reset reason. </p>
+<p id="rfc.section.5.5.1.p.5">See <a href="#status-codes">Section 6</a> for the complete list of status codes. </p>
+<h1 id="rfc.section.5.5.2"><a href="#rfc.section.5.5.2">5.5.2.</a> <a href="#prop-protocol-version" id="prop-protocol-version">PROP 1: PROP_PROTOCOL_VERSION</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Encoding: <samp>ii</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1-3</th>
+ <th class="center">1-3</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">MAJOR_VERSION</td>
+ <td class="center">MINOR_VERSION</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.2.p.2">Describes the protocol version information. This property contains four fields, each encoded as a packed unsigned integer: </p>
+<p/>
+
+<ul>
+ <li>Major Version Number</li>
+ <li>Minor Version Number</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.5.2.p.4">This document describes major version 4, minor version 3 of this protocol. </p>
+<p id="rfc.section.5.5.2.p.5">The host MUST only use this property from NLI 0. Behavior when used from other NLIs is undefined. </p>
+<h1 id="rfc.section.5.5.2.1"><a href="#rfc.section.5.5.2.1">5.5.2.1.</a> <a href="#major-version-number" id="major-version-number">Major Version Number</a></h1>
+<p id="rfc.section.5.5.2.1.p.1">The major version number is used to identify large and incompatible differences between protocol versions. </p>
+<p id="rfc.section.5.5.2.1.p.2">The host MUST enter a FAULT state if it does not explicitly support the given major version number. </p>
+<h1 id="rfc.section.5.5.2.2"><a href="#rfc.section.5.5.2.2">5.5.2.2.</a> <a href="#minor-version-number" id="minor-version-number">Minor Version Number</a></h1>
+<p id="rfc.section.5.5.2.2.p.1">The minor version number is used to identify small but otherwise compatible differences between protocol versions. A mismatch between the advertised minor version number and the minor version that is supported by the host SHOULD NOT be fatal to the operation of the host. </p>
+<h1 id="rfc.section.5.5.3"><a href="#rfc.section.5.5.3">5.5.3.</a> <a href="#prop-ncp-version" id="prop-ncp-version">PROP 2: PROP_NCP_VERSION</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>U</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">NCP_VESION_STRING</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.3.p.2">Contains a string which describes the firmware currently running on the NCP. Encoded as a zero-terminated UTF-8 string. </p>
+<p id="rfc.section.5.5.3.p.3">The format of the string is not strictly defined, but it is intended to present similarly to the "User-Agent" string from HTTP. The RECOMMENDED format of the string is as follows: </p>
+<pre>
+STACK-NAME/STACK-VERSION[BUILD_INFO][; OTHER_INFO]; BUILD_DATE_AND_TIME
+</pre>
+<p id="rfc.section.5.5.3.p.4">Examples: </p>
+<p/>
+
+<ul>
+ <li>
+ <samp>OpenThread/1.0d26-25-gb684c7f; DEBUG; May 9 2016 18:22:04</samp>
+ </li>
+ <li>
+ <samp>ConnectIP/2.0b125 s1 ALPHA; Sept 24 2015 20:49:19</samp>
+ </li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.5.3.p.6">The host MUST only use this property from NLI 0. Behavior when used from other NLIs is undefined. </p>
+<h1 id="rfc.section.5.5.4"><a href="#rfc.section.5.5.4">5.5.4.</a> <a href="#prop-interface-type" id="prop-interface-type">PROP 3: PROP_INTERFACE_TYPE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Encoding: <samp>i</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1-3</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">INTERFACE_TYPE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.4.p.2">This integer identifies what the network protocol for this NCP. Currently defined values are: </p>
+<p/>
+
+<ul>
+ <li>0: Bootloader</li>
+ <li>2: ZigBee IP(TM)</li>
+ <li>3: Thread(R)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.5.4.p.4">The host MUST enter a FAULT state if it does not recognize the protocol given by the NCP. </p>
+<h1 id="rfc.section.5.5.5"><a href="#rfc.section.5.5.5">5.5.5.</a> <a href="#prop-interface-vendor-id" id="prop-interface-vendor-id">PROP 4: PROP_INTERFACE_VENDOR_ID</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Encoding: <samp>i</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1-3</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">VENDOR_ID</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.5.p.2">Vendor identifier. </p>
+<h1 id="rfc.section.5.5.6"><a href="#rfc.section.5.5.6">5.5.6.</a> <a href="#prop-caps" id="prop-caps">PROP 5: PROP_CAPS</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>A(i)</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1-3</th>
+ <th class="center">1-3</th>
+ <th class="center">...</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">CAP_1</td>
+ <td class="center">CAP_2</td>
+ <td class="center">...</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.6.p.2">Describes the supported capabilities of this NCP. Encoded as a list of packed unsigned integers. </p>
+<p id="rfc.section.5.5.6.p.3">A capability is defined as a 21-bit integer that describes a subset of functionality which is supported by the NCP. </p>
+<p id="rfc.section.5.5.6.p.4">Currently defined values are: </p>
+<p/>
+
+<ul>
+ <li>1: <samp>CAP_LOCK</samp></li>
+ <li>2: <samp>CAP_NET_SAVE</samp></li>
+ <li>3: <samp>CAP_HBO</samp>: Host Buffer Offload. See <a href="#feature-host-buffer-offload">Section 9</a>.</li>
+ <li>4: <samp>CAP_POWER_SAVE</samp></li>
+ <li>5: <samp>CAP_COUNTERS</samp></li>
+ <li>6: <samp>CAP_JAM_DETECT</samp>: Jamming detection. See <a href="#feature-jam-detect">Section 10</a></li>
+ <li>7: <samp>CAP_PEEK_POKE</samp>: PEEK/POKE debugging commands.</li>
+ <li>8: <samp>CAP_WRITABLE_RAW_STREAM</samp>: <samp>PROP_STREAM_RAW</samp> is writable.</li>
+ <li>9: <samp>CAP_GPIO</samp>: Support for GPIO access. See <a href="#feature-gpio-access">Section 11</a>.</li>
+ <li>10: <samp>CAP_TRNG</samp>: Support for true random number generation. See <a href="#feature-trng">Section 12</a>.</li>
+ <li>11: <samp>CAP_CMD_MULTI</samp>: Support for <samp>CMD_PROP_VALUE_MULTI_GET</samp> (<a href="#cmd-prop-value-multi-get">Section 4.13</a>), <samp>CMD_PROP_VALUE_MULTI_SET</samp> (<a href="#cmd-prop-value-multi-set">Section 4.14</a>, and <samp>CMD_PROP_VALUES_ARE</samp> (<a href="#cmd-prop-values-are">Section 4.15</a>).</li>
+ <li>12: <samp>CAP_UNSOL_UPDATE_FILTER</samp>: Support for <samp>PROP_UNSOL_UPDATE_FILTER</samp> (<a href="#prop-unsol-update-filter">Section 5.5.12</a>) and <samp>PROP_UNSOL_UPDATE_LIST</samp> (<a href="#prop-unsol-update-list">Section 5.5.13</a>).</li>
+ <li>16: <samp>CAP_802_15_4_2003</samp></li>
+ <li>17: <samp>CAP_802_15_4_2006</samp></li>
+ <li>18: <samp>CAP_802_15_4_2011</samp></li>
+ <li>21: <samp>CAP_802_15_4_PIB</samp></li>
+ <li>24: <samp>CAP_802_15_4_2450MHZ_OQPSK</samp></li>
+ <li>25: <samp>CAP_802_15_4_915MHZ_OQPSK</samp></li>
+ <li>26: <samp>CAP_802_15_4_868MHZ_OQPSK</samp></li>
+ <li>27: <samp>CAP_802_15_4_915MHZ_BPSK</samp></li>
+ <li>28: <samp>CAP_802_15_4_868MHZ_BPSK</samp></li>
+ <li>29: <samp>CAP_802_15_4_915MHZ_ASK</samp></li>
+ <li>30: <samp>CAP_802_15_4_868MHZ_ASK</samp></li>
+ <li>48: <samp>CAP_ROLE_ROUTER</samp></li>
+ <li>49: <samp>CAP_ROLE_SLEEPY</samp></li>
+ <li>52: <samp>CAP_NET_THREAD_1_0</samp></li>
+ <li>512: <samp>CAP_MAC_WHITELIST</samp></li>
+ <li>513: <samp>CAP_MAC_RAW</samp></li>
+ <li>514: <samp>CAP_OOB_STEERING_DATA</samp></li>
+ <li>1024: <samp>CAP_THREAD_COMMISSIONER</samp></li>
+ <li>1025: <samp>CAP_THREAD_TMF_PROXY</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.5.6.p.6">Additionally, future capability allocations SHALL be made from the following allocation plan: </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Capability Range</th>
+ <th class="center">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">0 - 127</td>
+ <td class="center">Reserved for core capabilities</td>
+ </tr>
+ <tr>
+ <td class="center">128 - 15,359</td>
+ <td class="center">
+ <em>UNALLOCATED</em>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">15,360 - 16,383</td>
+ <td class="center">Vendor-specific</td>
+ </tr>
+ <tr>
+ <td class="center">16,384 - 1,999,999</td>
+ <td class="center">
+ <em>UNALLOCATED</em>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">2,000,000 - 2,097,151</td>
+ <td class="center">Experimental use only</td>
+ </tr>
+ </tbody>
+</table>
+<h1 id="rfc.section.5.5.7"><a href="#rfc.section.5.5.7">5.5.7.</a> <a href="#prop-interface-count" id="prop-interface-count">PROP 6: PROP_INTERFACE_COUNT</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">
+ <samp>INTERFACE_COUNT</samp>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.7.p.2">Describes the number of concurrent interfaces supported by this NCP. Since the concurrent interface mechanism is still TBD, this value MUST always be one. </p>
+<p id="rfc.section.5.5.7.p.3">This value is encoded as an unsigned 8-bit integer. </p>
+<p id="rfc.section.5.5.7.p.4">The host MUST only use this property from NLI 0. Behavior when used from other NLIs is undefined. </p>
+<h1 id="rfc.section.5.5.8"><a href="#rfc.section.5.5.8">5.5.8.</a> <a href="#prop-power-state" id="prop-power-state">PROP 7: PROP_POWER_STATE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">POWER_STATE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.8.p.2">Describes the current power state of the NCP. By writing to this property you can manage the lower state of the NCP. Enumeration is encoded as a single unsigned byte. </p>
+<p id="rfc.section.5.5.8.p.3">Defined values are: </p>
+<p/>
+
+<ul>
+ <li>0: <samp>POWER_STATE_OFFLINE</samp>: NCP is physically powered off. (Enumerated for completeness sake, not expected on the wire)</li>
+ <li>1: <samp>POWER_STATE_DEEP_SLEEP</samp>: Almost everything on the NCP is shut down, but can still be resumed via a command or interrupt.</li>
+ <li>2: <samp>POWER_STATE_STANDBY</samp>: NCP is in the lowest power state that can still be awoken by an event from the radio (e.g. waiting for alarm)</li>
+ <li>3: <samp>POWER_STATE_LOW_POWER</samp>: NCP is responsive (and possibly connected), but using less power. (e.g. "Sleepy" child node)</li>
+ <li>4: <samp>POWER_STATE_ONLINE</samp>: NCP is fully powered. (e.g. "Parent" node)</li>
+</ul>
+
+<p> </p>
+<p>
+ <a id="CREF2" class="info">[CREF2]<span class="info">RQ: We should consider reversing the numbering here so that 0 is `POWER_STATE_ONLINE`. We may also want to include some extra values between the defined values for future expansion, so that we can preserve the ordered relationship. --</span></a>
+</p>
+<h1 id="rfc.section.5.5.9"><a href="#rfc.section.5.5.9">5.5.9.</a> <a href="#prop-hwaddr" id="prop-hwaddr">PROP 8: PROP_HWADDR</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only*</li>
+ <li>Packed-Encoding: <samp>E</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">8</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HWADDR</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.9.p.2">The static EUI64 address of the device, used as a serial number. This value is read-only, but may be writable under certain vendor-defined circumstances. </p>
+<h1 id="rfc.section.5.5.10"><a href="#rfc.section.5.5.10">5.5.10.</a> <a href="#prop-lock" id="prop-lock">PROP 9: PROP_LOCK</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">LOCK</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.10.p.2">Property lock. Used for grouping changes to several properties to take effect at once, or to temporarily prevent the automatic updating of property values. When this property is set, the execution of the NCP is effectively frozen until it is cleared. </p>
+<p id="rfc.section.5.5.10.p.3">This property is only supported if the <samp>CAP_LOCK</samp> capability is present. </p>
+<p id="rfc.section.5.5.10.p.4">Unlike most other properties, setting this property to true when the value of the property is already true MUST fail with a last status of <samp>STATUS_ALREADY</samp>. </p>
+<h1 id="rfc.section.5.5.11"><a href="#rfc.section.5.5.11">5.5.11.</a> <a href="#prop-host-power-state" id="prop-host-power-state">PROP 10: PROP_HOST_POWER_STATE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+ <li>Default value: 4</li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">
+ <samp>HOST_POWER_STATE</samp>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.5.11.p.2">Describes the current power state of the <em>host</em>. This property is used by the host to inform the NCP when it has changed power states. The NCP can then use this state to determine which properties need asynchronous updates. Enumeration is encoded as a single unsigned byte. These states are defined in similar terms to <samp>PROP_POWER_STATE</samp> (<a href="#prop-power-state">Section 5.5.8</a>). </p>
+<p id="rfc.section.5.5.11.p.3">Defined values are: </p>
+<p/>
+
+<ul>
+ <li>0: <samp>HOST_POWER_STATE_OFFLINE</samp>: Host is physically powered off and cannot be woken by the NCP. All asynchronous commands are squelched.</li>
+ <li>1: <samp>HOST_POWER_STATE_DEEP_SLEEP</samp>: The host is in a low power state where it can be woken by the NCP but will potentially require more than two seconds to become fully responsive. The NCP MUST avoid sending unnecessary property updates, such as child table updates or non-critical messages on the debug stream. If the NCP needs to wake the host for traffic, the NCP MUST first take action to wake the host. Once the NCP signals to the host that it should wake up, the NCP MUST wait for some activity from the host (indicating that it is fully awake) before sending frames.</li>
+ <li>2: <strong>RESERVED</strong>. This value MUST NOT be set by the host. If received by the NCP, the NCP SHOULD consider this as a synonym of <samp>HOST_POWER_STATE_DEEP_SLEEP</samp>.</li>
+ <li>3: <samp>HOST_POWER_STATE_LOW_POWER</samp>: The host is in a low power state where it can be immediately woken by the NCP. The NCP SHOULD avoid sending unnecessary property updates, such as child table updates or non-critical messages on the debug stream.</li>
+ <li>4: <samp>HOST_POWER_STATE_ONLINE</samp>: The host is awake and responsive. No special filtering is performed by the NCP on asynchronous updates.</li>
+ <li>All other values are <strong>RESERVED</strong>. They MUST NOT be set by the host. If received by the NCP, the NCP SHOULD consider the value as a synonym of <samp>HOST_POWER_STATE_LOW_POWER</samp>.</li>
+</ul>
+
+<p> </p>
+<p>
+ <a id="CREF3" class="info">[CREF3]<span class="info">RQ: We should consider reversing the numbering here so that 0 is `POWER_STATE_ONLINE`. We may also want to include some extra values between the defined values for future expansion, so that we can preserve the ordered relationship. --</span></a>
+</p>
+<p id="rfc.section.5.5.11.p.6">After setting this power state, any further commands from the host to the NCP will cause <samp>HOST_POWER_STATE</samp> to automatically revert to <samp>HOST_POWER_STATE_ONLINE</samp>. </p>
+<p id="rfc.section.5.5.11.p.7">When the host is entering a low-power state, it should wait for the response from the NCP acknowledging the command (with <samp>CMD_VALUE_IS</samp>). Once that acknowledgement is received the host may enter the low-power state. </p>
+<p id="rfc.section.5.5.11.p.8">If the NCP has the <samp>CAP_UNSOL_UPDATE_FILTER</samp> capability, any unsolicited property updates masked by <samp>PROP_UNSOL_UPDATE_FILTER</samp> should be honored while the host indicates it is in a low-power state. After resuming to the <samp>HOST_POWER_STATE_ONLINE</samp> state, the value of <samp>PROP_UNSOL_UPDATE_FILTER</samp> MUST be unchanged from the value assigned prior to the host indicating it was entering a low-power state. </p>
+<p id="rfc.section.5.5.11.p.9">The host MUST only use this property from NLI 0. Behavior when used from other NLIs is undefined. </p>
+<h1 id="rfc.section.5.5.12"><a href="#rfc.section.5.5.12">5.5.12.</a> <a href="#prop-unsol-update-filter" id="prop-unsol-update-filter">PROP 4104: PROP_UNSOL_UPDATE_FILTER</a></h1>
+<p/>
+
+<ul>
+ <li>Required only if <samp>CAP_UNSOL_UPDATE_FILTER</samp> is set.</li>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>A(I)</samp></li>
+ <li>Default value: Empty.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.5.12.p.2">Contains a list of properties which are <em>excluded</em> from generating unsolicited value updates. This property MUST be empty after reset. </p>
+<p id="rfc.section.5.5.12.p.3">In other words, the host may opt-out of unsolicited property updates for a specific property by adding that property id to this list. </p>
+<p id="rfc.section.5.5.12.p.4">Hosts SHOULD NOT add properties to this list which are not present in <samp>PROP_UNSOL_UPDATE_LIST</samp>. If such properties are added, the NCP MUST ignore the unsupported properties. </p>
+<p>
+ <a id="CREF4" class="info">[CREF4]<span class="info">RQ: The justification for the above behavior is to attempt to avoid possible future interop problems by explicitly making sure that unknown properties are ignored. Since unknown properties will obviously not be generating unsolicited updates, it seems fairly harmless. An implementation may print out a warning to the debug stream. Note that the error is still detectable: If you VALUE\_SET unsupported properties, the resulting VALUE\_IS would contain only the supported properties of that set(since the unsupported properties would be ignored). If an implementation cares that much about getting this right then it needs to make sure that it checks PROP\_UNSOL\_UPDATE\_LIST first. --</span></a>
+</p>
+<p id="rfc.section.5.5.12.p.6">Implementations of this property are only REQUIRED to support and use the following commands: </p>
+<p/>
+
+<ul>
+ <li><samp>CMD_PROP_VALUE_GET</samp> (<a href="#cmd-prop-value-get">Section 4.3</a>)</li>
+ <li><samp>CMD_PROP_VALUE_SET</samp> (<a href="#cmd-prop-value-set">Section 4.4</a>)</li>
+ <li><samp>CMD_PROP_VALUE_IS</samp> (<a href="#cmd-prop-value-is">Section 4.7</a>)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.5.12.p.8">Implementations of this property MAY optionally support and use the following commands: </p>
+<p/>
+
+<ul>
+ <li><samp>CMD_PROP_VALUE_INSERT</samp> (<a href="#cmd-prop-value-insert">Section 4.5</a>)</li>
+ <li><samp>CMD_PROP_VALUE_REMOVE</samp> (<a href="#cmd-prop-value-remove">Section 4.6</a>)</li>
+ <li><samp>CMD_PROP_VALUE_INSERTED</samp> (<a href="#cmd-prop-value-inserted">Section 4.8</a>)</li>
+ <li><samp>CMD_PROP_VALUE_REMOVED</samp> (<a href="#cmd-prop-value-removed">Section 4.9</a>)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.5.12.p.10">Host implementations which are aiming to maximize their compatability across different firmwre implementations SHOULD NOT assume the availability of the optional commands for this property. </p>
+<p id="rfc.section.5.5.12.p.11">The value of this property SHALL be independent for each NLI. </p>
+<h1 id="rfc.section.5.5.13"><a href="#rfc.section.5.5.13">5.5.13.</a> <a href="#prop-unsol-update-list" id="prop-unsol-update-list">PROP 4105: PROP_UNSOL_UPDATE_LIST</a></h1>
+<p/>
+
+<ul>
+ <li>Required only if <samp>CAP_UNSOL_UPDATE_FILTER</samp> is set.</li>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>A(I)</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.5.13.p.2">Contains a list of properties which are capable of generating unsolicited value updates. This list can be used when populating <samp>PROP_UNSOL_UPDATE_FILTER</samp> to disable all unsolicited property updates. </p>
+<p id="rfc.section.5.5.13.p.3">This property is intended to effectively behave as a constant for a given NCP firmware. </p>
+<p id="rfc.section.5.5.13.p.4">Note that not all properties that support unsolicited updates need to be listed here. Scan results, for example, are only generated due to direct action on the part of the host, so those properties MUST NOT not be included in this list. </p>
+<p id="rfc.section.5.5.13.p.5">The value of this property MAY be different across available NLIs. </p>
+<h1 id="rfc.section.5.6"><a href="#rfc.section.5.6">5.6.</a> <a href="#prop-stream" id="prop-stream">Stream Properties</a></h1>
+<h1 id="rfc.section.5.6.1"><a href="#rfc.section.5.6.1">5.6.1.</a> <a href="#prop-stream-debug" id="prop-stream-debug">PROP 112: PROP_STREAM_DEBUG</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only-Stream</li>
+ <li>Packed-Encoding: <samp>D</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">UTF8_DATA</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.6.1.p.2">This property is a streaming property, meaning that you cannot explicitly fetch the value of this property. The stream provides human-readable debugging output which may be displayed in the host logs. </p>
+<p id="rfc.section.5.6.1.p.3">The location of newline characters is not assumed by the host: it is the NCP's responsibility to insert newline characters where needed, just like with any other text stream. </p>
+<p id="rfc.section.5.6.1.p.4">To receive the debugging stream, you wait for <samp>CMD_PROP_VALUE_IS</samp> commands for this property from the NCP. </p>
+<h1 id="rfc.section.5.6.2"><a href="#rfc.section.5.6.2">5.6.2.</a> <a href="#prop-stream-raw" id="prop-stream-raw">PROP 113: PROP_STREAM_RAW</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write-Stream</li>
+ <li>Packed-Encoding: <samp>dD</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">2</th>
+ <th class="center">n</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">FRAME_DATA_LEN</td>
+ <td class="center">FRAME_DATA</td>
+ <td class="center">FRAME_METADATA</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.6.2.p.2">This stream provides the capability of sending and receiving raw packets to and from the radio. The exact format of the frame metadata and data is dependent on the MAC and PHY being used. </p>
+<p id="rfc.section.5.6.2.p.3">This property is a streaming property, meaning that you cannot explicitly fetch the value of this property. To receive traffic, you wait for <samp>CMD_PROP_VALUE_IS</samp> commands with this property id from the NCP. </p>
+<p id="rfc.section.5.6.2.p.4">Implementations may OPTIONALLY support the ability to transmit arbitrary raw packets. Support for this feature is indicated by the presence of the <samp>CAP_WRITABLE_RAW_STREAM</samp> capability. </p>
+<p id="rfc.section.5.6.2.p.5">If the capability <samp>CAP_WRITABLE_RAW_STREAM</samp> is set, then packets written to this stream with <samp>CMD_PROP_VALUE_SET</samp> will be sent out over the radio. This allows the caller to use the radio directly, with the stack being implemented on the host instead of the NCP. </p>
+<h1 id="rfc.section.5.6.2.1"><a href="#rfc.section.5.6.2.1">5.6.2.1.</a> <a href="#frame-metadata-format" id="frame-metadata-format">Frame Metadata Format</a></h1>
+<p id="rfc.section.5.6.2.1.p.1">Any data past the end of <samp>FRAME_DATA_LEN</samp> is considered metadata and is OPTIONAL. Frame metadata MAY be empty or partially specified. Partially specified metadata MUST be accepted. Default values are used for all unspecified fields. </p>
+<p id="rfc.section.5.6.2.1.p.2">The same general format is used for <samp>PROP_STREAM_RAW</samp>, <samp>PROP_STREAM_NET</samp>, and <samp>PROP_STREAM_NET_INSECURE</samp>. It can be used for frames sent from the NCP to the host as well as frames sent from the host to the NCP. </p>
+<p id="rfc.section.5.6.2.1.p.3">The frame metadata field consists of the following fields: </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="left">Field</th>
+ <th class="left">Description</th>
+ <th class="left">Type</th>
+ <th class="center">Len</th>
+ <th class="center">Default</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="left">MD_POWER</td>
+ <td class="left">(dBm) RSSI/TX-Power</td>
+ <td class="left"><samp>c</samp> int8</td>
+ <td class="center">1</td>
+ <td class="center">-128</td>
+ </tr>
+ <tr>
+ <td class="left">MD_NOISE</td>
+ <td class="left">(dBm) Noise floor</td>
+ <td class="left"><samp>c</samp> int8</td>
+ <td class="center">1</td>
+ <td class="center">-128</td>
+ </tr>
+ <tr>
+ <td class="left">MD_FLAG</td>
+ <td class="left">Flags (defined below)</td>
+ <td class="left"><samp>S</samp> uint16</td>
+ <td class="center">2</td>
+ <td class="center"/>
+ </tr>
+ <tr>
+ <td class="left">MD_PHY</td>
+ <td class="left">PHY-specific data</td>
+ <td class="left"><samp>d</samp> data</td>
+ <td class="center">>=2</td>
+ <td class="center"/>
+ </tr>
+ <tr>
+ <td class="left">MD_VEND</td>
+ <td class="left">Vendor-specific data</td>
+ <td class="left"><samp>d</samp> data</td>
+ <td class="center">>=2</td>
+ <td class="center"/>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.6.2.1.p.4">The following fields are ignored by the NCP for packets sent to it from the host: </p>
+<p/>
+
+<ul>
+ <li>MD_NOISE</li>
+ <li>MD_FLAG</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.6.2.1.p.6">When specifying <samp>MD_POWER</samp> for a packet to be transmitted, the actual transmit power is never larger than the current value of <samp>PROP_PHY_TX_POWER</samp> (<a href="#prop-phy-tx-power">Section 5.7.6</a>). When left unspecified (or set to the value -128), an appropriate transmit power will be chosen by the NCP. </p>
+<p id="rfc.section.5.6.2.1.p.7">The bit values in <samp>MD_FLAG</samp> are defined as follows: </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Bit</th>
+ <th class="center">Mask</th>
+ <th class="left">Name</th>
+ <th class="left">Description if set</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">15</td>
+ <td class="center">0x0001</td>
+ <td class="left">MD_FLAG_TX</td>
+ <td class="left">Packet was transmitted, not received.</td>
+ </tr>
+ <tr>
+ <td class="center">13</td>
+ <td class="center">0x0004</td>
+ <td class="left">MD_FLAG_BAD_FCS</td>
+ <td class="left">Packet was received with bad FCS</td>
+ </tr>
+ <tr>
+ <td class="center">12</td>
+ <td class="center">0x0008</td>
+ <td class="left">MD_FLAG_DUPE</td>
+ <td class="left">Packet seems to be a duplicate</td>
+ </tr>
+ <tr>
+ <td class="center">0-11, 14</td>
+ <td class="center">0xFFF2</td>
+ <td class="left">MD_FLAG_RESERVED</td>
+ <td class="left">Flags reserved for future use.</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.6.2.1.p.8">The format of <samp>MD_PHY</samp> is specified by the PHY layer currently in use, and may contain information such as the channel, LQI, antenna, or other pertainent information. </p>
+<h1 id="rfc.section.5.6.3"><a href="#rfc.section.5.6.3">5.6.3.</a> <a href="#prop-stream-net" id="prop-stream-net">PROP 114: PROP_STREAM_NET</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write-Stream</li>
+ <li>Packed-Encoding: <samp>dD</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">2</th>
+ <th class="center">n</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">FRAME_DATA_LEN</td>
+ <td class="center">FRAME_DATA</td>
+ <td class="center">FRAME_METADATA</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.6.3.p.2">This stream provides the capability of sending and receiving data packets to and from the currently attached network. The exact format of the frame metadata and data is dependent on the network protocol being used. </p>
+<p id="rfc.section.5.6.3.p.3">This property is a streaming property, meaning that you cannot explicitly fetch the value of this property. To receive traffic, you wait for <samp>CMD_PROP_VALUE_IS</samp> commands with this property id from the NCP. </p>
+<p id="rfc.section.5.6.3.p.4">To send network packets, you call <samp>CMD_PROP_VALUE_SET</samp> on this property with the value of the packet. </p>
+<p id="rfc.section.5.6.3.p.5">Any data past the end of <samp>FRAME_DATA_LEN</samp> is considered metadata, the format of which is described in <a href="#frame-metadata-format">Section 5.6.2.1</a>. </p>
+<h1 id="rfc.section.5.6.4"><a href="#rfc.section.5.6.4">5.6.4.</a> <a href="#prop-stream-net-insecure" id="prop-stream-net-insecure">PROP 115: PROP_STREAM_NET_INSECURE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write-Stream</li>
+ <li>Packed-Encoding: <samp>dD</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">2</th>
+ <th class="center">n</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">FRAME_DATA_LEN</td>
+ <td class="center">FRAME_DATA</td>
+ <td class="center">FRAME_METADATA</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.6.4.p.2">This stream provides the capability of sending and receiving unencrypted and unauthenticated data packets to and from nearby devices for the purposes of device commissioning. The exact format of the frame metadata and data is dependent on the network protocol being used. </p>
+<p id="rfc.section.5.6.4.p.3">This property is a streaming property, meaning that you cannot explicitly fetch the value of this property. To receive traffic, you wait for <samp>CMD_PROP_VALUE_IS</samp> commands with this property id from the NCP. </p>
+<p id="rfc.section.5.6.4.p.4">To send network packets, you call <samp>CMD_PROP_VALUE_SET</samp> on this property with the value of the packet. </p>
+<p id="rfc.section.5.6.4.p.5">Any data past the end of <samp>FRAME_DATA_LEN</samp> is considered metadata, the format of which is described in <a href="#frame-metadata-format">Section 5.6.2.1</a>. </p>
+<h1 id="rfc.section.5.7"><a href="#rfc.section.5.7">5.7.</a> <a href="#prop-phy" id="prop-phy">PHY Properties</a></h1>
+<h1 id="rfc.section.5.7.1"><a href="#rfc.section.5.7.1">5.7.1.</a> <a href="#prop-phy-enabled" id="prop-phy-enabled">PROP 32: PROP_PHY_ENABLED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp> (bool8)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.7.1.p.2">Set to 1 if the PHY is enabled, set to 0 otherwise. May be directly enabled to bypass higher-level packet processing in order to implement things like packet sniffers. This property can only be written if the <samp>SPINEL_CAP_MAC_RAW</samp> capability is present. </p>
+<h1 id="rfc.section.5.7.2"><a href="#rfc.section.5.7.2">5.7.2.</a> <a href="#prop-phy-chan" id="prop-phy-chan">PROP 33: PROP_PHY_CHAN</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp> (uint8)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.7.2.p.2">Value is the current channel. Must be set to one of the values contained in <samp>PROP_PHY_CHAN_SUPPORTED</samp>. </p>
+<h1 id="rfc.section.5.7.3"><a href="#rfc.section.5.7.3">5.7.3.</a> <a href="#prop-phy-chan-supported" id="prop-phy-chan-supported">PROP 34: PROP_PHY_CHAN_SUPPORTED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>A(C)</samp> (array of uint8)</li>
+ <li>Unit: List of channels</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.7.3.p.2">Value is a list of channel values that are supported by the hardware. </p>
+<h1 id="rfc.section.5.7.4"><a href="#rfc.section.5.7.4">5.7.4.</a> <a href="#prop-phy-freq" id="prop-phy-freq">PROP 35: PROP_PHY_FREQ</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>L</samp> (uint32)</li>
+ <li>Unit: Kilohertz</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.7.4.p.2">Value is the radio frequency (in kilohertz) of the current channel. </p>
+<h1 id="rfc.section.5.7.5"><a href="#rfc.section.5.7.5">5.7.5.</a> <a href="#prop-phy-cca-threshold" id="prop-phy-cca-threshold">PROP 36: PROP_PHY_CCA_THRESHOLD</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>c</samp> (int8)</li>
+ <li>Unit: dBm</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.7.5.p.2">Value is the CCA (clear-channel assessment) threshold. Set to -128 to disable. </p>
+<p id="rfc.section.5.7.5.p.3">When setting, the value will be rounded down to a value that is supported by the underlying radio hardware. </p>
+<h1 id="rfc.section.5.7.6"><a href="#rfc.section.5.7.6">5.7.6.</a> <a href="#prop-phy-tx-power" id="prop-phy-tx-power">PROP 37: PROP_PHY_TX_POWER</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>c</samp> (int8)</li>
+ <li>Unit: dBm</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.7.6.p.2">Value is the transmit power of the radio. </p>
+<p id="rfc.section.5.7.6.p.3">When setting, the value will be rounded down to a value that is supported by the underlying radio hardware. </p>
+<h1 id="rfc.section.5.7.7"><a href="#rfc.section.5.7.7">5.7.7.</a> <a href="#prop-phy-rssi" id="prop-phy-rssi">PROP 38: PROP_PHY_RSSI</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>c</samp> (int8)</li>
+ <li>Unit: dBm</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.7.7.p.2">Value is the current RSSI (Received signal strength indication) from the radio. This value can be used in energy scans and for determining the ambient noise floor for the operating environment. </p>
+<h1 id="rfc.section.5.7.8"><a href="#rfc.section.5.7.8">5.7.8.</a> <a href="#prop-phy-rx-sensitivity" id="prop-phy-rx-sensitivity">PROP 39: PROP_PHY_RX_SENSITIVITY</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>c</samp> (int8)</li>
+ <li>Unit: dBm</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.7.8.p.2">Value is the radio receive sensitivity. This value can be used as lower bound noise floor for link metrics computation. </p>
+<h1 id="rfc.section.5.8"><a href="#rfc.section.5.8">5.8.</a> <a href="#prop-mac" id="prop-mac">MAC Properties</a></h1>
+<h1 id="rfc.section.5.8.1"><a href="#rfc.section.5.8.1">5.8.1.</a> <a href="#prop-mac-scan-state" id="prop-mac-scan-state">PROP 48: PROP_MAC_SCAN_STATE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+ <li>Unit: Enumeration</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.1.p.2">Possible Values: </p>
+<p/>
+
+<ul>
+ <li>0: <samp>SCAN_STATE_IDLE</samp></li>
+ <li>1: <samp>SCAN_STATE_BEACON</samp></li>
+ <li>2: <samp>SCAN_STATE_ENERGY</samp></li>
+ <li>3: <samp>SCAN_STATE_DISCOVER</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.1.p.4">Set to <samp>SCAN_STATE_BEACON</samp> to start an active scan. Beacons will be emitted from <samp>PROP_MAC_SCAN_BEACON</samp>. </p>
+<p id="rfc.section.5.8.1.p.5">Set to <samp>SCAN_STATE_ENERGY</samp> to start an energy scan. Channel energy result will be reported by emissions of <samp>PROP_MAC_ENERGY_SCAN_RESULT</samp> (per channel). </p>
+<p id="rfc.section.5.8.1.p.6">Set to <samp>SCAN_STATE_DISOVER</samp> to start a Thread MLE discovery scan operation. Discovery scan result will be emitted from <samp>PROP_MAC_SCAN_BEACON</samp>. </p>
+<p id="rfc.section.5.8.1.p.7">Value switches to <samp>SCAN_STATE_IDLE</samp> when scan is complete. </p>
+<h1 id="rfc.section.5.8.2"><a href="#rfc.section.5.8.2">5.8.2.</a> <a href="#prop-mac-scan-mask" id="prop-mac-scan-mask">PROP 49: PROP_MAC_SCAN_MASK</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>A(C)</samp></li>
+ <li>Unit: List of channels to scan</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.8.3"><a href="#rfc.section.5.8.3">5.8.3.</a> <a href="#prop-mac-scan-period" id="prop-mac-scan-period">PROP 50: PROP_MAC_SCAN_PERIOD</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>S</samp> (uint16)</li>
+ <li>Unit: milliseconds per channel</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.8.4"><a href="#rfc.section.5.8.4">5.8.4.</a> <a href="#prop-mac-scan-beacon" id="prop-mac-scan-beacon">PROP 51: PROP_MAC_SCAN_BEACON</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only-Stream</li>
+ <li>Packed-Encoding: <samp>Ccdd</samp> (or <samp>Cct(ESSc)t(iCUdd)</samp>)</li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ <th class="center">2</th>
+ <th class="center">n</th>
+ <th class="center">2</th>
+ <th class="center">n</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">CH</td>
+ <td class="center">RSSI</td>
+ <td class="center">MAC_LEN</td>
+ <td class="center">MAC_DATA</td>
+ <td class="center">NET_LEN</td>
+ <td class="center">NET_DATA</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.8.4.p.2">Scan beacons have two embedded structures which contain information about the MAC layer and the NET layer. Their format depends on the MAC and NET layer currently in use. The format below is for an 802.15.4 MAC with Thread: </p>
+<p/>
+
+<ul>
+ <li><samp>C</samp>: Channel</li>
+ <li><samp>c</samp>: RSSI of the beacon</li>
+ <li><samp>t</samp>: MAC layer properties (802.15.4 layer shown below for convenience) <ul><li><samp>E</samp>: Long address</li><li><samp>S</samp>: Short address</li><li><samp>S</samp>: PAN-ID</li><li><samp>c</samp>: LQI</li></ul></li>
+ <li>NET layer properties (Standard net layer shown below for convenience) <ul><li><samp>i</samp>: Protocol Number</li><li><samp>C</samp>: Flags</li><li><samp>U</samp>: Network Name</li><li><samp>d</samp>: XPANID</li><li><samp>d</samp>: Steering data</li></ul></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.4.p.4">Extra parameters may be added to each of the structures in the future, so care should be taken to read the length that prepends each structure. </p>
+<h1 id="rfc.section.5.8.5"><a href="#rfc.section.5.8.5">5.8.5.</a> <a href="#prop-mac-15-4-laddr" id="prop-mac-15-4-laddr">PROP 52: PROP_MAC_15_4_LADDR</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>E</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.5.p.2">The 802.15.4 long address of this node. </p>
+<p id="rfc.section.5.8.5.p.3">This property is only present on NCPs which implement 802.15.4 </p>
+<h1 id="rfc.section.5.8.6"><a href="#rfc.section.5.8.6">5.8.6.</a> <a href="#prop-mac-15-4-saddr" id="prop-mac-15-4-saddr">PROP 53: PROP_MAC_15_4_SADDR</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>S</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.6.p.2">The 802.15.4 short address of this node. </p>
+<p id="rfc.section.5.8.6.p.3">This property is only present on NCPs which implement 802.15.4 </p>
+<h1 id="rfc.section.5.8.7"><a href="#rfc.section.5.8.7">5.8.7.</a> <a href="#prop-mac-15-4-panid" id="prop-mac-15-4-panid">PROP 54: PROP_MAC_15_4_PANID</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>S</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.7.p.2">The 802.15.4 PANID this node is associated with. </p>
+<p id="rfc.section.5.8.7.p.3">This property is only present on NCPs which implement 802.15.4 </p>
+<h1 id="rfc.section.5.8.8"><a href="#rfc.section.5.8.8">5.8.8.</a> <a href="#prop-mac-raw-stream-enabled" id="prop-mac-raw-stream-enabled">PROP 55: PROP_MAC_RAW_STREAM_ENABLED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.8.p.2">Set to true to enable raw MAC frames to be emitted from <samp>PROP_STREAM_RAW</samp>. See <a href="#prop-stream-raw">Section 5.6.2</a>. </p>
+<h1 id="rfc.section.5.8.9"><a href="#rfc.section.5.8.9">5.8.9.</a> <a href="#prop-mac-promiscuous-mode" id="prop-mac-promiscuous-mode">PROP 56: PROP_MAC_PROMISCUOUS_MODE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.9.p.2">Possible Values: </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Id</th>
+ <th class="center">Name</th>
+ <th class="center">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">0</td>
+ <td class="center">
+ <samp>MAC_PROMISCUOUS_MODE_OFF</samp>
+ </td>
+ <td class="center">Normal MAC filtering is in place.</td>
+ </tr>
+ <tr>
+ <td class="center">1</td>
+ <td class="center">
+ <samp>MAC_PROMISCUOUS_MODE_NETWORK</samp>
+ </td>
+ <td class="center">All MAC packets matching network are passed up the stack.</td>
+ </tr>
+ <tr>
+ <td class="center">2</td>
+ <td class="center">
+ <samp>MAC_PROMISCUOUS_MODE_FULL</samp>
+ </td>
+ <td class="center">All decoded MAC packets are passed up the stack.</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.5.8.9.p.3">See <a href="#prop-stream-raw">Section 5.6.2</a>. </p>
+<h1 id="rfc.section.5.8.10"><a href="#rfc.section.5.8.10">5.8.10.</a> <a href="#prop-mac-escan-result" id="prop-mac-escan-result">PROP 57: PROP_MAC_ENERGY_SCAN_RESULT</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only-Stream</li>
+ <li>Packed-Encoding: <samp>Cc</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.10.p.2">This property is emitted during energy scan operation per scanned channel with following format: </p>
+<p/>
+
+<ul>
+ <li><samp>C</samp>: Channel</li>
+ <li><samp>c</samp>: RSSI (in dBm)</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.8.11"><a href="#rfc.section.5.8.11">5.8.11.</a> <a href="#prop-mac-whitelist" id="prop-mac-whitelist">PROP 4864: PROP_MAC_WHITELIST</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>A(T(Ec))</samp></li>
+ <li>Required capability: <samp>CAP_MAC_WHITELIST</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.11.p.2">Structure Parameters: </p>
+<p/>
+
+<ul>
+ <li><samp>E</samp>: EUI64 address of node</li>
+ <li><samp>c</samp>: Optional RSSI-override value. The value 127 indicates that the RSSI-override feature is not enabled for this address. If this value is omitted when setting or inserting, it is assumed to be 127. This parameter is ignored when removing.</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.8.12"><a href="#rfc.section.5.8.12">5.8.12.</a> <a href="#prop-mac-whitelist-enabled" id="prop-mac-whitelist-enabled">PROP 4865: PROP_MAC_WHITELIST_ENABLED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+ <li>Required capability: <samp>CAP_MAC_WHITELIST</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.8.13"><a href="#rfc.section.5.8.13">5.8.13.</a> <a href="#prop-mac-src-match-enabled" id="prop-mac-src-match-enabled">PROP 4867: SPINEL_PROP_MAC_SRC_MATCH_ENABLED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.13.p.2">Set to true to enable radio source matching or false to disable it. This property is only available if the <samp>SPINEL_CAP_MAC_RAW</samp> capability is present. The source match functionality is used by radios when generating ACKs. The short and extended address lists are used for settings the Frame Pending bit in the ACKs. </p>
+<h1 id="rfc.section.5.8.14"><a href="#rfc.section.5.8.14">5.8.14.</a> <a href="#prop-mac-src-match-short-addresses" id="prop-mac-src-match-short-addresses">PROP 4868: SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Write</li>
+ <li>Packed-Encoding: <samp>A(S)</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.14.p.2">Configures the list of short addresses used for source matching. This property is only available if the <samp>SPINEL_CAP_MAC_RAW</samp> capability is present. </p>
+<p id="rfc.section.5.8.14.p.3">Structure Parameters: </p>
+<p/>
+
+<ul>
+ <li><samp>S</samp>: Short address for hardware generated ACKs</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.8.15"><a href="#rfc.section.5.8.15">5.8.15.</a> <a href="#prop-mac-src-match-extended-addresses" id="prop-mac-src-match-extended-addresses">PROP 4869: SPINEL_PROP_MAC_SRC_MATCH_EXTENDED_ADDRESSES</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Write</li>
+ <li>Packed-Encoding: <samp>A(E)</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.15.p.2">Configures the list of extended addresses used for source matching. This property is only available if the <samp>SPINEL_CAP_MAC_RAW</samp> capability is present. </p>
+<p id="rfc.section.5.8.15.p.3">Structure Parameters: </p>
+<p/>
+
+<ul>
+ <li><samp>E</samp>: EUI64 address for hardware generated ACKs</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.8.16"><a href="#rfc.section.5.8.16">5.8.16.</a> <a href="#prop-mac-blacklist" id="prop-mac-blacklist">PROP 4870: PROP_MAC_BLACKLIST</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>A(T(E))</samp></li>
+ <li>Required capability: <samp>CAP_MAC_WHITELIST</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.8.16.p.2">Structure Parameters: </p>
+<p/>
+
+<ul>
+ <li><samp>E</samp>: EUI64 address of node</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.8.17"><a href="#rfc.section.5.8.17">5.8.17.</a> <a href="#prop-mac-blacklist-enabled" id="prop-mac-blacklist-enabled">PROP 4871: PROP_MAC_BLACKLIST_ENABLED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+ <li>Required capability: <samp>CAP_MAC_WHITELIST</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.9"><a href="#rfc.section.5.9">5.9.</a> <a href="#prop-net" id="prop-net">NET Properties</a></h1>
+<h1 id="rfc.section.5.9.1"><a href="#rfc.section.5.9.1">5.9.1.</a> <a href="#prop-net-saved" id="prop-net-saved">PROP 64: PROP_NET_SAVED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.9.1.p.2">Returns true if there is a network state stored/saved. </p>
+<h1 id="rfc.section.5.9.2"><a href="#rfc.section.5.9.2">5.9.2.</a> <a href="#prop-net-if-up" id="prop-net-if-up">PROP 65: PROP_NET_IF_UP</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.9.2.p.2">Network interface up/down status. Non-zero (set to 1) indicates up, zero indicates down. </p>
+<h1 id="rfc.section.5.9.3"><a href="#rfc.section.5.9.3">5.9.3.</a> <a href="#prop-net-stack-up" id="prop-net-stack-up">PROP 66: PROP_NET_STACK_UP</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+ <li>Unit: Enumeration</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.9.3.p.2">Thread stack operational status. Non-zero (set to 1) indicates up, zero indicates down. </p>
+<h1 id="rfc.section.5.9.4"><a href="#rfc.section.5.9.4">5.9.4.</a> <a href="#prop-net-role" id="prop-net-role">PROP 67: PROP_NET_ROLE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+ <li>Unit: Enumeration</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.9.4.p.2">Values: </p>
+<p/>
+
+<ul>
+ <li>0: <samp>NET_ROLE_DETACHED</samp></li>
+ <li>1: <samp>NET_ROLE_CHILD</samp></li>
+ <li>2: <samp>NET_ROLE_ROUTER</samp></li>
+ <li>3: <samp>NET_ROLE_LEADER</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.9.5"><a href="#rfc.section.5.9.5">5.9.5.</a> <a href="#prop-net-network-name" id="prop-net-network-name">PROP 68: PROP_NET_NETWORK_NAME</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>U</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.9.6"><a href="#rfc.section.5.9.6">5.9.6.</a> <a href="#prop-net-xpanid" id="prop-net-xpanid">PROP 69: PROP_NET_XPANID</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>D</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.9.7"><a href="#rfc.section.5.9.7">5.9.7.</a> <a href="#prop-net-master-key" id="prop-net-master-key">PROP 70: PROP_NET_MASTER_KEY</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>D</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.9.8"><a href="#rfc.section.5.9.8">5.9.8.</a> <a href="#prop-net-key-sequence-counter" id="prop-net-key-sequence-counter">PROP 71: PROP_NET_KEY_SEQUENCE_COUNTER</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>L</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.9.9"><a href="#rfc.section.5.9.9">5.9.9.</a> <a href="#prop-net-partition-id" id="prop-net-partition-id">PROP 72: PROP_NET_PARTITION_ID</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>L</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.9.9.p.2">The partition ID of the partition that this node is a member of. </p>
+<h1 id="rfc.section.5.9.10"><a href="#rfc.section.5.9.10">5.9.10.</a> <a href="#prop-net-require-join-existing" id="prop-net-require-join-existing">PROP 73: PROP_NET_REQUIRE_JOIN_EXISTING</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.9.11"><a href="#rfc.section.5.9.11">5.9.11.</a> <a href="#prop-net-key-swtich-guardtime" id="prop-net-key-swtich-guardtime">PROP 74: PROP_NET_KEY_SWITCH_GUARDTIME</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>L</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.9.12"><a href="#rfc.section.5.9.12">5.9.12.</a> <a href="#prop-net-pskc" id="prop-net-pskc">PROP 75: PROP_NET_PSKC</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>D</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.10"><a href="#rfc.section.5.10">5.10.</a> <a href="#prop-ipv6" id="prop-ipv6">IPv6 Properties</a></h1>
+<h1 id="rfc.section.5.10.1"><a href="#rfc.section.5.10.1">5.10.1.</a> <a href="#prop-ipv6-ll-addr" id="prop-ipv6-ll-addr">PROP 96: PROP_IPV6_LL_ADDR</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>6</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.10.1.p.2">IPv6 Address </p>
+<h1 id="rfc.section.5.10.2"><a href="#rfc.section.5.10.2">5.10.2.</a> <a href="#prop-ipv6-ml-addr" id="prop-ipv6-ml-addr">PROP 97: PROP_IPV6_ML_ADDR</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>6</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.10.2.p.2">IPv6 Address + Prefix Length </p>
+<h1 id="rfc.section.5.10.3"><a href="#rfc.section.5.10.3">5.10.3.</a> <a href="#prop-ipv6-ml-prefix" id="prop-ipv6-ml-prefix">PROP 98: PROP_IPV6_ML_PREFIX</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>6C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.10.3.p.2">IPv6 Prefix + Prefix Length </p>
+<h1 id="rfc.section.5.10.4"><a href="#rfc.section.5.10.4">5.10.4.</a> <a href="#prop-ipv6-address-table" id="prop-ipv6-address-table">PROP 99: PROP_IPV6_ADDRESS_TABLE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>A(t(6CLLC))</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.10.4.p.2">Array of structures containing: </p>
+<p/>
+
+<ul>
+ <li><samp>6</samp>: IPv6 Address</li>
+ <li><samp>C</samp>: Network Prefix Length</li>
+ <li><samp>L</samp>: Valid Lifetime</li>
+ <li><samp>L</samp>: Preferred Lifetime</li>
+ <li><samp>C</samp>: Flags</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.5.10.5"><a href="#rfc.section.5.10.5">5.10.5.</a> <a href="#prop-101-propipv6icmppingoffload" id="prop-101-propipv6icmppingoffload">PROP 101: PROP_IPv6_ICMP_PING_OFFLOAD</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.10.5.p.2">Allow the NCP to directly respond to ICMP ping requests. If this is turned on, ping request ICMP packets will not be passed to the host. </p>
+<p id="rfc.section.5.10.5.p.3">Default value is <samp>false</samp>. </p>
+<h1 id="rfc.section.5.11"><a href="#rfc.section.5.11">5.11.</a> <a href="#prop-debug" id="prop-debug">Debug Properties</a></h1>
+<h1 id="rfc.section.5.11.1"><a href="#rfc.section.5.11.1">5.11.1.</a> <a href="#prop-debug-test-assert" id="prop-debug-test-assert">PROP 16384: PROP_DEBUG_TEST_ASSERT</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.11.1.p.2">Reading this property will cause an assert on the NCP. This is intended for testing the assert functionality of underlying platform/NCP. Assert should ideally cause the NCP to reset, but if <samp>assert</samp> is not supported or disabled boolean value of <samp>false</samp> is returned in response. </p>
+<h1 id="rfc.section.5.11.2"><a href="#rfc.section.5.11.2">5.11.2.</a> <a href="#prop-debug-ncp-log-level" id="prop-debug-ncp-log-level">PROP 16385: PROP_DEBUG_NCP_LOG_LEVEL</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.11.2.p.2">Provides access to the NCP log level. Currently defined values are (which follows the RFC 5424): </p>
+<p/>
+
+<ul>
+ <li>0: Emergency (emerg).</li>
+ <li>1: Alert (alert).</li>
+ <li>2: Critical (crit).</li>
+ <li>3: Error (err).</li>
+ <li>4: Warning (warn).</li>
+ <li>5: Notice (notice).</li>
+ <li>6: Information (info).</li>
+ <li>7: Debug (debug).</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.5.11.2.p.4">If the NCP supports dynamic log level control, setting this property changes the log level accordingly. Getting the value returns the current log level. If the dynamic log level control is not supported, setting this property returns a <samp>PROP_LAST_STATUS</samp> with <samp>STATUS_INVALID_COMMAND_FOR_PROP</samp>. </p>
+<h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a href="#status-codes" id="status-codes">Status Codes</a></h1>
+<p id="rfc.section.6.p.1">Status codes are sent from the NCP to the host via <samp>PROP_LAST_STATUS</samp> using the <samp>CMD_VALUE_IS</samp> command to indicate the return status of a previous command. As with any response, the TID field of the FLAG byte is used to correlate the response with the request. </p>
+<p id="rfc.section.6.p.2">Note that most successfully executed commands do not indicate a last status of <samp>STATUS_OK</samp>. The usual way the NCP indicates a successful command is to mirror the property change back to the host. For example, if you do a <samp>CMD_VALUE_SET</samp> on <samp>PROP_PHY_ENABLED</samp>, the NCP would indicate success by responding with a <samp>CMD_VALUE_IS</samp> for <samp>PROP_PHY_ENABLED</samp>. If the command failed, <samp>PROP_LAST_STATUS</samp> would be emitted instead. </p>
+<p id="rfc.section.6.p.3">See <a href="#prop-last-status">Section 5.5.1</a> for more information on <samp>PROP_LAST_STATUS</samp>. </p>
+<p/>
+
+<ul>
+ <li>0: <samp>STATUS_OK</samp>: Operation has completed successfully.</li>
+ <li>1: <samp>STATUS_FAILURE</samp>: Operation has failed for some undefined reason.</li>
+ <li>2: <samp>STATUS_UNIMPLEMENTED</samp>: The given operation has not been implemented.</li>
+ <li>3: <samp>STATUS_INVALID_ARGUMENT</samp>: An argument to the given operation is invalid.</li>
+ <li>4: <samp>STATUS_INVALID_STATE</samp> : The given operation is invalid for the current state of the device.</li>
+ <li>5: <samp>STATUS_INVALID_COMMAND</samp>: The given command is not recognized.</li>
+ <li>6: <samp>STATUS_INVALID_INTERFACE</samp>: The given Spinel interface is not supported.</li>
+ <li>7: <samp>STATUS_INTERNAL_ERROR</samp>: An internal runtime error has occurred.</li>
+ <li>8: <samp>STATUS_SECURITY_ERROR</samp>: A security or authentication error has occurred.</li>
+ <li>9: <samp>STATUS_PARSE_ERROR</samp>: An error has occurred while parsing the command.</li>
+ <li>10: <samp>STATUS_IN_PROGRESS</samp>: The operation is in progress and will be completed asynchronously.</li>
+ <li>11: <samp>STATUS_NOMEM</samp>: The operation has been prevented due to memory pressure.</li>
+ <li>12: <samp>STATUS_BUSY</samp>: The device is currently performing a mutually exclusive operation.</li>
+ <li>13: <samp>STATUS_PROP_NOT_FOUND</samp>: The given property is not recognized.</li>
+ <li>14: <samp>STATUS_PACKET_DROPPED</samp>: The packet was dropped.</li>
+ <li>15: <samp>STATUS_EMPTY</samp>: The result of the operation is empty.</li>
+ <li>16: <samp>STATUS_CMD_TOO_BIG</samp>: The command was too large to fit in the internal buffer.</li>
+ <li>17: <samp>STATUS_NO_ACK</samp>: The packet was not acknowledged.</li>
+ <li>18: <samp>STATUS_CCA_FAILURE</samp>: The packet was not sent due to a CCA failure.</li>
+ <li>19: <samp>STATUS_ALREADY</samp>: The operation is already in progress or the property was already set to the given value.</li>
+ <li>20: <samp>STATUS_ITEM_NOT_FOUND</samp>: The given item could not be found in the property.</li>
+ <li>21: <samp>STATUS_INVALID_COMMAND_FOR_PROP</samp>: The given command cannot be performed on this property.</li>
+ <li>22-111: RESERVED</li>
+ <li>112-127: Reset Causes <ul><li>112: <samp>STATUS_RESET_POWER_ON</samp></li><li>113: <samp>STATUS_RESET_EXTERNAL</samp></li><li>114: <samp>STATUS_RESET_SOFTWARE</samp></li><li>115: <samp>STATUS_RESET_FAULT</samp></li><li>116: <samp>STATUS_RESET_CRASH</samp></li><li>117: <samp>STATUS_RESET_ASSERT</samp></li><li>118: <samp>STATUS_RESET_OTHER</samp></li><li>119: <samp>STATUS_RESET_UNKNOWN</samp></li><li>120: <samp>STATUS_RESET_WATCHDOG</samp></li><li>121-127: RESERVED-RESET-CODES</li></ul></li>
+ <li>128 - 15,359: UNALLOCATED</li>
+ <li>15,360 - 16,383: Vendor-specific</li>
+ <li>16,384 - 1,999,999: UNALLOCATED</li>
+ <li>2,000,000 - 2,097,151: Experimental Use Only (MUST NEVER be used in production!)</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a> <a href="#tech-thread" id="tech-thread">Technology: Thread(R)</a></h1>
+<p id="rfc.section.7.p.1">This section describes all of the properties and semantics required for managing a Thread(R) NCP. </p>
+<p id="rfc.section.7.p.2">Thread(R) NCPs have the following requirements: </p>
+<p/>
+
+<ul>
+ <li>The property <samp>PROP_INTERFACE_TYPE</samp> must be 3.</li>
+ <li>The non-optional properties in the following sections MUST be implemented: CORE, PHY, MAC, NET, and IPV6.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.p.4">All serious implementations of an NCP SHOULD also support the network save feature (See <a href="#feature-network-save">Section 8</a>). </p>
+<h1 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1.</a> <a href="#thread-caps" id="thread-caps">Capabilities</a></h1>
+<p id="rfc.section.7.1.p.1">The Thread(R) technology defines the following capabilities: </p>
+<p/>
+
+<ul>
+ <li><samp>CAP_NET_THREAD_1_0</samp> - Indicates that the NCP implements v1.0 of the Thread(R) standard.</li>
+ <li><samp>CAP_NET_THREAD_1_1</samp> - Indicates that the NCP implements v1.1 of the Thread(R) standard.</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2.</a> <a href="#thread-properties" id="thread-properties">Properties</a></h1>
+<p id="rfc.section.7.2.p.1">Properties for Thread(R) are allocated out of the <samp>Tech</samp> property section (see <a href="#property-sections">Section 5.4</a>). </p>
+<h1 id="rfc.section.7.2.1"><a href="#rfc.section.7.2.1">7.2.1.</a> <a href="#prop-80-propthreadleaderaddr" id="prop-80-propthreadleaderaddr">PROP 80: PROP_THREAD_LEADER_ADDR</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>6</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.1.p.2">The IPv6 address of the leader. (Note: May change to long and short address of leader) </p>
+<h1 id="rfc.section.7.2.2"><a href="#rfc.section.7.2.2">7.2.2.</a> <a href="#prop-81-propthreadparent" id="prop-81-propthreadparent">PROP 81: PROP_THREAD_PARENT</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>ES</samp></li>
+ <li>LADDR, SADDR</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.2.p.2">The long address and short address of the parent of this node. </p>
+<h1 id="rfc.section.7.2.3"><a href="#rfc.section.7.2.3">7.2.3.</a> <a href="#prop-82-propthreadchildtable" id="prop-82-propthreadchildtable">PROP 82: PROP_THREAD_CHILD_TABLE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>A(t(ES))</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.3.p.2">Table containing the long and short addresses of all the children of this node. </p>
+<h1 id="rfc.section.7.2.4"><a href="#rfc.section.7.2.4">7.2.4.</a> <a href="#prop-83-propthreadleaderrid" id="prop-83-propthreadleaderrid">PROP 83: PROP_THREAD_LEADER_RID</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.4.p.2">The router-id of the current leader. </p>
+<h1 id="rfc.section.7.2.5"><a href="#rfc.section.7.2.5">7.2.5.</a> <a href="#prop-84-propthreadleaderweight" id="prop-84-propthreadleaderweight">PROP 84: PROP_THREAD_LEADER_WEIGHT</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.5.p.2">The leader weight of the current leader. </p>
+<h1 id="rfc.section.7.2.6"><a href="#rfc.section.7.2.6">7.2.6.</a> <a href="#prop-85-propthreadlocalleaderweight" id="prop-85-propthreadlocalleaderweight">PROP 85: PROP_THREAD_LOCAL_LEADER_WEIGHT</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.6.p.2">The leader weight for this node. </p>
+<h1 id="rfc.section.7.2.7"><a href="#rfc.section.7.2.7">7.2.7.</a> <a href="#prop-86-propthreadnetworkdata" id="prop-86-propthreadnetworkdata">PROP 86: PROP_THREAD_NETWORK_DATA</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>D</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.7.p.2">The local network data. </p>
+<h1 id="rfc.section.7.2.8"><a href="#rfc.section.7.2.8">7.2.8.</a> <a href="#prop-87-propthreadnetworkdataversion" id="prop-87-propthreadnetworkdataversion">PROP 87: PROP_THREAD_NETWORK_DATA_VERSION</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>S</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2.9"><a href="#rfc.section.7.2.9">7.2.9.</a> <a href="#prop-88-propthreadstablenetworkdata" id="prop-88-propthreadstablenetworkdata">PROP 88: PROP_THREAD_STABLE_NETWORK_DATA</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>D</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.9.p.2">The local stable network data. </p>
+<h1 id="rfc.section.7.2.10"><a href="#rfc.section.7.2.10">7.2.10.</a> <a href="#prop-89-propthreadstablenetworkdataversion" id="prop-89-propthreadstablenetworkdataversion">PROP 89: PROP_THREAD_STABLE_NETWORK_DATA_VERSION</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>S</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2.11"><a href="#rfc.section.7.2.11">7.2.11.</a> <a href="#prop-90-propthreadonmeshnets" id="prop-90-propthreadonmeshnets">PROP 90: PROP_THREAD_ON_MESH_NETS</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>A(t(6CbCb))</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.11.p.2">Data per item is: </p>
+<p/>
+
+<ul>
+ <li><samp>6</samp>: IPv6 Prefix</li>
+ <li><samp>C</samp>: Prefix length in bits</li>
+ <li><samp>b</samp>: Stable flag</li>
+ <li><samp>C</samp>: TLV flags</li>
+ <li><samp>b</samp>: "Is defined locally" flag. Set if this network was locally defined. Assumed to be true for set, insert and replace. Clear if the on mesh network was defined by another node.</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2.12"><a href="#rfc.section.7.2.12">7.2.12.</a> <a href="#prop-91-propthreadoffmeshroutes" id="prop-91-propthreadoffmeshroutes">PROP 91: PROP_THREAD_OFF_MESH_ROUTES</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>A(t(6CbCbb))</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.12.p.2">Data per item is: </p>
+<p/>
+
+<ul>
+ <li><samp>6</samp>: Route Prefix</li>
+ <li><samp>C</samp>: Prefix length in bits</li>
+ <li><samp>b</samp>: Stable flag</li>
+ <li><samp>C</samp>: Route preference flags</li>
+ <li><samp>b</samp>: "Is defined locally" flag. Set if this route info was locally defined as part of local network data. Assumed to be true for set, insert and replace. Clear if the route is part of partition's network data.</li>
+ <li><samp>b</samp>: "Next hop is this device" flag. Set if the next hop for the route is this device itself (i.e., route was added by this device) This value is ignored when adding an external route. For any added route the next hop is this device.</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2.13"><a href="#rfc.section.7.2.13">7.2.13.</a> <a href="#prop-92-propthreadassistingports" id="prop-92-propthreadassistingports">PROP 92: PROP_THREAD_ASSISTING_PORTS</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>A(S)</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2.14"><a href="#rfc.section.7.2.14">7.2.14.</a> <a href="#prop-93-propthreadallowlocalnetdatachange" id="prop-93-propthreadallowlocalnetdatachange">PROP 93: PROP_THREAD_ALLOW_LOCAL_NET_DATA_CHANGE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.14.p.2">Set to true before changing local net data. Set to false when finished. This allows changes to be aggregated into single events. </p>
+<h1 id="rfc.section.7.2.15"><a href="#rfc.section.7.2.15">7.2.15.</a> <a href="#prop-94-propthreadmode" id="prop-94-propthreadmode">PROP 94: PROP_THREAD_MODE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.15.p.2">This property contains the value of the mode TLV for this node. The meaning of the bits in this bitfield are defined by section 4.5.2 of the Thread(R) specification. </p>
+<h1 id="rfc.section.7.2.16"><a href="#rfc.section.7.2.16">7.2.16.</a> <a href="#prop-5376-propthreadchildtimeout" id="prop-5376-propthreadchildtimeout">PROP 5376: PROP_THREAD_CHILD_TIMEOUT</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>L</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.16.p.2">Used when operating in the Child role. </p>
+<h1 id="rfc.section.7.2.17"><a href="#rfc.section.7.2.17">7.2.17.</a> <a href="#prop-5377-propthreadrloc16" id="prop-5377-propthreadrloc16">PROP 5377: PROP_THREAD_RLOC16</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>S</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2.18"><a href="#rfc.section.7.2.18">7.2.18.</a> <a href="#prop-5378-propthreadrouterupgradethreshold" id="prop-5378-propthreadrouterupgradethreshold">PROP 5378: PROP_THREAD_ROUTER_UPGRADE_THRESHOLD</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2.19"><a href="#rfc.section.7.2.19">7.2.19.</a> <a href="#prop-5379-propthreadcontextreusedelay" id="prop-5379-propthreadcontextreusedelay">PROP 5379: PROP_THREAD_CONTEXT_REUSE_DELAY</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>L</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2.20"><a href="#rfc.section.7.2.20">7.2.20.</a> <a href="#prop-5380-propthreadnetworkidtimeout" id="prop-5380-propthreadnetworkidtimeout">PROP 5380: PROP_THREAD_NETWORK_ID_TIMEOUT</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.20.p.2">Allows you to get or set the Thread(R) <samp>NETWORK_ID_TIMEOUT</samp> constant, as defined by the Thread(R) specification. </p>
+<h1 id="rfc.section.7.2.21"><a href="#rfc.section.7.2.21">7.2.21.</a> <a href="#prop-5381-propthreadactiverouterids" id="prop-5381-propthreadactiverouterids">PROP 5381: PROP_THREAD_ACTIVE_ROUTER_IDS</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write/Write-Only</li>
+ <li>Packed-Encoding: <samp>A(C)</samp> (List of active thread router ids)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.21.p.2">Note that some implementations may not support <samp>CMD_GET_VALUE</samp> router ids, but may support <samp>CMD_REMOVE_VALUE</samp> when the node is a leader. </p>
+<h1 id="rfc.section.7.2.22"><a href="#rfc.section.7.2.22">7.2.22.</a> <a href="#prop-5382-propthreadrloc16debugpassthru" id="prop-5382-propthreadrloc16debugpassthru">PROP 5382: PROP_THREAD_RLOC16_DEBUG_PASSTHRU</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.22.p.2">Allow the HOST to directly observe all IPv6 packets received by the NCP, including ones sent to the RLOC16 address. </p>
+<p id="rfc.section.7.2.22.p.3">Default value is <samp>false</samp>. </p>
+<h1 id="rfc.section.7.2.23"><a href="#rfc.section.7.2.23">7.2.23.</a> <a href="#prop-5383-propthreadrouterroleenabled" id="prop-5383-propthreadrouterroleenabled">PROP 5383: PROP_THREAD_ROUTER_ROLE_ENABLED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.23.p.2">Allow the HOST to indicate whether or not the router role is enabled. If current role is a router, setting this property to <samp>false</samp> starts a re-attach process as an end-device. </p>
+<h1 id="rfc.section.7.2.24"><a href="#rfc.section.7.2.24">7.2.24.</a> <a href="#prop-5384-propthreadrouterdowngradethreshold" id="prop-5384-propthreadrouterdowngradethreshold">PROP 5384: PROP_THREAD_ROUTER_DOWNGRADE_THRESHOLD</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2.25"><a href="#rfc.section.7.2.25">7.2.25.</a> <a href="#prop-5385-propthreadrouterselectionjitter" id="prop-5385-propthreadrouterselectionjitter">PROP 5385: PROP_THREAD_ROUTER_SELECTION_JITTER</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.25.p.2">Specifies the self imposed random delay in seconds a REED waits before registering to become an Active Router. </p>
+<h1 id="rfc.section.7.2.26"><a href="#rfc.section.7.2.26">7.2.26.</a> <a href="#prop-5386-propthreadpreferredrouterid" id="prop-5386-propthreadpreferredrouterid">PROP 5386: PROP_THREAD_PREFERRED_ROUTER_ID</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Write-Only</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.26.p.2">Specifies the preferred Router Id. Upon becoming a router/leader the node attempts to use this Router Id. If the preferred Router Id is not set or if it can not be used, a randomly generated router id is picked. This property can be set only when the device role is either detached or disabled. </p>
+<h1 id="rfc.section.7.2.27"><a href="#rfc.section.7.2.27">7.2.27.</a> <a href="#prop-5387-propthreadneighbortable" id="prop-5387-propthreadneighbortable">PROP 5387: PROP_THREAD_NEIGHBOR_TABLE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>A(t(ESLCcCbLL))</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.27.p.2">Data per item is: </p>
+<p/>
+
+<ul>
+ <li><samp>E</samp>: Extended/long address</li>
+ <li><samp>S</samp>: RLOC16</li>
+ <li><samp>L</samp>: Age</li>
+ <li><samp>C</samp>: Link Quality In</li>
+ <li><samp>c</samp>: Average RSS</li>
+ <li><samp>C</samp>: Mode (bit-flags)</li>
+ <li><samp>b</samp>: <samp>true</samp> if neighbor is a child, <samp>false</samp> otherwise.</li>
+ <li><samp>L</samp>: Link Frame Counter</li>
+ <li><samp>L</samp>: MLE Frame Counter</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.7.2.28"><a href="#rfc.section.7.2.28">7.2.28.</a> <a href="#prop-5388-propthreadchildcountmax" id="prop-5388-propthreadchildcountmax">PROP 5388: PROP_THREAD_CHILD_COUNT_MAX</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>C</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.28.p.2">Specifies the maximum number of children currently allowed. This parameter can only be set when Thread(R) protocol operation has been stopped. </p>
+<h1 id="rfc.section.7.2.29"><a href="#rfc.section.7.2.29">7.2.29.</a> <a href="#prop-5389-propthreadleadernetworkdata" id="prop-5389-propthreadleadernetworkdata">PROP 5389: PROP_THREAD_LEADER_NETWORK_DATA</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>D</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.29.p.2">The leader network data. </p>
+<h1 id="rfc.section.7.2.30"><a href="#rfc.section.7.2.30">7.2.30.</a> <a href="#prop-5390-propthreadstableleadernetworkdata" id="prop-5390-propthreadstableleadernetworkdata">PROP 5390: PROP_THREAD_STABLE_LEADER_NETWORK_DATA</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>D</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.30.p.2">The stable leader network data. </p>
+<h1 id="rfc.section.7.2.31"><a href="#rfc.section.7.2.31">7.2.31.</a> <a href="#prop-thread-joiners" id="prop-thread-joiners">PROP 5391: PROP_THREAD_JOINERS</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Insert/Remove Only (optionally Read-Write)</li>
+ <li>Packed-Encoding: <samp>A(t(ULE))</samp></li>
+ <li>Required capability: <samp>CAP_THREAD_COMMISSIONER</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.31.p.2">Data per item is: </p>
+<p/>
+
+<ul>
+ <li><samp>U</samp>: PSKd</li>
+ <li><samp>L</samp>: Timeout in seconds</li>
+ <li><samp>E</samp>: Extended/long address (optional)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.31.p.4">Passess Pre-Shared Key for the Device to the NCP in the commissioning process. When the Extended address is ommited all Devices which provided a valid PSKd are allowed to join the Thread(R) Network. </p>
+<h1 id="rfc.section.7.2.32"><a href="#rfc.section.7.2.32">7.2.32.</a> <a href="#prop-thread-commissioner-enabled" id="prop-thread-commissioner-enabled">PROP 5392: PROP_THREAD_COMMISSIONER_ENABLED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Write only (optionally Read-Write)</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+ <li>Required capability: <samp>CAP_THREAD_COMMISSIONER</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.32.p.2">Set to true to enable the native commissioner. It is mandatory before adding the joiner to the network. </p>
+<h1 id="rfc.section.7.2.33"><a href="#rfc.section.7.2.33">7.2.33.</a> <a href="#prop-thread-tmf-proxy-enabled" id="prop-thread-tmf-proxy-enabled">PROP 5393: PROP_THREAD_TMF_PROXY_ENABLED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+ <li>Required capability: <samp>CAP_THREAD_TMF_PROXY</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.33.p.2">Set to true to enable the TMF proxy. </p>
+<h1 id="rfc.section.7.2.34"><a href="#rfc.section.7.2.34">7.2.34.</a> <a href="#prop-thread-tmf-proxy-stream" id="prop-thread-tmf-proxy-stream">PROP 5394: PROP_THREAD_TMF_PROXY_STREAM</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write-Stream</li>
+ <li>Packed-Encoding: <samp>dSS</samp></li>
+ <li>Required capability: <samp>CAP_THREAD_TMF_PROXY</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.34.p.2">Data per item is: </p>
+<p/>
+
+<ul>
+ <li><samp>d</samp>: CoAP frame</li>
+ <li><samp>S</samp>: source/destination RLOC/ALOC</li>
+ <li><samp>S</samp>: source/destination port</li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octects:</th>
+ <th class="center">2</th>
+ <th class="center">n</th>
+ <th class="center">2</th>
+ <th class="center">2</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">Length</td>
+ <td class="center">CoAP</td>
+ <td class="center">locator</td>
+ <td class="center">port</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.7.2.34.p.4">This property allows the host to send and receive TMF messages from the NCP's RLOC address and support Thread-specific border router functions. </p>
+<h1 id="rfc.section.7.2.35"><a href="#rfc.section.7.2.35">7.2.35.</a> <a href="#prop-thread-discovery-scan-joiner-flag" id="prop-thread-discovery-scan-joiner-flag">PROP 5395: PROP_THREAD_DISOVERY_SCAN_JOINER_FLAG</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding:: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.35.p.2">This property specifies the value used in Thread(R) MLE Discovery Request TLV during discovery scan operation. Default value is <samp>false</samp>. </p>
+<h1 id="rfc.section.7.2.36"><a href="#rfc.section.7.2.36">7.2.36.</a> <a href="#prop-thread-discovery-scan-enable-filtering" id="prop-thread-discovery-scan-enable-filtering">PROP 5396: PROP_THREAD_DISCOVERY_SCAN_ENABLE_FILTERING</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding:: <samp>b</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.36.p.2">This property is used to enable/disable EUI64 filtering during discovery scan operation. Default value is <samp>false</samp>. </p>
+<h1 id="rfc.section.7.2.37"><a href="#rfc.section.7.2.37">7.2.37.</a> <a href="#prop-thread-discovery-scan-panid" id="prop-thread-discovery-scan-panid">PROP 5397: PROP_THREAD_DISCOVERY_SCAN_PANID</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-write</li>
+ <li>Packed-Encoding:: <samp>S</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.37.p.2">This property specifies the PANID used for filtering during discovery scan operation. Default value is <samp>0xffff</samp> (broadcast PANID) which disables PANID filtering. </p>
+<h1 id="rfc.section.7.2.38"><a href="#rfc.section.7.2.38">7.2.38.</a> <a href="#prop-thread-steering-data" id="prop-thread-steering-data">PROP 5398: PROP_THREAD_STEERING_DATA</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Write-Only</li>
+ <li>Packed-Encoding: <samp>E</samp></li>
+ <li>Required capability: <samp>CAP_OOB_STEERING_DATA</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.7.2.38.p.2">This property can be used to set the steering data for MLE Discovery Response messages. </p>
+<p/>
+
+<ul>
+ <li>All zeros to clear the steering data (indicating no steering data).</li>
+ <li>All 0xFFs to set the steering data (bloom filter) to accept/allow all.</li>
+ <li>A specific EUI64 which is then added to steering data/bloom filter.</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a> <a href="#feature-network-save" id="feature-network-save">Feature: Network Save</a></h1>
+<p id="rfc.section.8.p.1">The network save/recall feature is an optional NCP capability that, when present, allows the host to save and recall network credentials and state to and from nonvolatile storage. </p>
+<p id="rfc.section.8.p.2">The presence of the save/recall feature can be detected by checking for the presence of the <samp>CAP_NET_SAVE</samp> capability in <samp>PROP_CAPS</samp>. </p>
+<p id="rfc.section.8.p.3">Network clear feature allows host to erase all network credentials and state from non-volatile memory. </p>
+<h1 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1.</a> <a href="#commands-1" id="commands-1">Commands</a></h1>
+<h1 id="rfc.section.8.1.1"><a href="#rfc.section.8.1.1">8.1.1.</a> <a href="#cmd-9-hostncp-cmdnetsave" id="cmd-9-hostncp-cmdnetsave">CMD 9: (Host->NCP) CMD_NET_SAVE</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_NET_SAVE</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.8.1.1.p.1">Save network state command. Saves any current network credentials and state necessary to reconnect to the current network to non-volatile memory. </p>
+<p id="rfc.section.8.1.1.p.2">This operation affects non-volatile memory only. The current network information stored in volatile memory is unaffected. </p>
+<p id="rfc.section.8.1.1.p.3">The response to this command is always a <samp>CMD_PROP_VALUE_IS</samp> for <samp>PROP_LAST_STATUS</samp>, indicating the result of the operation. </p>
+<p id="rfc.section.8.1.1.p.4">This command is only available if the <samp>CAP_NET_SAVE</samp> capability is set. </p>
+<h1 id="rfc.section.8.1.2"><a href="#rfc.section.8.1.2">8.1.2.</a> <a href="#cmd-10-hostncp-cmdnetclear" id="cmd-10-hostncp-cmdnetclear">CMD 10: (Host->NCP) CMD_NET_CLEAR</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_NET_CLEAR</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.8.1.2.p.1">Clear saved network settings command. Erases all network credentials and state from non-volatile memory. The erased settings include any data saved automatically by the network stack firmware and/or data saved by <samp>CMD_NET_SAVE</samp> operation. </p>
+<p id="rfc.section.8.1.2.p.2">This operation affects non-volatile memory only. The current network information stored in volatile memory is unaffected. </p>
+<p id="rfc.section.8.1.2.p.3">The response to this command is always a <samp>CMD_PROP_VALUE_IS</samp> for <samp>PROP_LAST_STATUS</samp>, indicating the result of the operation. </p>
+<p id="rfc.section.8.1.2.p.4">This command is always available independent of the value of <samp>CAP_NET_SAVE</samp> capability. </p>
+<h1 id="rfc.section.8.1.3"><a href="#rfc.section.8.1.3">8.1.3.</a> <a href="#cmd-11-hostncp-cmdnetrecall" id="cmd-11-hostncp-cmdnetrecall">CMD 11: (Host->NCP) CMD_NET_RECALL</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HEADER</td>
+ <td class="center">CMD_NET_RECALL</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.8.1.3.p.1">Recall saved network state command. Recalls any previously saved network credentials and state previously stored by <samp>CMD_NET_SAVE</samp> from non-volatile memory. </p>
+<p id="rfc.section.8.1.3.p.2">This command will typically generated several unsolicited property updates as the network state is loaded. At the conclusion of loading, the authoritative response to this command is always a <samp>CMD_PROP_VALUE_IS</samp> for <samp>PROP_LAST_STATUS</samp>, indicating the result of the operation. </p>
+<p id="rfc.section.8.1.3.p.3">This command is only available if the <samp>CAP_NET_SAVE</samp> capability is set. </p>
+<h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a> <a href="#feature-host-buffer-offload" id="feature-host-buffer-offload">Feature: Host Buffer Offload</a></h1>
+<p id="rfc.section.9.p.1">The memory on an NCP may be much more limited than the memory on the host processor. In such situations, it is sometimes useful for the NCP to offload buffers to the host processor temporarily so that it can perform other operations. </p>
+<p id="rfc.section.9.p.2">Host buffer offload is an optional NCP capability that, when present, allows the NCP to store data buffers on the host processor that can be recalled at a later time. </p>
+<p id="rfc.section.9.p.3">The presence of this feature can be detected by the host by checking for the presence of the <samp>CAP_HBO</samp> capability in <samp>PROP_CAPS</samp>. </p>
+<h1 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1.</a> <a href="#commands-2" id="commands-2">Commands</a></h1>
+<h1 id="rfc.section.9.1.1"><a href="#rfc.section.9.1.1">9.1.1.</a> <a href="#cmd-12-ncphost-cmdhbooffload" id="cmd-12-ncphost-cmdhbooffload">CMD 12: (NCP->Host) CMD_HBO_OFFLOAD</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>LscD</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li><li><samp>Expiration</samp>: In seconds-from-now</li><li><samp>Priority</samp>: Critical, High, Medium, Low</li><li><samp>Data</samp>: Data to offload</li></ul></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.9.1.2"><a href="#rfc.section.9.1.2">9.1.2.</a> <a href="#cmd-13-ncphost-cmdhboreclaim" id="cmd-13-ncphost-cmdhboreclaim">CMD 13: (NCP->Host) CMD_HBO_RECLAIM</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>Lb</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li><li><samp>KeepAfterReclaim</samp>: If not set to true, the block will be dropped by the host after it is sent to the NCP.</li></ul></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.9.1.3"><a href="#rfc.section.9.1.3">9.1.3.</a> <a href="#cmd-14-ncphost-cmdhbodrop" id="cmd-14-ncphost-cmdhbodrop">CMD 14: (NCP->Host) CMD_HBO_DROP</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>L</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li></ul></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.9.1.4"><a href="#rfc.section.9.1.4">9.1.4.</a> <a href="#cmd-15-hostncp-cmdhbooffloaded" id="cmd-15-hostncp-cmdhbooffloaded">CMD 15: (Host->NCP) CMD_HBO_OFFLOADED</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>Li</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li><li><samp>Status</samp>: Status code for the result of the operation.</li></ul></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.9.1.5"><a href="#rfc.section.9.1.5">9.1.5.</a> <a href="#cmd-16-hostncp-cmdhboreclaimed" id="cmd-16-hostncp-cmdhboreclaimed">CMD 16: (Host->NCP) CMD_HBO_RECLAIMED</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>LiD</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li><li><samp>Status</samp>: Status code for the result of the operation.</li><li><samp>Data</samp>: Data that was previously offloaded (if any)</li></ul></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.9.1.6"><a href="#rfc.section.9.1.6">9.1.6.</a> <a href="#cmd-17-hostncp-cmdhbodropped" id="cmd-17-hostncp-cmdhbodropped">CMD 17: (Host->NCP) CMD_HBO_DROPPED</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>Li</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li><li><samp>Status</samp>: Status code for the result of the operation.</li></ul></li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2.</a> <a href="#properties-1" id="properties-1">Properties</a></h1>
+<h1 id="rfc.section.9.2.1"><a href="#rfc.section.9.2.1">9.2.1.</a> <a href="#prop-hbo-mem-max" id="prop-hbo-mem-max">PROP 10: PROP_HBO_MEM_MAX</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>L</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">4</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">
+ <samp>PROP_HBO_MEM_MAX</samp>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.9.2.1.p.2">Describes the number of bytes that may be offloaded from the NCP to the host. Default value is zero, so this property must be set by the host to a non-zero value before the NCP will begin offloading blocks. </p>
+<p id="rfc.section.9.2.1.p.3">This value is encoded as an unsigned 32-bit integer. </p>
+<p id="rfc.section.9.2.1.p.4">This property is only available if the <samp>CAP_HBO</samp> capability is present in <samp>PROP_CAPS</samp>. </p>
+<h1 id="rfc.section.9.2.2"><a href="#rfc.section.9.2.2">9.2.2.</a> <a href="#prop-hbo-block-max" id="prop-hbo-block-max">PROP 11: PROP_HBO_BLOCK_MAX</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>S</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">2</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">
+ <samp>PROP_HBO_BLOCK_MAX</samp>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.9.2.2.p.2">Describes the number of blocks that may be offloaded from the NCP to the host. Default value is 32. Setting this value to zero will cause host block offload to be effectively disabled. </p>
+<p id="rfc.section.9.2.2.p.3">This value is encoded as an unsigned 16-bit integer. </p>
+<p id="rfc.section.9.2.2.p.4">This property is only available if the <samp>CAP_HBO</samp> capability is present in <samp>PROP_CAPS</samp>. </p>
+<h1 id="rfc.section.10"><a href="#rfc.section.10">10.</a> <a href="#feature-jam-detect" id="feature-jam-detect">Feature: Jam Detection</a></h1>
+<p id="rfc.section.10.p.1">Jamming detection is a feature that allows the NCP to report when it detects high levels of interference that are characteristic of intentional signal jamming. </p>
+<p id="rfc.section.10.p.2">The presence of this feature can be detected by checking for the presence of the <samp>CAP_JAM_DETECT</samp> (value 6) capability in <samp>PROP_CAPS</samp>. </p>
+<h1 id="rfc.section.10.1"><a href="#rfc.section.10.1">10.1.</a> <a href="#properties-2" id="properties-2">Properties</a></h1>
+<h1 id="rfc.section.10.1.1"><a href="#rfc.section.10.1.1">10.1.1.</a> <a href="#prop-jam-detect-enable" id="prop-jam-detect-enable">PROP 4608: PROP_JAM_DETECT_ENABLE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+ <li>Default Value: false</li>
+ <li>REQUIRED for <samp>CAP_JAM_DETECT</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">
+ <samp>PROP_JAM_DETECT_ENABLE</samp>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.10.1.1.p.2">Indicates if jamming detection is enabled or disabled. Set to true to enable jamming detection. </p>
+<p id="rfc.section.10.1.1.p.3">This property is only available if the <samp>CAP_JAM_DETECT</samp> capability is present in <samp>PROP_CAPS</samp>. </p>
+<h1 id="rfc.section.10.1.2"><a href="#rfc.section.10.1.2">10.1.2.</a> <a href="#prop-jam-detected" id="prop-jam-detected">PROP 4609: PROP_JAM_DETECTED</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>b</samp></li>
+ <li>REQUIRED for <samp>CAP_JAM_DETECT</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">
+ <samp>PROP_JAM_DETECTED</samp>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.10.1.2.p.2">Set to true if radio jamming is detected. Set to false otherwise. </p>
+<p id="rfc.section.10.1.2.p.3">When jamming detection is enabled, changes to the value of this property are emitted asynchronously via <samp>CMD_PROP_VALUE_IS</samp>. </p>
+<p id="rfc.section.10.1.2.p.4">This property is only available if the <samp>CAP_JAM_DETECT</samp> capability is present in <samp>PROP_CAPS</samp>. </p>
+<h1 id="rfc.section.10.1.3"><a href="#rfc.section.10.1.3">10.1.3.</a> <a href="#prop-4610-propjamdetectrssithreshold" id="prop-4610-propjamdetectrssithreshold">PROP 4610: PROP_JAM_DETECT_RSSI_THRESHOLD</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>c</samp></li>
+ <li>Units: dBm</li>
+ <li>Default Value: Implementation-specific</li>
+ <li>RECOMMENDED for <samp>CAP_JAM_DETECT</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.10.1.3.p.2">This parameter describes the threshold RSSI level (measured in dBm) above which the jamming detection will consider the channel blocked. </p>
+<h1 id="rfc.section.10.1.4"><a href="#rfc.section.10.1.4">10.1.4.</a> <a href="#prop-4611-propjamdetectwindow" id="prop-4611-propjamdetectwindow">PROP 4611: PROP_JAM_DETECT_WINDOW</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>c</samp></li>
+ <li>Units: Seconds (1-64)</li>
+ <li>Default Value: Implementation-specific</li>
+ <li>RECOMMENDED for <samp>CAP_JAM_DETECT</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.10.1.4.p.2">This parameter describes the window period for signal jamming detection. </p>
+<h1 id="rfc.section.10.1.5"><a href="#rfc.section.10.1.5">10.1.5.</a> <a href="#prop-4612-propjamdetectbusy" id="prop-4612-propjamdetectbusy">PROP 4612: PROP_JAM_DETECT_BUSY</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+ <li>Packed-Encoding: <samp>i</samp></li>
+ <li>Units: Seconds (1-64)</li>
+ <li>Default Value: Implementation-specific</li>
+ <li>RECOMMENDED for <samp>CAP_JAM_DETECT</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.10.1.5.p.2">This parameter describes the number of aggregate seconds within the detection window where the RSSI must be above <samp>PROP_JAM_DETECT_RSSI_THRESHOLD</samp> to trigger detection. </p>
+<p id="rfc.section.10.1.5.p.3">The behavior of the jamming detection feature when <samp>PROP_JAM_DETECT_BUSY</samp> is larger than <samp>PROP_JAM_DETECT_WINDOW</samp> is undefined. </p>
+<h1 id="rfc.section.10.1.6"><a href="#rfc.section.10.1.6">10.1.6.</a> <a href="#prop-4613-propjamdetecthistorybitmap" id="prop-4613-propjamdetecthistorybitmap">PROP 4613: PROP_JAM_DETECT_HISTORY_BITMAP</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Only</li>
+ <li>Packed-Encoding: <samp>LL</samp></li>
+ <li>Default Value: Implementation-specific</li>
+ <li>RECOMMENDED for <samp>CAP_JAM_DETECT</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.10.1.6.p.2">This value provides information about current state of jamming detection module for monitoring/debugging purpose. It returns a 64-bit value where each bit corresponds to one second interval starting with bit 0 for the most recent interval and bit 63 for the oldest intervals (63 sec earlier). The bit is set to 1 if the jamming detection module observed/detected high signal level during the corresponding one second interval. The value is read-only and is encoded as two <samp>L</samp> (uint32) values in little-endian format (first <samp>L</samp> (uint32) value gives the lower bits corresponding to more recent history). </p>
+<h1 id="rfc.section.11"><a href="#rfc.section.11">11.</a> <a href="#feature-gpio-access" id="feature-gpio-access">Feature: GPIO Access</a></h1>
+<p id="rfc.section.11.p.1">This feature allows the host to have control over some or all of the GPIO pins on the NCP. The host can determine which GPIOs are available by examining <samp>PROP_GPIO_CONFIG</samp>, described below. This API supports a maximum of 256 individual GPIO pins. </p>
+<p id="rfc.section.11.p.2">Support for this feature can be determined by the presence of <samp>CAP_GPIO</samp>. </p>
+<h1 id="rfc.section.11.1"><a href="#rfc.section.11.1">11.1.</a> <a href="#properties-3" id="properties-3">Properties</a></h1>
+<h1 id="rfc.section.11.1.1"><a href="#rfc.section.11.1.1">11.1.1.</a> <a href="#prop-4096-propgpioconfig" id="prop-4096-propgpioconfig">PROP 4096: PROP_GPIO_CONFIG</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>A(t(CCU))</samp></li>
+ <li>Type: Read-write (Writable only using <samp>CMD_PROP_VALUE_INSERT</samp>, <a href="#cmd-prop-value-insert">Section 4.5</a>)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.11.1.1.p.2">An array of structures which contain the following fields: </p>
+<p/>
+
+<ul>
+ <li><samp>C</samp>: GPIO Number</li>
+ <li><samp>C</samp>: GPIO Configuration Flags</li>
+ <li><samp>U</samp>: Human-readable GPIO name</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.11.1.1.p.4">GPIOs which do not have a corresponding entry are not supported. </p>
+<p id="rfc.section.11.1.1.p.5">The configuration parameter contains the configuration flags for the GPIO: </p>
+<pre>
+ 0 1 2 3 4 5 6 7
++---+---+---+---+---+---+---+---+
+|DIR|PUP|PDN|TRIGGER| RESERVED |
++---+---+---+---+---+---+---+---+
+ |O/D|
+ +---+
+</pre>
+<p/>
+
+<ul>
+ <li><samp>DIR</samp>: Pin direction. Clear (0) for input, set (1) for output.</li>
+ <li><samp>PUP</samp>: Pull-up enabled flag.</li>
+ <li><samp>PDN</samp>/<samp>O/D</samp>: Flag meaning depends on pin direction: <ul><li>Input: Pull-down enabled.</li><li>Output: Output is an open-drain.</li></ul></li>
+ <li><samp>TRIGGER</samp>: Enumeration describing how pin changes generate asynchronous notification commands (TBD) from the NCP to the host. <ul><li>0: Feature disabled for this pin</li><li>1: Trigger on falling edge</li><li>2: Trigger on rising edge</li><li>3: Trigger on level change</li></ul></li>
+ <li><samp>RESERVED</samp>: Bits reserved for future use. Always cleared to zero and ignored when read.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.11.1.1.p.7">As an optional feature, the configuration of individual pins may be modified using the <samp>CMD_PROP_VALUE_INSERT</samp> command. Only the GPIO number and flags fields MUST be present, the GPIO name (if present) would be ignored. This command can only be used to modify the configuration of GPIOs which are already exposed---it cannot be used by the host to add addional GPIOs. </p>
+<h1 id="rfc.section.11.1.2"><a href="#rfc.section.11.1.2">11.1.2.</a> <a href="#prop-4098-propgpiostate" id="prop-4098-propgpiostate">PROP 4098: PROP_GPIO_STATE</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Read-Write</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.11.1.2.p.2">Contains a bit field identifying the state of the GPIOs. The length of the data associated with these properties depends on the number of GPIOs. If you have 10 GPIOs, you'd have two bytes. GPIOs are numbered from most significant bit to least significant bit, so 0x80 is GPIO 0, 0x40 is GPIO 1, etc. </p>
+<p id="rfc.section.11.1.2.p.3">For GPIOs configured as inputs: </p>
+<p/>
+
+<ul>
+ <li><samp>CMD_PROP_VAUE_GET</samp>: The value of the associated bit describes the logic level read from the pin.</li>
+ <li><samp>CMD_PROP_VALUE_SET</samp>: The value of the associated bit is ignored for these pins.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.11.1.2.p.5">For GPIOs configured as outputs: </p>
+<p/>
+
+<ul>
+ <li><samp>CMD_PROP_VAUE_GET</samp>: The value of the associated bit is implementation specific.</li>
+ <li><samp>CMD_PROP_VALUE_SET</samp>: The value of the associated bit determines the new logic level of the output. If this pin is configured as an open-drain, setting the associated bit to 1 will cause the pin to enter a Hi-Z state.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.11.1.2.p.7">For GPIOs which are not specified in <samp>PROP_GPIO_CONFIG</samp>: </p>
+<p/>
+
+<ul>
+ <li><samp>CMD_PROP_VAUE_GET</samp>: The value of the associated bit is implementation specific.</li>
+ <li><samp>CMD_PROP_VALUE_SET</samp>: The value of the associated bit MUST be ignored by the NCP.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.11.1.2.p.9">When writing, unspecified bits are assumed to be zero. </p>
+<h1 id="rfc.section.11.1.3"><a href="#rfc.section.11.1.3">11.1.3.</a> <a href="#prop-4099-propgpiostateset" id="prop-4099-propgpiostateset">PROP 4099: PROP_GPIO_STATE_SET</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Write-only</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.11.1.3.p.2">Allows for the state of various output GPIOs to be set without affecting other GPIO states. Contains a bit field identifying the output GPIOs that should have their state set to 1. </p>
+<p id="rfc.section.11.1.3.p.3">When writing, unspecified bits are assumed to be zero. The value of any bits for GPIOs which are not specified in <samp>PROP_GPIO_CONFIG</samp> MUST be ignored. </p>
+<h1 id="rfc.section.11.1.4"><a href="#rfc.section.11.1.4">11.1.4.</a> <a href="#prop-4100-propgpiostateclear" id="prop-4100-propgpiostateclear">PROP 4100: PROP_GPIO_STATE_CLEAR</a></h1>
+<p/>
+
+<ul>
+ <li>Type: Write-only</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.11.1.4.p.2">Allows for the state of various output GPIOs to be cleared without affecting other GPIO states. Contains a bit field identifying the output GPIOs that should have their state cleared to 0. </p>
+<p id="rfc.section.11.1.4.p.3">When writing, unspecified bits are assumed to be zero. The value of any bits for GPIOs which are not specified in <samp>PROP_GPIO_CONFIG</samp> MUST be ignored. </p>
+<h1 id="rfc.section.12"><a href="#rfc.section.12">12.</a> <a href="#feature-trng" id="feature-trng">Feature: True Random Number Generation</a></h1>
+<p id="rfc.section.12.p.1">This feature allows the host to have access to any strong hardware random number generator that might be present on the NCP, for things like key generation or seeding PRNGs. </p>
+<p id="rfc.section.12.p.2">Support for this feature can be determined by the presence of <samp>CAP_TRNG</samp>. </p>
+<p id="rfc.section.12.p.3">Note well that implementing a cryptographically-strong software-based true random number generator (that is impervious to things like temperature changes, manufacturing differences across devices, or unexpected output correlations) is non-trivial without a well-designed, dedicated hardware random number generator. Implementors who have little or no experience in this area are encouraged to not advertise this capability. </p>
+<h1 id="rfc.section.12.1"><a href="#rfc.section.12.1">12.1.</a> <a href="#properties-4" id="properties-4">Properties</a></h1>
+<h1 id="rfc.section.12.1.1"><a href="#rfc.section.12.1.1">12.1.1.</a> <a href="#prop-4101-proptrng32" id="prop-4101-proptrng32">PROP 4101: PROP_TRNG_32</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>L</samp></li>
+ <li>Type: Read-Only</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.12.1.1.p.2">Fetching this property returns a strong random 32-bit integer that is suitable for use as a PRNG seed or for cryptographic use. </p>
+<p id="rfc.section.12.1.1.p.3">While the exact mechanism behind the calculation of this value is implementation-specific, the implementation must satisfy the following requirements: </p>
+<p/>
+
+<ul>
+ <li>Data representing at least 32 bits of fresh entropy (extracted from the primary entropy source) MUST be consumed by the calculation of each query.</li>
+ <li>Each of the 32 bits returned MUST be free of bias and have no statistical correlation to any part of the raw data used for the calculation of any query.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.12.1.1.p.5">Support for this property is REQUIRED if <samp>CAP_TRNG</samp> is included in the device capabilities. </p>
+<h1 id="rfc.section.12.1.2"><a href="#rfc.section.12.1.2">12.1.2.</a> <a href="#prop-4102-proptrng128" id="prop-4102-proptrng128">PROP 4102: PROP_TRNG_128</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>D</samp></li>
+ <li>Type: Read-Only</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.12.1.2.p.2">Fetching this property returns 16 bytes of strong random data suitable for direct cryptographic use without further processing(For example, as an AES key). </p>
+<p id="rfc.section.12.1.2.p.3">While the exact mechanism behind the calculation of this value is implementation-specific, the implementation must satisfy the following requirements: </p>
+<p/>
+
+<ul>
+ <li>Data representing at least 128 bits of fresh entropy (extracted from the primary entropy source) MUST be consumed by the calculation of each query.</li>
+ <li>Each of the 128 bits returned MUST be free of bias and have no statistical correlation to any part of the raw data used for the calculation of any query.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.12.1.2.p.5">Support for this property is REQUIRED if <samp>CAP_TRNG</samp> is included in the device capabilities. </p>
+<h1 id="rfc.section.12.1.3"><a href="#rfc.section.12.1.3">12.1.3.</a> <a href="#prop-4103-proptrngraw32" id="prop-4103-proptrngraw32">PROP 4103: PROP_TRNG_RAW_32</a></h1>
+<p/>
+
+<ul>
+ <li>Argument-Encoding: <samp>D</samp></li>
+ <li>Type: Read-Only</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.12.1.3.p.2">This property is primarily used to diagnose and debug the behavior of the entropy source used for strong random number generation. </p>
+<p id="rfc.section.12.1.3.p.3">When queried, returns the raw output from the entropy source used to generate <samp>PROP_TRNG_32</samp>, prior to any reduction/whitening and/or mixing with prior state. </p>
+<p id="rfc.section.12.1.3.p.4">The length of the returned buffer is implementation specific and should be expected to be non-deterministic. </p>
+<p id="rfc.section.12.1.3.p.5">Support for this property is RECOMMENDED if <samp>CAP_TRNG</samp> is included in the device capabilities. </p>
+<h1 id="rfc.section.13"><a href="#rfc.section.13">13.</a> <a href="#security-considerations" id="security-considerations">Security Considerations</a></h1>
+<h1 id="rfc.section.13.1"><a href="#rfc.section.13.1">13.1.</a> <a href="#raw-application-access" id="raw-application-access">Raw Application Access</a></h1>
+<p id="rfc.section.13.1.p.1">Spinel MAY be used as an API boundary for allowing processes to configure the NCP. However, such a system MUST NOT give unprivileged processess the ability to send or receive arbitrary command frames to the NCP. Only the specific commands and properties that are required should be allowed to be passed, and then only after being checked for proper format. </p>
+<h1 id="rfc.appendix.A"><a href="#rfc.appendix.A">Appendix A.</a> <a href="#framing-protocol" id="framing-protocol">Framing Protocol</a></h1>
+<p id="rfc.section.A.p.1">Since this NCP protocol is defined independently of the physical transport or framing, any number of transports and framing protocols could be used successfully. However, in the interests of compatibility, this document provides some recommendations. </p>
+<h1 id="rfc.appendix.A.1"><a href="#rfc.appendix.A.1">A.1.</a> <a href="#uart-recommendations" id="uart-recommendations">UART Recommendations</a></h1>
+<p id="rfc.section.A.1.p.1">The recommended default UART settings are: </p>
+<p/>
+
+<ul>
+ <li>Bit rate: 115200</li>
+ <li>Start bits: 1</li>
+ <li>Data bits: 8</li>
+ <li>Stop bits: 1</li>
+ <li>Parity: None</li>
+ <li>Flow Control: Hardware</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.A.1.p.3">These values may be adjusted depending on the individual needs of the application or product, but some sort of flow control MUST be used. Hardware flow control is preferred over software flow control. In the absence of hardware flow control, software flow control (XON/XOFF) MUST be used instead. </p>
+<p id="rfc.section.A.1.p.4">We also <strong>RECOMMEND</strong> an Arduino-style hardware reset, where the DTR signal is coupled to the <samp>R̅E̅S̅</samp> pin through a 0.01µF capacitor. This causes the NCP to automatically reset whenever the serial port is opened. At the very least we <strong>RECOMMEND</strong> dedicating one of your host pins to controlling the <samp>R̅E̅S̅</samp> pin on the NCP, so that you can easily perform a hardware reset if necessary. </p>
+<h1 id="rfc.appendix.A.1.1"><a href="#rfc.appendix.A.1.1">A.1.1.</a> <a href="#uart-bit-rate-detection" id="uart-bit-rate-detection">UART Bit Rate Detection</a></h1>
+<p id="rfc.section.A.1.1.p.1">When using a UART, the issue of an appropriate bit rate must be considered. A bitrate of 115200 bits per second has become a defacto standard baud rate for many serial peripherals. This rate, however, is slower than the theoretical maximum bitrate of the 802.15.4 2.4GHz PHY (250kbit). In most circumstances this mismatch is not significant because the overall bitrate will be much lower than either of these rates, but there are circumstances where a faster UART bitrate is desirable. Thus, this document proposes a simple bitrate detection scheme that can be employed by the host to detect when the attached NCP is initially running at a higher bitrate. </p>
+<p id="rfc.section.A.1.1.p.2">The algorithm is to send successive NOOP commands to the NCP at increasing bitrates. When a valid <samp>CMD_LAST_STATUS</samp> response has been received, we have identified the correct bitrate. </p>
+<p id="rfc.section.A.1.1.p.3">In order to limit the time spent hunting for the appropriate bitrate, we RECOMMEND that only the following bitrates be checked: </p>
+<p/>
+
+<ul>
+ <li>115200</li>
+ <li>230400</li>
+ <li>1000000 (1Mbit)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.A.1.1.p.5">The bitrate MAY also be changed programmatically by adjusting <samp>PROP_UART_BITRATE</samp>, if implemented. </p>
+<h1 id="rfc.appendix.A.1.2"><a href="#rfc.appendix.A.1.2">A.1.2.</a> <a href="#hdlc-lite" id="hdlc-lite">HDLC-Lite</a></h1>
+<p><em>HDLC-Lite</em> is the recommended framing protocol for transmitting Spinel frames over a UART. HDLC-Lite consists of only the framing, escaping, and CRC parts of the larger HDLC protocol---all other parts of HDLC are omitted. This protocol was chosen because it works well with software flow control and is widely implemented. </p>
+<p id="rfc.section.A.1.2.p.2">To transmit a frame with HDLC-lite, the 16-bit CRC must first be appended to the frame. The CRC function is defined to be CRC-16/CCITT, otherwise known as the <a href="http://reveng.sourceforge.net/crc-catalogue/16.htm#crc.cat.kermit">KERMIT CRC</a>. </p>
+<p id="rfc.section.A.1.2.p.3">Individual frames are terminated with a frame delimiter octet called the 'flag' octet (<samp>0x7E</samp>). </p>
+<p id="rfc.section.A.1.2.p.4">The following octets values are considered <em>special</em> and should be escaped when present in data frames: </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octet Value</th>
+ <th class="center">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">0x7E</td>
+ <td class="center">Frame Delimiter (Flag)</td>
+ </tr>
+ <tr>
+ <td class="center">0x7D</td>
+ <td class="center">Escape Byte</td>
+ </tr>
+ <tr>
+ <td class="center">0x11</td>
+ <td class="center">XON</td>
+ </tr>
+ <tr>
+ <td class="center">0x13</td>
+ <td class="center">XOFF</td>
+ </tr>
+ <tr>
+ <td class="center">0xF8</td>
+ <td class="center">Vendor-Specific</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.A.1.2.p.5">When present in a data frame, these octet values are escaped by prepending the escape octet (<samp>0x7D</samp>) and XORing the value with <samp>0x20</samp>. </p>
+<p id="rfc.section.A.1.2.p.6">When receiving a frame, the CRC must be verified after the frame is unescaped. If the CRC value does not match what is calculated for the frame data, the frame MUST be discarded. The implementation MAY indicate the failure to higher levels to handle as they see fit, but MUST NOT attempt to process the deceived frame. </p>
+<p id="rfc.section.A.1.2.p.7">Consecutive flag octets are entirely legal and MUST NOT be treated as a framing error. Consecutive flag octets MAY be used as a way to wake up a sleeping NCP. </p>
+<p id="rfc.section.A.1.2.p.8">When first establishing a connection to the NCP, it is customary to send one or more flag octets to ensure that any previously received data is discarded. </p>
+<h1 id="rfc.appendix.A.2"><a href="#rfc.appendix.A.2">A.2.</a> <a href="#spi-recommendations" id="spi-recommendations">SPI Recommendations</a></h1>
+<p id="rfc.section.A.2.p.1">We RECOMMEND the use of the following standard SPI signals: </p>
+<p/>
+
+<ul>
+ <li><samp>C̅S̅</samp>: (Host-to-NCP) Chip Select</li>
+ <li><samp>CLK</samp>: (Host-to-NCP) Clock</li>
+ <li><samp>MOSI</samp>: Master-Output/Slave-Input</li>
+ <li><samp>MISO</samp>: Master-Input/Slave-Output</li>
+ <li><samp>I̅N̅T̅</samp>: (NCP-to-Host) Host Interrupt</li>
+ <li><samp>R̅E̅S̅</samp>: (Host-to-NCP) NCP Hardware Reset</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.A.2.p.3">The <samp>I̅N̅T̅</samp> signal is used by the NCP to indicate to the host that the NCP has frames pending to send to it. When asserted, the host SHOULD initiate a SPI transaction in a timely manner. </p>
+<p id="rfc.section.A.2.p.4">We RECOMMEND the following SPI properties: </p>
+<p/>
+
+<ul>
+ <li><samp>C̅S̅</samp> is active low.</li>
+ <li><samp>CLK</samp> is active high.</li>
+ <li><samp>CLK</samp> speed is larger than 500 kHz.</li>
+ <li>Data is valid on leading edge of <samp>CLK</samp>.</li>
+ <li>Data is sent in multiples of 8-bits (octets).</li>
+ <li>Octets are sent most-significant bit first.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.A.2.p.6">This recommended configuration may be adjusted depending on the individual needs of the application or product. </p>
+<h1 id="rfc.appendix.A.2.1"><a href="#rfc.appendix.A.2.1">A.2.1.</a> <a href="#spi-framing-protocol" id="spi-framing-protocol">SPI Framing Protocol</a></h1>
+<p id="rfc.section.A.2.1.p.1">Each SPI frame starts with a 5-byte frame header: </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">Octets:</th>
+ <th class="center">1</th>
+ <th class="center">2</th>
+ <th class="center">2</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">Fields:</td>
+ <td class="center">HDR</td>
+ <td class="center">RECV_LEN</td>
+ <td class="center">DATA_LEN</td>
+ </tr>
+ </tbody>
+</table>
+<p/>
+
+<ul>
+ <li><samp>HDR</samp>: The first byte is the header byte (defined below)</li>
+ <li><samp>RECV_LEN</samp>: The second and third bytes indicate the largest frame size that that device is ready to receive. If zero, then the other device must not send any data. (Little endian)</li>
+ <li><samp>DATA_LEN</samp>: The fourth and fifth bytes indicate the size of the pending data frame to be sent to the other device. If this value is equal-to or less-than the number of bytes that the other device is willing to receive, then the data of the frame is immediately after the header. (Little Endian)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.A.2.1.p.3">The <samp>HDR</samp> byte is defined as: </p>
+<pre>
+ 0 1 2 3 4 5 6 7
++---+---+---+---+---+---+---+---+
+|RST|CRC|CCF| RESERVED |PATTERN|
++---+---+---+---+---+---+---+---+
+</pre>
+<p/>
+
+<ul>
+ <li><samp>RST</samp>: This bit is set when that device has been reset since the last time <samp>C̅S̅</samp> was asserted.</li>
+ <li><samp>CRC</samp>: This bit is set when that device supports writing a 16-bit CRC at the end of the data. The CRC length is NOT included in DATA_LEN.</li>
+ <li><samp>CCF</samp>: "CRC Check Failure". Set if the CRC check on the last received frame failed, cleared to zero otherwise. This bit is only used if both sides support CRC.</li>
+ <li><samp>RESERVED</samp>: These bits are all reserved for future used. They MUST be cleared to zero and MUST be ignored if set.</li>
+ <li><samp>PATTERN</samp>: These bits are set to a fixed value to help distinguish valid SPI frames from garbage (by explicitly making <samp>0xFF</samp> and <samp>0x00</samp> invalid values). Bit 6 MUST be set to be one and bit 7 MUST be cleared (0). A frame received that has any other values for these bits MUST be dropped.</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.A.2.1.p.5">Prior to a sending or receiving a frame, the master MAY send a 5-octet frame with zeros for both the max receive frame size and the the contained frame length. This will induce the slave device to indicate the length of the frame it wants to send (if any) and indicate the largest frame it is capable of receiving at the moment. This allows the master to calculate the size of the next transaction. Alternatively, if the master has a frame to send it can just go ahead and send a frame of that length and determine if the frame was accepted by checking that the <samp>RECV_LEN</samp> from the slave frame is larger than the frame the master just tried to send. If the <samp>RECV_LEN</samp> is smaller then the frame wasn't accepted and will need to be transmitted again. </p>
+<p id="rfc.section.A.2.1.p.6">This protocol can be used either unidirectionally or bidirectionally, determined by the behavior of the master and the slave. </p>
+<p id="rfc.section.A.2.1.p.7">If the the master notices <samp>PATTERN</samp> is not set correctly, the master should consider the transaction to have failed and try again after 10 milliseconds, retrying up to 200 times. After unsuccessfully trying 200 times in a row, the master MAY take appropriate remedial action (like a NCP hardware reset, or indicating a communication failure to a user interface). </p>
+<p id="rfc.section.A.2.1.p.8">At the end of the data of a frame is an optional 16-bit CRC, support for which is indicated by the <samp>CRC</samp> bit of the <samp>HDR</samp> byte being set. If these bits are set for both the master and slave frames, then CRC checking is enabled on both sides, effectively requiring that frame sizes be two bytes longer than would be otherwise required. The CRC is calculated using the same mechanism used for the CRC calculation in HDLC-Lite (See <a href="#hdlc-lite">Appendix A.1.2</a>). When both of the <samp>CRC</samp> bits are set, both sides must verify that the <samp>CRC</samp> is valid before accepting the frame. If not enough bytes were clocked out for the CRC to be read, then the frame must be ignored. If enough bytes were clocked out to perform a CRC check, but the CRC check fails, then the frame must be rejected and the <samp>CRC_FAIL</samp> bit on the next frame (and ONLY the next frame) MUST be set. </p>
+<h1 id="rfc.appendix.A.3"><a href="#rfc.appendix.A.3">A.3.</a> <a href="#i2c-recommendations" id="i2c-recommendations">I²C Recommendations</a></h1>
+<p id="rfc.section.A.3.p.1">TBD </p>
+<p>
+ <a id="CREF5" class="info">[CREF5]<span class="info">RQ: It may make sense to have a look at what Bluetooth HCI is doing for native I²C framing and go with that.</span></a>
+</p>
+<h1 id="rfc.appendix.A.4"><a href="#rfc.appendix.A.4">A.4.</a> <a href="#native-usb-recommendations" id="native-usb-recommendations">Native USB Recommendations</a></h1>
+<p id="rfc.section.A.4.p.1">TBD </p>
+<p>
+ <a id="CREF6" class="info">[CREF6]<span class="info">RQ: It may make sense to have a look at what Bluetooth HCI is doing for native USB framing and go with that.</span></a>
+</p>
+<h1 id="rfc.appendix.B"><a href="#rfc.appendix.B">Appendix B.</a> <a href="#test-vectors" id="test-vectors">Test Vectors</a></h1>
+<h1 id="rfc.appendix.B.1"><a href="#rfc.appendix.B.1">B.1.</a> <a href="#test-vector-packed-unsigned-integer" id="test-vector-packed-unsigned-integer">Test Vector: Packed Unsigned Integer</a></h1>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="right">Decimal Value</th>
+ <th class="left">Packet Octet Encoding</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="right">0</td>
+ <td class="left">
+ <samp>00</samp>
+ </td>
+ </tr>
+ <tr>
+ <td class="right">1</td>
+ <td class="left">
+ <samp>01</samp>
+ </td>
+ </tr>
+ <tr>
+ <td class="right">127</td>
+ <td class="left">
+ <samp>7F</samp>
+ </td>
+ </tr>
+ <tr>
+ <td class="right">128</td>
+ <td class="left">
+ <samp>80 01</samp>
+ </td>
+ </tr>
+ <tr>
+ <td class="right">129</td>
+ <td class="left">
+ <samp>81 01</samp>
+ </td>
+ </tr>
+ <tr>
+ <td class="right">1,337</td>
+ <td class="left">
+ <samp>B9 0A</samp>
+ </td>
+ </tr>
+ <tr>
+ <td class="right">16,383</td>
+ <td class="left">
+ <samp>FF 7F</samp>
+ </td>
+ </tr>
+ <tr>
+ <td class="right">16,384</td>
+ <td class="left">
+ <samp>80 80 01</samp>
+ </td>
+ </tr>
+ <tr>
+ <td class="right">16,385</td>
+ <td class="left">
+ <samp>81 80 01</samp>
+ </td>
+ </tr>
+ <tr>
+ <td class="right">2,097,151</td>
+ <td class="left">
+ <samp>FF FF 7F</samp>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p>
+ <a id="CREF7" class="info">[CREF7]<span class="info">RQ: The PUI test-vector encodings need to be verified.</span></a>
+</p>
+<h1 id="rfc.appendix.B.2"><a href="#rfc.appendix.B.2">B.2.</a> <a href="#test-vector-reset-command" id="test-vector-reset-command">Test Vector: Reset Command</a></h1>
+<p/>
+
+<ul>
+ <li>NLI: 0</li>
+ <li>TID: 0</li>
+ <li>CMD: 1 (<samp>CMD_RESET</samp>)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.B.2.p.2">Frame: </p>
+<pre>
+80 01
+</pre>
+<h1 id="rfc.appendix.B.3"><a href="#rfc.appendix.B.3">B.3.</a> <a href="#test-vector-reset-notification" id="test-vector-reset-notification">Test Vector: Reset Notification</a></h1>
+<p/>
+
+<ul>
+ <li>NLI: 0</li>
+ <li>TID: 0</li>
+ <li>CMD: 6 (<samp>CMD_VALUE_IS</samp>)</li>
+ <li>PROP: 0 (<samp>PROP_LAST_STATUS</samp>)</li>
+ <li>VALUE: 114 (<samp>STATUS_RESET_SOFTWARE</samp>)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.B.3.p.2">Frame: </p>
+<pre>
+80 06 00 72
+</pre>
+<h1 id="rfc.appendix.B.4"><a href="#rfc.appendix.B.4">B.4.</a> <a href="#test-vector-scan-beacon" id="test-vector-scan-beacon">Test Vector: Scan Beacon</a></h1>
+<p/>
+
+<ul>
+ <li>NLI: 0</li>
+ <li>TID: 0</li>
+ <li>CMD: 7 (<samp>CMD_VALUE_INSERTED</samp>)</li>
+ <li>PROP: 51 (<samp>PROP_MAC_SCAN_BEACON</samp>)</li>
+ <li>VALUE: Structure, encoded as <samp>Cct(ESSc)t(iCUd)</samp> <ul><li>CHAN: 15</li><li>RSSI: -60dBm</li><li>MAC_DATA: (0D 00 B6 40 D4 8C E9 38 F9 52 FF FF D2 04 00) <ul><li>Long address: B6:40:D4:8C:E9:38:F9:52</li><li>Short address: 0xFFFF</li><li>PAN-ID: 0x04D2</li><li>LQI: 0</li></ul></li><li>NET_DATA: (13 00 03 20 73 70 69 6E 65 6C 00 08 00 DE AD 00 BE EF 00 CA FE) <ul><li>Protocol Number: 3</li><li>Flags: 0x20</li><li>Network Name: <samp>spinel</samp></li><li>XPANID: <samp>DE AD 00 BE EF 00 CA FE</samp></li></ul></li></ul></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.B.4.p.2">Frame: </p>
+<pre>
+80 07 33 0F C4 0D 00 B6 40 D4 8C E9 38 F9 52 FF FF D2 04 00
+13 00 03 20 73 70 69 6E 65 6C 00 08 00 DE AD 00 BE EF 00 CA
+FE
+</pre>
+<h1 id="rfc.appendix.B.5"><a href="#rfc.appendix.B.5">B.5.</a> <a href="#test-vector-inbound-ipv6-packet" id="test-vector-inbound-ipv6-packet">Test Vector: Inbound IPv6 Packet</a></h1>
+<p id="rfc.section.B.5.p.1">CMD_VALUE_IS(PROP_STREAM_NET) </p>
+<p>
+ <a id="CREF8" class="info">[CREF8]<span class="info">RQ: FIXME: This test vector is incomplete.</span></a>
+</p>
+<h1 id="rfc.appendix.B.6"><a href="#rfc.appendix.B.6">B.6.</a> <a href="#test-vector-outbound-ipv6-packet" id="test-vector-outbound-ipv6-packet">Test Vector: Outbound IPv6 Packet</a></h1>
+<p id="rfc.section.B.6.p.1">CMD_VALUE_SET(PROP_STREAM_NET) </p>
+<p>
+ <a id="CREF9" class="info">[CREF9]<span class="info">RQ: FIXME: This test vector is incomplete.</span></a>
+</p>
+<h1 id="rfc.appendix.B.7"><a href="#rfc.appendix.B.7">B.7.</a> <a href="#test-vector-fetch-list-of-onmesh-networks" id="test-vector-fetch-list-of-onmesh-networks">Test Vector: Fetch list of on-mesh networks</a></h1>
+<p/>
+
+<ul>
+ <li>NLI: 0</li>
+ <li>TID: 4</li>
+ <li>CMD: 2 (<samp>CMD_VALUE_GET</samp>)</li>
+ <li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.B.7.p.2">Frame: </p>
+<pre>
+84 02 5A
+</pre>
+<h1 id="rfc.appendix.B.8"><a href="#rfc.appendix.B.8">B.8.</a> <a href="#test-vector-returned-list-of-onmesh-networks" id="test-vector-returned-list-of-onmesh-networks">Test Vector: Returned list of on-mesh networks</a></h1>
+<p/>
+
+<ul>
+ <li>NLI: 0</li>
+ <li>TID: 4</li>
+ <li>CMD: 6 (<samp>CMD_VALUE_IS</samp>)</li>
+ <li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
+ <li>VALUE: Array of structures, encoded as <samp>A(t(6CbC))</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">IPv6 Prefix</th>
+ <th class="center">Prefix Length</th>
+ <th class="center">Stable Flag</th>
+ <th class="center">Other Flags</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">2001:DB8:1::</td>
+ <td class="center">64</td>
+ <td class="center">True</td>
+ <td class="center">??</td>
+ </tr>
+ <tr>
+ <td class="center">2001:DB8:2::</td>
+ <td class="center">64</td>
+ <td class="center">False</td>
+ <td class="center">??</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.B.8.p.2">Frame: </p>
+<pre>
+84 06 5A 13 00 20 01 0D B8 00 01 00 00 00 00 00 00 00 00 00
+00 40 01 ?? 13 00 20 01 0D B8 00 02 00 00 00 00 00 00 00 00
+00 00 40 00 ??
+</pre>
+<h1 id="rfc.appendix.B.9"><a href="#rfc.appendix.B.9">B.9.</a> <a href="#test-vector-adding-an-onmesh-network" id="test-vector-adding-an-onmesh-network">Test Vector: Adding an on-mesh network</a></h1>
+<p/>
+
+<ul>
+ <li>NLI: 0</li>
+ <li>TID: 5</li>
+ <li>CMD: 4 (<samp>CMD_VALUE_INSERT</samp>)</li>
+ <li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
+ <li>VALUE: Structure, encoded as <samp>6CbCb</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">IPv6 Prefix</th>
+ <th class="center">Prefix Length</th>
+ <th class="center">Stable Flag</th>
+ <th class="center">Other Flags</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">2001:DB8:3::</td>
+ <td class="center">64</td>
+ <td class="center">True</td>
+ <td class="center">??</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.B.9.p.2">Frame: </p>
+<pre>
+85 03 5A 20 01 0D B8 00 03 00 00 00 00 00 00 00 00 00 00 40
+01 ?? 01
+</pre>
+<p>
+ <a id="CREF10" class="info">[CREF10]<span class="info">RQ: FIXME: This test vector is incomplete.</span></a>
+</p>
+<h1 id="rfc.appendix.B.10"><a href="#rfc.appendix.B.10">B.10.</a> <a href="#test-vector-insertion-notification-of-an-onmesh-network" id="test-vector-insertion-notification-of-an-onmesh-network">Test Vector: Insertion notification of an on-mesh network</a></h1>
+<p/>
+
+<ul>
+ <li>NLI: 0</li>
+ <li>TID: 5</li>
+ <li>CMD: 7 (<samp>CMD_VALUE_INSERTED</samp>)</li>
+ <li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
+ <li>VALUE: Structure, encoded as <samp>6CbCb</samp></li>
+</ul>
+
+<p> </p>
+<table cellpadding="3" cellspacing="0" class="tt full center">
+ <thead>
+ <tr>
+ <th class="center">IPv6 Prefix</th>
+ <th class="center">Prefix Length</th>
+ <th class="center">Stable Flag</th>
+ <th class="center">Other Flags</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="center">2001:DB8:3::</td>
+ <td class="center">64</td>
+ <td class="center">True</td>
+ <td class="center">??</td>
+ </tr>
+ </tbody>
+</table>
+<p id="rfc.section.B.10.p.2">Frame: </p>
+<pre>
+85 07 5A 20 01 0D B8 00 03 00 00 00 00 00 00 00 00 00 00 40
+01 ?? 01
+</pre>
+<p>
+ <a id="CREF11" class="info">[CREF11]<span class="info">RQ: FIXME: This test vector is incomplete.</span></a>
+</p>
+<h1 id="rfc.appendix.B.11"><a href="#rfc.appendix.B.11">B.11.</a> <a href="#test-vector-removing-a-local-onmesh-network" id="test-vector-removing-a-local-onmesh-network">Test Vector: Removing a local on-mesh network</a></h1>
+<p/>
+
+<ul>
+ <li>NLI: 0</li>
+ <li>TID: 6</li>
+ <li>CMD: 5 (<samp>CMD_VALUE_REMOVE</samp>)</li>
+ <li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
+ <li>VALUE: IPv6 Prefix <samp>2001:DB8:3::</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.B.11.p.2">Frame: </p>
+<pre>
+86 05 5A 20 01 0D B8 00 03 00 00 00 00 00 00 00 00 00 00
+</pre>
+<h1 id="rfc.appendix.B.12"><a href="#rfc.appendix.B.12">B.12.</a> <a href="#test-vector-removal-notification-of-an-onmesh-network" id="test-vector-removal-notification-of-an-onmesh-network">Test Vector: Removal notification of an on-mesh network</a></h1>
+<p/>
+
+<ul>
+ <li>NLI: 0</li>
+ <li>TID: 6</li>
+ <li>CMD: 8 (<samp>CMD_VALUE_REMOVED</samp>)</li>
+ <li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
+ <li>VALUE: IPv6 Prefix <samp>2001:DB8:3::</samp></li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.B.12.p.2">Frame: </p>
+<pre>
+86 08 5A 20 01 0D B8 00 03 00 00 00 00 00 00 00 00 00 00
+</pre>
+<h1 id="rfc.appendix.C"><a href="#rfc.appendix.C">Appendix C.</a> <a href="#example-sessions" id="example-sessions">Example Sessions</a></h1>
+<h1 id="rfc.appendix.C.1"><a href="#rfc.appendix.C.1">C.1.</a> <a href="#ncp-initialization" id="ncp-initialization">NCP Initialization</a></h1>
+<p>
+ <a id="CREF12" class="info">[CREF12]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
+</p>
+<p id="rfc.section.C.1.p.2">Check the protocol version to see if it is supported: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_GET:PROP_PROTOCOL_VERSION</li>
+ <li>CMD_VALUE_IS:PROP_PROTOCOL_VERSION</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.1.p.4">Check the NCP version to see if a firmware update may be necessary: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_GET:PROP_NCP_VERSION</li>
+ <li>CMD_VALUE_IS:PROP_NCP_VERSION</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.1.p.6">Check interface type to make sure that it is what we expect: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_GET:PROP_INTERFACE_TYPE</li>
+ <li>CMD_VALUE_IS:PROP_INTERFACE_TYPE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.1.p.8">If the host supports using vendor-specific commands, the vendor should be verified before using them: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_GET:PROP_VENDOR_ID</li>
+ <li>CMD_VALUE_IS:PROP_VENDOR_ID</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.1.p.10">Fetch the capability list so that we know what features this NCP supports: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_GET:PROP_CAPS</li>
+ <li>CMD_VALUE_IS:PROP_CAPS</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.1.p.12">If the NCP supports CAP_NET_SAVE, then we go ahead and recall the network: </p>
+<p/>
+
+<ul>
+ <li>CMD_NET_RECALL</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.appendix.C.2"><a href="#rfc.appendix.C.2">C.2.</a> <a href="#attaching-to-a-network" id="attaching-to-a-network">Attaching to a network</a></h1>
+<p>
+ <a id="CREF13" class="info">[CREF13]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
+</p>
+<p id="rfc.section.C.2.p.2">We make the assumption that the NCP is not currently associated with a network. </p>
+<p id="rfc.section.C.2.p.3">Set the network properties, if they were not already set: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_PHY_CHAN</li>
+ <li>CMD_VALUE_IS:PROP_PHY_CHAN</li>
+ <li>CMD_VALUE_SET:PROP_NET_XPANID</li>
+ <li>CMD_VALUE_IS:PROP_NET_XPANID</li>
+ <li>CMD_VALUE_SET:PROP_MAC_15_4_PANID</li>
+ <li>CMD_VALUE_IS:PROP_MAC_15_4_PANID</li>
+ <li>CMD_VALUE_SET:PROP_NET_NETWORK_NAME</li>
+ <li>CMD_VALUE_IS:PROP_NET_NETWORK_NAME</li>
+ <li>CMD_VALUE_SET:PROP_NET_MASTER_KEY</li>
+ <li>CMD_VALUE_IS:PROP_NET_MASTER_KEY</li>
+ <li>CMD_VALUE_SET:PROP_NET_KEY_SEQUENCE_COUNTER</li>
+ <li>CMD_VALUE_IS:PROP_NET_KEY_SEQUENCE_COUNTER</li>
+ <li>CMD_VALUE_SET:PROP_NET_KEY_SWITCH_GUARDTIME</li>
+ <li>CMD_VALUE_IS:PROP_NET_KEY_SWITCH_GUARDTIME</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.2.p.5">Bring the network interface up: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_NET_IF_UP:TRUE</li>
+ <li>CMD_VALUE_IS:PROP_NET_IF_UP:TRUE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.2.p.7">Bring the routing stack up: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_NET_STACK_UP:TRUE</li>
+ <li>CMD_VALUE_IS:PROP_NET_STACK_UP:TRUE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.2.p.9">Some asynchronous events from the NCP: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_IS:PROP_NET_ROLE</li>
+ <li>CMD_VALUE_IS:PROP_NET_PARTITION_ID</li>
+ <li>CMD_VALUE_IS:PROP_THREAD_ON_MESH_NETS</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.appendix.C.3"><a href="#rfc.appendix.C.3">C.3.</a> <a href="#successfully-joining-a-preexisting-network" id="successfully-joining-a-preexisting-network">Successfully joining a pre-existing network</a></h1>
+<p>
+ <a id="CREF14" class="info">[CREF14]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
+</p>
+<p id="rfc.section.C.3.p.2">This example session is identical to the above session up to the point where we set PROP_NET_IF_UP to true. From there, the behavior changes. </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_NET_REQUIRE_JOIN_EXISTING:TRUE</li>
+ <li>CMD_VALUE_IS:PROP_NET_REQUIRE_JOIN_EXISTING:TRUE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.3.p.4">Bring the routing stack up: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_NET_STACK_UP:TRUE</li>
+ <li>CMD_VALUE_IS:PROP_NET_STACK_UP:TRUE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.3.p.6">Some asynchronous events from the NCP: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_IS:PROP_NET_ROLE</li>
+ <li>CMD_VALUE_IS:PROP_NET_PARTITION_ID</li>
+ <li>CMD_VALUE_IS:PROP_THREAD_ON_MESH_NETS</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.3.p.8">Now let's save the network settings to NVRAM: </p>
+<p/>
+
+<ul>
+ <li>CMD_NET_SAVE</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.appendix.C.4"><a href="#rfc.appendix.C.4">C.4.</a> <a href="#unsuccessfully-joining-a-preexisting-network" id="unsuccessfully-joining-a-preexisting-network">Unsuccessfully joining a pre-existing network</a></h1>
+<p id="rfc.section.C.4.p.1">This example session is identical to the above session up to the point where we set PROP_NET_IF_UP to true. From there, the behavior changes. </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_NET_REQUIRE_JOIN_EXISTING:TRUE</li>
+ <li>CMD_VALUE_IS:PROP_NET_REQUIRE_JOIN_EXISTING:TRUE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.4.p.3">Bring the routing stack up: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_NET_STACK_UP:TRUE</li>
+ <li>CMD_VALUE_IS:PROP_NET_STACK_UP:TRUE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.4.p.5">Some asynchronous events from the NCP: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_IS:PROP_LAST_STATUS:STATUS_JOIN_NO_PEERS</li>
+ <li>CMD_VALUE_IS:PROP_NET_STACK_UP:FALSE</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.appendix.C.5"><a href="#rfc.appendix.C.5">C.5.</a> <a href="#detaching-from-a-network" id="detaching-from-a-network">Detaching from a network</a></h1>
+<p id="rfc.section.C.5.p.1">TBD </p>
+<h1 id="rfc.appendix.C.6"><a href="#rfc.appendix.C.6">C.6.</a> <a href="#attaching-to-a-saved-network" id="attaching-to-a-saved-network">Attaching to a saved network</a></h1>
+<p>
+ <a id="CREF15" class="info">[CREF15]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
+</p>
+<p id="rfc.section.C.6.p.2">Recall the saved network if you haven't already done so: </p>
+<p/>
+
+<ul>
+ <li>CMD_NET_RECALL</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.6.p.4">Bring the network interface up: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_NET_IF_UP:TRUE</li>
+ <li>CMD_VALUE_IS:PROP_NET_IF_UP:TRUE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.6.p.6">Bring the routing stack up: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_NET_STACK_UP:TRUE</li>
+ <li>CMD_VALUE_IS:PROP_NET_STACK_UP:TRUE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.6.p.8">Some asynchronous events from the NCP: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_IS:PROP_NET_ROLE</li>
+ <li>CMD_VALUE_IS:PROP_NET_PARTITION_ID</li>
+ <li>CMD_VALUE_IS:PROP_THREAD_ON_MESH_NETS</li>
+</ul>
+
+<p> </p>
+<h1 id="rfc.appendix.C.7"><a href="#rfc.appendix.C.7">C.7.</a> <a href="#ncp-software-reset" id="ncp-software-reset">NCP Software Reset</a></h1>
+<p>
+ <a id="CREF16" class="info">[CREF16]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
+</p>
+<p/>
+
+<ul>
+ <li>CMD_RESET</li>
+ <li>CMD_VALUE_IS:PROP_LAST_STATUS:STATUS_RESET_SOFTWARE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.7.p.3">Then jump to <a href="#ncp-initialization">Appendix C.1</a>. </p>
+<h1 id="rfc.appendix.C.8"><a href="#rfc.appendix.C.8">C.8.</a> <a href="#adding-an-onmesh-prefix" id="adding-an-onmesh-prefix">Adding an on-mesh prefix</a></h1>
+<p id="rfc.section.C.8.p.1">TBD </p>
+<h1 id="rfc.appendix.C.9"><a href="#rfc.appendix.C.9">C.9.</a> <a href="#entering-lowpower-modes" id="entering-lowpower-modes">Entering low-power modes</a></h1>
+<p id="rfc.section.C.9.p.1">TBD </p>
+<h1 id="rfc.appendix.C.10"><a href="#rfc.appendix.C.10">C.10.</a> <a href="#sniffing-raw-packets" id="sniffing-raw-packets">Sniffing raw packets</a></h1>
+<p>
+ <a id="CREF17" class="info">[CREF17]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
+</p>
+<p id="rfc.section.C.10.p.2">This assumes that the NCP has been initialized. </p>
+<p id="rfc.section.C.10.p.3">Optionally set the channel: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_PHY_CHAN:x</li>
+ <li>CMD_VALUE_IS:PROP_PHY_CHAN</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.10.p.5">Set the filter mode: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_MAC_PROMISCUOUS_MODE:MAC_PROMISCUOUS_MODE_MONITOR</li>
+ <li>CMD_VALUE_IS:PROP_MAC_PROMISCUOUS_MODE:MAC_PROMISCUOUS_MODE_MONITOR</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.10.p.7">Enable the raw stream: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_MAC_RAW_STREAM_ENABLED:TRUE</li>
+ <li>CMD_VALUE_IS:PROP_MAC_RAW_STREAM_ENABLED:TRUE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.10.p.9">Enable the PHY directly: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_SET:PROP_PHY_ENABLED:TRUE</li>
+ <li>CMD_VALUE_IS:PROP_PHY_ENABLED:TRUE</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.10.p.11">Now we will get raw 802.15.4 packets asynchronously on PROP_STREAM_RAW: </p>
+<p/>
+
+<ul>
+ <li>CMD_VALUE_IS:PROP_STREAM_RAW:...</li>
+ <li>CMD_VALUE_IS:PROP_STREAM_RAW:...</li>
+ <li>CMD_VALUE_IS:PROP_STREAM_RAW:...</li>
+</ul>
+
+<p> </p>
+<p id="rfc.section.C.10.p.13">This mode may be entered even when associated with a network. In that case, you should set <samp>PROP_MAC_PROMISCUOUS_MODE</samp> to <samp>MAC_PROMISCUOUS_MODE_PROMISCUOUS</samp> or <samp>MAC_PROMISCUOUS_MODE_NORMAL</samp>, so that you can avoid receiving packets from other networks or that are destined for other nodes. </p>
+<h1 id="rfc.appendix.D"><a href="#rfc.appendix.D">Appendix D.</a> <a href="#glossary" id="glossary">Glossary</a></h1>
+<p>
+ <a id="CREF18" class="info">[CREF18]<span class="info">RQ: Alphabetize before finalization.</span></a>
+</p>
+<p/>
+
+<dl>
+ <dt>FCS</dt>
+ <dd style="margin-left: 8"><br/> Final Checksum. Bytes added to the end of a packet to help determine if the packet was received without corruption.</dd>
+ <dt>NCP</dt>
+ <dd style="margin-left: 8"><br/> Network Control Processor.</dd>
+ <dt>NLI</dt>
+ <dd style="margin-left: 8"><br/> Network Link Identifier. May be a value between zero and three. See <a href="#nli-network-link-identifier">Section 2.1.2</a> for more information.</dd>
+ <dt>OS</dt>
+ <dd style="margin-left: 8"><br/> Operating System, i.e. the IPv6 node using Spinel to control and manage one or more of its IPv6 network interfaces.</dd>
+ <dt>PHY</dt>
+ <dd style="margin-left: 8"><br/> Physical layer. Refers to characteristics and parameters related to the physical implementation and operation of a networking medium.</dd>
+ <dt>PUI</dt>
+ <dd style="margin-left: 8"><br/> Packed Unsigned Integer. A way to serialize an unsigned integer using one, two, or three bytes. Used throughout the Spinel protocol. See <a href="#packed-unsigned-integer">Section 3.2</a> for more information.</dd>
+ <dt>TID</dt>
+ <dd style="margin-left: 8"><br/> Transaction Identifier. May be a value between zero and fifteen. See <a href="#tid-transaction-identifier">Section 2.1.3</a> for more information.</dd>
+</dl>
+
+<p> </p>
+<h1 id="rfc.appendix.E"><a href="#rfc.appendix.E">Appendix E.</a> <a href="#acknowledgments" id="acknowledgments">Acknowledgments</a></h1>
+<p id="rfc.section.E.p.1">Thread is a registered trademark of The Thread Group, Inc. </p>
+<p id="rfc.section.E.p.2">Special thanks to Nick Banks, Jonathan Hui, Abtin Keshavarzian, Yakun Xu, Piotr Szkotak, Arjuna Sivasithambaresan and Martin Turon for their substantial contributions and feedback related to this document. </p>
+<p id="rfc.section.E.p.3">This document was prepared using <a href="https://github.com/miekg/mmark">mmark</a> by (Miek Gieben) and <a href="http://xml2rfc.ietf.org/">xml2rfc (version 2)</a>. </p>
+<h1 id="rfc.authors">
+ <a href="#rfc.authors">Authors' Addresses</a>
+</h1>
+<div class="avoidbreak">
+ <address class="vcard">
+ <span class="vcardline">
+ <span class="fn">Robert S. Quattlebaum</span>
+ <span class="n hidden">
+ <span class="family-name">Quattlebaum</span>
+ </span>
+ </span>
+ <span class="org vcardline">Nest Labs, Inc.</span>
+ <span class="adr">
+ <span class="vcardline">3400 Hillview Ave.</span>
+
+ <span class="vcardline">
+ <span class="locality">Palo Alto</span>,
+ <span class="region">California</span>
+ <span class="code">94304</span>
+ </span>
+ <span class="country-name vcardline">USA</span>
+ </span>
+ <span class="vcardline">EMail: <a href="mailto:rquattle@nestlabs.com">rquattle@nestlabs.com</a></span>
+
+ </address>
+</div><div class="avoidbreak">
+ <address class="vcard">
+ <span class="vcardline">
+ <span class="fn">James Woodyatt</span> (editor)
+ <span class="n hidden">
+ <span class="family-name">Woodyatt</span>
+ </span>
+ </span>
+ <span class="org vcardline">Nest Labs, Inc.</span>
+ <span class="adr">
+ <span class="vcardline">3400 Hillview Ave.</span>
+
+ <span class="vcardline">
+ <span class="locality">Palo Alto</span>,
+ <span class="region">California</span>
+ <span class="code">94304</span>
+ </span>
+ <span class="country-name vcardline">USA</span>
+ </span>
+ <span class="vcardline">EMail: <a href="mailto:jhw@nestlabs.com">jhw@nestlabs.com</a></span>
+
+ </address>
+</div>
+
+</body>
+</html>
diff --git a/doc/draft-rquattle-spinel-unified.txt b/doc/draft-rquattle-spinel-unified.txt
new file mode 100644
index 0000000..1db873e
--- /dev/null
+++ b/doc/draft-rquattle-spinel-unified.txt
@@ -0,0 +1,4648 @@
+
+
+
+
+Network Working Group R. Quattlebaum
+Internet-Draft J. Woodyatt, Ed.
+Intended status: Informational Nest Labs, Inc.
+Expires: December 24, 2017 June 22, 2017
+
+
+ Spinel Host-Controller Protocol
+ draft-rquattle-spinel-unified-ab5628a5
+
+Abstract
+
+ This document describes the Spinel protocol, which facilitates the
+ control and management of IPv6 network interfaces on devices where
+ general purpose application processors offload network functions at
+ their interfaces to network co-processors (NCP) connected by simple
+ communication links like serial data channels. While initially
+ developed to support Thread(R), Spinel's layered design allows it to
+ be easily adapted to other similar network technologies.
+
+ This document also describes various Spinel specializations,
+ including support for the Thread(R) low-power mesh network
+ technology.
+
+Status of This Memo
+
+ This Internet-Draft is submitted in full conformance with the
+ provisions of BCP 78 and BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF). Note that other groups may also distribute
+ working documents as Internet-Drafts. The list of current Internet-
+ Drafts is at http://datatracker.ietf.org/drafts/current/.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ time. It is inappropriate to use Internet-Drafts as reference
+ material or to cite them other than as "work in progress."
+
+ This Internet-Draft will expire on December 24, 2017.
+
+Copyright Notice
+
+ Copyright (c) 2017 IETF Trust and the persons identified as the
+ document authors. All rights reserved.
+
+ This document is subject to BCP 78 and the IETF Trust's Legal
+ Provisions Relating to IETF Documents
+ (http://trustee.ietf.org/license-info) in effect on the date of
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 1]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ publication of this document. Please review these documents
+ carefully, as they describe your rights and restrictions with respect
+ to this document. Code Components extracted from this document must
+ include Simplified BSD License text as described in Section 4.e of
+ the Trust Legal Provisions and are provided without warranty as
+ described in the Simplified BSD License.
+
+ This document may not be modified, and derivative works of it may not
+ be created, and it may not be published except as an Internet-Draft.
+
+Table of Contents
+
+ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 7
+ 1.1. About this Draft . . . . . . . . . . . . . . . . . . . . 7
+ 1.1.1. Scope . . . . . . . . . . . . . . . . . . . . . . . . 7
+ 1.1.2. Renumbering . . . . . . . . . . . . . . . . . . . . . 7
+ 2. Frame Format . . . . . . . . . . . . . . . . . . . . . . . . 8
+ 2.1. Header Format . . . . . . . . . . . . . . . . . . . . . . 8
+ 2.1.1. FLG: Flag . . . . . . . . . . . . . . . . . . . . . . 9
+ 2.1.2. NLI: Network Link Identifier . . . . . . . . . . . . 9
+ 2.1.3. TID: Transaction Identifier . . . . . . . . . . . . . 9
+ 2.1.4. Command Identifier (CMD) . . . . . . . . . . . . . . 9
+ 2.1.5. Command Payload (Optional) . . . . . . . . . . . . . 10
+ 3. Data Packing . . . . . . . . . . . . . . . . . . . . . . . . 10
+ 3.1. Primitive Types . . . . . . . . . . . . . . . . . . . . . 11
+ 3.2. Packed Unsigned Integer . . . . . . . . . . . . . . . . . 11
+ 3.3. Data Blobs . . . . . . . . . . . . . . . . . . . . . . . 12
+ 3.4. Structured Data . . . . . . . . . . . . . . . . . . . . . 13
+ 3.5. Arrays . . . . . . . . . . . . . . . . . . . . . . . . . 13
+ 4. Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 14
+ 4.1. CMD 0: (Host->NCP) CMD_NOOP . . . . . . . . . . . . . . . 14
+ 4.2. CMD 1: (Host->NCP) CMD_RESET . . . . . . . . . . . . . . 14
+ 4.3. CMD 2: (Host->NCP) CMD_PROP_VALUE_GET . . . . . . . . . . 14
+ 4.4. CMD 3: (Host->NCP) CMD_PROP_VALUE_SET . . . . . . . . . . 15
+ 4.5. CMD 4: (Host->NCP) CMD_PROP_VALUE_INSERT . . . . . . . . 15
+ 4.6. CMD 5: (Host->NCP) CMD_PROP_VALUE_REMOVE . . . . . . . . 16
+ 4.7. CMD 6: (NCP->Host) CMD_PROP_VALUE_IS . . . . . . . . . . 17
+ 4.8. CMD 7: (NCP->Host) CMD_PROP_VALUE_INSERTED . . . . . . . 17
+ 4.9. CMD 8: (NCP->Host) CMD_PROP_VALUE_REMOVED . . . . . . . . 18
+ 4.10. CMD 18: (Host->NCP) CMD_PEEK . . . . . . . . . . . . . . 18
+ 4.11. CMD 19: (NCP->Host) CMD_PEEK_RET . . . . . . . . . . . . 19
+ 4.12. CMD 20: (Host->NCP) CMD_POKE . . . . . . . . . . . . . . 19
+ 4.13. CMD 21: (Host->NCP) CMD_PROP_VALUE_MULTI_GET . . . . . . 19
+ 4.14. CMD 22: (Host->NCP) CMD_PROP_VALUE_MULTI_SET . . . . . . 20
+ 4.15. CMD 23: (NCP->Host) CMD_PROP_VALUES_ARE . . . . . . . . . 21
+ 5. Properties . . . . . . . . . . . . . . . . . . . . . . . . . 21
+ 5.1. Property Methods . . . . . . . . . . . . . . . . . . . . 22
+ 5.2. Property Types . . . . . . . . . . . . . . . . . . . . . 22
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 2]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ 5.2.1. Single-Value Properties . . . . . . . . . . . . . . . 22
+ 5.2.2. Multiple-Value Properties . . . . . . . . . . . . . . 23
+ 5.2.3. Stream Properties . . . . . . . . . . . . . . . . . . 23
+ 5.3. Property Numbering . . . . . . . . . . . . . . . . . . . 24
+ 5.4. Property Sections . . . . . . . . . . . . . . . . . . . . 24
+ 5.5. Core Properties . . . . . . . . . . . . . . . . . . . . . 25
+ 5.5.1. PROP 0: PROP_LAST_STATUS . . . . . . . . . . . . . . 25
+ 5.5.2. PROP 1: PROP_PROTOCOL_VERSION . . . . . . . . . . . . 25
+ 5.5.3. PROP 2: PROP_NCP_VERSION . . . . . . . . . . . . . . 26
+ 5.5.4. PROP 3: PROP_INTERFACE_TYPE . . . . . . . . . . . . . 27
+ 5.5.5. PROP 4: PROP_INTERFACE_VENDOR_ID . . . . . . . . . . 27
+ 5.5.6. PROP 5: PROP_CAPS . . . . . . . . . . . . . . . . . . 27
+ 5.5.7. PROP 6: PROP_INTERFACE_COUNT . . . . . . . . . . . . 29
+ 5.5.8. PROP 7: PROP_POWER_STATE . . . . . . . . . . . . . . 29
+ 5.5.9. PROP 8: PROP_HWADDR . . . . . . . . . . . . . . . . . 30
+ 5.5.10. PROP 9: PROP_LOCK . . . . . . . . . . . . . . . . . . 30
+ 5.5.11. PROP 10: PROP_HOST_POWER_STATE . . . . . . . . . . . 31
+ 5.5.12. PROP 4104: PROP_UNSOL_UPDATE_FILTER . . . . . . . . . 32
+ 5.5.13. PROP 4105: PROP_UNSOL_UPDATE_LIST . . . . . . . . . . 33
+ 5.6. Stream Properties . . . . . . . . . . . . . . . . . . . . 33
+ 5.6.1. PROP 112: PROP_STREAM_DEBUG . . . . . . . . . . . . . 33
+ 5.6.2. PROP 113: PROP_STREAM_RAW . . . . . . . . . . . . . . 34
+ 5.6.3. PROP 114: PROP_STREAM_NET . . . . . . . . . . . . . . 36
+ 5.6.4. PROP 115: PROP_STREAM_NET_INSECURE . . . . . . . . . 37
+ 5.7. PHY Properties . . . . . . . . . . . . . . . . . . . . . 37
+ 5.7.1. PROP 32: PROP_PHY_ENABLED . . . . . . . . . . . . . . 37
+ 5.7.2. PROP 33: PROP_PHY_CHAN . . . . . . . . . . . . . . . 37
+ 5.7.3. PROP 34: PROP_PHY_CHAN_SUPPORTED . . . . . . . . . . 38
+ 5.7.4. PROP 35: PROP_PHY_FREQ . . . . . . . . . . . . . . . 38
+ 5.7.5. PROP 36: PROP_PHY_CCA_THRESHOLD . . . . . . . . . . . 38
+ 5.7.6. PROP 37: PROP_PHY_TX_POWER . . . . . . . . . . . . . 38
+ 5.7.7. PROP 38: PROP_PHY_RSSI . . . . . . . . . . . . . . . 38
+ 5.7.8. PROP 39: PROP_PHY_RX_SENSITIVITY . . . . . . . . . . 39
+ 5.8. MAC Properties . . . . . . . . . . . . . . . . . . . . . 39
+ 5.8.1. PROP 48: PROP_MAC_SCAN_STATE . . . . . . . . . . . . 39
+ 5.8.2. PROP 49: PROP_MAC_SCAN_MASK . . . . . . . . . . . . . 39
+ 5.8.3. PROP 50: PROP_MAC_SCAN_PERIOD . . . . . . . . . . . . 39
+ 5.8.4. PROP 51: PROP_MAC_SCAN_BEACON . . . . . . . . . . . . 40
+ 5.8.5. PROP 52: PROP_MAC_15_4_LADDR . . . . . . . . . . . . 40
+ 5.8.6. PROP 53: PROP_MAC_15_4_SADDR . . . . . . . . . . . . 41
+ 5.8.7. PROP 54: PROP_MAC_15_4_PANID . . . . . . . . . . . . 41
+ 5.8.8. PROP 55: PROP_MAC_RAW_STREAM_ENABLED . . . . . . . . 41
+ 5.8.9. PROP 56: PROP_MAC_PROMISCUOUS_MODE . . . . . . . . . 41
+ 5.8.10. PROP 57: PROP_MAC_ENERGY_SCAN_RESULT . . . . . . . . 42
+ 5.8.11. PROP 4864: PROP_MAC_WHITELIST . . . . . . . . . . . . 42
+ 5.8.12. PROP 4865: PROP_MAC_WHITELIST_ENABLED . . . . . . . . 42
+ 5.8.13. PROP 4867: SPINEL_PROP_MAC_SRC_MATCH_ENABLED . . . . 42
+ 5.8.14. PROP 4868: SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES 42
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 3]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ 5.8.15. PROP 4869:
+ SPINEL_PROP_MAC_SRC_MATCH_EXTENDED_ADDRESSES . . . . 43
+ 5.8.16. PROP 4870: PROP_MAC_BLACKLIST . . . . . . . . . . . . 43
+ 5.8.17. PROP 4871: PROP_MAC_BLACKLIST_ENABLED . . . . . . . . 43
+ 5.9. NET Properties . . . . . . . . . . . . . . . . . . . . . 43
+ 5.9.1. PROP 64: PROP_NET_SAVED . . . . . . . . . . . . . . . 43
+ 5.9.2. PROP 65: PROP_NET_IF_UP . . . . . . . . . . . . . . . 44
+ 5.9.3. PROP 66: PROP_NET_STACK_UP . . . . . . . . . . . . . 44
+ 5.9.4. PROP 67: PROP_NET_ROLE . . . . . . . . . . . . . . . 44
+ 5.9.5. PROP 68: PROP_NET_NETWORK_NAME . . . . . . . . . . . 44
+ 5.9.6. PROP 69: PROP_NET_XPANID . . . . . . . . . . . . . . 44
+ 5.9.7. PROP 70: PROP_NET_MASTER_KEY . . . . . . . . . . . . 44
+ 5.9.8. PROP 71: PROP_NET_KEY_SEQUENCE_COUNTER . . . . . . . 45
+ 5.9.9. PROP 72: PROP_NET_PARTITION_ID . . . . . . . . . . . 45
+ 5.9.10. PROP 73: PROP_NET_REQUIRE_JOIN_EXISTING . . . . . . . 45
+ 5.9.11. PROP 74: PROP_NET_KEY_SWITCH_GUARDTIME . . . . . . . 45
+ 5.9.12. PROP 75: PROP_NET_PSKC . . . . . . . . . . . . . . . 45
+ 5.10. IPv6 Properties . . . . . . . . . . . . . . . . . . . . . 45
+ 5.10.1. PROP 96: PROP_IPV6_LL_ADDR . . . . . . . . . . . . . 45
+ 5.10.2. PROP 97: PROP_IPV6_ML_ADDR . . . . . . . . . . . . . 45
+ 5.10.3. PROP 98: PROP_IPV6_ML_PREFIX . . . . . . . . . . . . 45
+ 5.10.4. PROP 99: PROP_IPV6_ADDRESS_TABLE . . . . . . . . . . 46
+ 5.10.5. PROP 101: PROP_IPv6_ICMP_PING_OFFLOAD . . . . . . . 46
+ 5.11. Debug Properties . . . . . . . . . . . . . . . . . . . . 46
+ 5.11.1. PROP 16384: PROP_DEBUG_TEST_ASSERT . . . . . . . . . 46
+ 5.11.2. PROP 16385: PROP_DEBUG_NCP_LOG_LEVEL . . . . . . . . 46
+ 6. Status Codes . . . . . . . . . . . . . . . . . . . . . . . . 47
+ 7. Technology: Thread(R) . . . . . . . . . . . . . . . . . . . . 48
+ 7.1. Capabilities . . . . . . . . . . . . . . . . . . . . . . 49
+ 7.2. Properties . . . . . . . . . . . . . . . . . . . . . . . 49
+ 7.2.1. PROP 80: PROP_THREAD_LEADER_ADDR . . . . . . . . . . 49
+ 7.2.2. PROP 81: PROP_THREAD_PARENT . . . . . . . . . . . . . 49
+ 7.2.3. PROP 82: PROP_THREAD_CHILD_TABLE . . . . . . . . . . 49
+ 7.2.4. PROP 83: PROP_THREAD_LEADER_RID . . . . . . . . . . . 50
+ 7.2.5. PROP 84: PROP_THREAD_LEADER_WEIGHT . . . . . . . . . 50
+ 7.2.6. PROP 85: PROP_THREAD_LOCAL_LEADER_WEIGHT . . . . . . 50
+ 7.2.7. PROP 86: PROP_THREAD_NETWORK_DATA . . . . . . . . . . 50
+ 7.2.8. PROP 87: PROP_THREAD_NETWORK_DATA_VERSION . . . . . . 50
+ 7.2.9. PROP 88: PROP_THREAD_STABLE_NETWORK_DATA . . . . . . 50
+ 7.2.10. PROP 89: PROP_THREAD_STABLE_NETWORK_DATA_VERSION . . 50
+ 7.2.11. PROP 90: PROP_THREAD_ON_MESH_NETS . . . . . . . . . . 51
+ 7.2.12. PROP 91: PROP_THREAD_OFF_MESH_ROUTES . . . . . . . . 51
+ 7.2.13. PROP 92: PROP_THREAD_ASSISTING_PORTS . . . . . . . . 51
+ 7.2.14. PROP 93: PROP_THREAD_ALLOW_LOCAL_NET_DATA_CHANGE . . 51
+ 7.2.15. PROP 94: PROP_THREAD_MODE . . . . . . . . . . . . . . 52
+ 7.2.16. PROP 5376: PROP_THREAD_CHILD_TIMEOUT . . . . . . . . 52
+ 7.2.17. PROP 5377: PROP_THREAD_RLOC16 . . . . . . . . . . . . 52
+ 7.2.18. PROP 5378: PROP_THREAD_ROUTER_UPGRADE_THRESHOLD . . . 52
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 4]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ 7.2.19. PROP 5379: PROP_THREAD_CONTEXT_REUSE_DELAY . . . . . 52
+ 7.2.20. PROP 5380: PROP_THREAD_NETWORK_ID_TIMEOUT . . . . . . 52
+ 7.2.21. PROP 5381: PROP_THREAD_ACTIVE_ROUTER_IDS . . . . . . 52
+ 7.2.22. PROP 5382: PROP_THREAD_RLOC16_DEBUG_PASSTHRU . . . . 53
+ 7.2.23. PROP 5383: PROP_THREAD_ROUTER_ROLE_ENABLED . . . . . 53
+ 7.2.24. PROP 5384: PROP_THREAD_ROUTER_DOWNGRADE_THRESHOLD . . 53
+ 7.2.25. PROP 5385: PROP_THREAD_ROUTER_SELECTION_JITTER . . . 53
+ 7.2.26. PROP 5386: PROP_THREAD_PREFERRED_ROUTER_ID . . . . . 53
+ 7.2.27. PROP 5387: PROP_THREAD_NEIGHBOR_TABLE . . . . . . . . 53
+ 7.2.28. PROP 5388: PROP_THREAD_CHILD_COUNT_MAX . . . . . . . 54
+ 7.2.29. PROP 5389: PROP_THREAD_LEADER_NETWORK_DATA . . . . . 54
+ 7.2.30. PROP 5390: PROP_THREAD_STABLE_LEADER_NETWORK_DATA . . 54
+ 7.2.31. PROP 5391: PROP_THREAD_JOINERS . . . . . . . . . . . 54
+ 7.2.32. PROP 5392: PROP_THREAD_COMMISSIONER_ENABLED . . . . . 55
+ 7.2.33. PROP 5393: PROP_THREAD_TMF_PROXY_ENABLED . . . . . . 55
+ 7.2.34. PROP 5394: PROP_THREAD_TMF_PROXY_STREAM . . . . . . . 55
+ 7.2.35. PROP 5395: PROP_THREAD_DISOVERY_SCAN_JOINER_FLAG . . 55
+ 7.2.36. PROP 5396:
+ PROP_THREAD_DISCOVERY_SCAN_ENABLE_FILTERING . . . . . 56
+ 7.2.37. PROP 5397: PROP_THREAD_DISCOVERY_SCAN_PANID . . . . . 56
+ 7.2.38. PROP 5398: PROP_THREAD_STEERING_DATA . . . . . . . . 56
+ 8. Feature: Network Save . . . . . . . . . . . . . . . . . . . . 56
+ 8.1. Commands . . . . . . . . . . . . . . . . . . . . . . . . 57
+ 8.1.1. CMD 9: (Host->NCP) CMD_NET_SAVE . . . . . . . . . . . 57
+ 8.1.2. CMD 10: (Host->NCP) CMD_NET_CLEAR . . . . . . . . . . 57
+ 8.1.3. CMD 11: (Host->NCP) CMD_NET_RECALL . . . . . . . . . 58
+ 9. Feature: Host Buffer Offload . . . . . . . . . . . . . . . . 58
+ 9.1. Commands . . . . . . . . . . . . . . . . . . . . . . . . 58
+ 9.1.1. CMD 12: (NCP->Host) CMD_HBO_OFFLOAD . . . . . . . . . 58
+ 9.1.2. CMD 13: (NCP->Host) CMD_HBO_RECLAIM . . . . . . . . . 59
+ 9.1.3. CMD 14: (NCP->Host) CMD_HBO_DROP . . . . . . . . . . 59
+ 9.1.4. CMD 15: (Host->NCP) CMD_HBO_OFFLOADED . . . . . . . . 59
+ 9.1.5. CMD 16: (Host->NCP) CMD_HBO_RECLAIMED . . . . . . . . 59
+ 9.1.6. CMD 17: (Host->NCP) CMD_HBO_DROPPED . . . . . . . . . 59
+ 9.2. Properties . . . . . . . . . . . . . . . . . . . . . . . 59
+ 9.2.1. PROP 10: PROP_HBO_MEM_MAX . . . . . . . . . . . . . . 59
+ 9.2.2. PROP 11: PROP_HBO_BLOCK_MAX . . . . . . . . . . . . . 60
+ 10. Feature: Jam Detection . . . . . . . . . . . . . . . . . . . 60
+ 10.1. Properties . . . . . . . . . . . . . . . . . . . . . . . 60
+ 10.1.1. PROP 4608: PROP_JAM_DETECT_ENABLE . . . . . . . . . 60
+ 10.1.2. PROP 4609: PROP_JAM_DETECTED . . . . . . . . . . . . 61
+ 10.1.3. PROP 4610: PROP_JAM_DETECT_RSSI_THRESHOLD . . . . . 61
+ 10.1.4. PROP 4611: PROP_JAM_DETECT_WINDOW . . . . . . . . . 61
+ 10.1.5. PROP 4612: PROP_JAM_DETECT_BUSY . . . . . . . . . . 62
+ 10.1.6. PROP 4613: PROP_JAM_DETECT_HISTORY_BITMAP . . . . . 62
+ 11. Feature: GPIO Access . . . . . . . . . . . . . . . . . . . . 62
+ 11.1. Properties . . . . . . . . . . . . . . . . . . . . . . . 63
+ 11.1.1. PROP 4096: PROP_GPIO_CONFIG . . . . . . . . . . . . 63
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 5]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ 11.1.2. PROP 4098: PROP_GPIO_STATE . . . . . . . . . . . . . 64
+ 11.1.3. PROP 4099: PROP_GPIO_STATE_SET . . . . . . . . . . . 64
+ 11.1.4. PROP 4100: PROP_GPIO_STATE_CLEAR . . . . . . . . . . 65
+ 12. Feature: True Random Number Generation . . . . . . . . . . . 65
+ 12.1. Properties . . . . . . . . . . . . . . . . . . . . . . . 65
+ 12.1.1. PROP 4101: PROP_TRNG_32 . . . . . . . . . . . . . . 65
+ 12.1.2. PROP 4102: PROP_TRNG_128 . . . . . . . . . . . . . . 66
+ 12.1.3. PROP 4103: PROP_TRNG_RAW_32 . . . . . . . . . . . . 66
+ 13. Security Considerations . . . . . . . . . . . . . . . . . . . 67
+ 13.1. Raw Application Access . . . . . . . . . . . . . . . . . 67
+ 14.1. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 67
+ Appendix A. Framing Protocol . . . . . . . . . . . . . . . . . . 67
+ A.1. UART Recommendations . . . . . . . . . . . . . . . . . . 67
+ A.1.1. UART Bit Rate Detection . . . . . . . . . . . . . . . 68
+ A.1.2. HDLC-Lite . . . . . . . . . . . . . . . . . . . . . . 68
+ A.2. SPI Recommendations . . . . . . . . . . . . . . . . . . . 69
+ A.2.1. SPI Framing Protocol . . . . . . . . . . . . . . . . 70
+ A.3. I^2C Recommendations . . . . . . . . . . . . . . . . . . 72
+ A.4. Native USB Recommendations . . . . . . . . . . . . . . . 72
+ Appendix B. Test Vectors . . . . . . . . . . . . . . . . . . . . 72
+ B.1. Test Vector: Packed Unsigned Integer . . . . . . . . . . 72
+ B.2. Test Vector: Reset Command . . . . . . . . . . . . . . . 72
+ B.3. Test Vector: Reset Notification . . . . . . . . . . . . . 73
+ B.4. Test Vector: Scan Beacon . . . . . . . . . . . . . . . . 73
+ B.5. Test Vector: Inbound IPv6 Packet . . . . . . . . . . . . 73
+ B.6. Test Vector: Outbound IPv6 Packet . . . . . . . . . . . . 74
+ B.7. Test Vector: Fetch list of on-mesh networks . . . . . . . 74
+ B.8. Test Vector: Returned list of on-mesh networks . . . . . 74
+ B.9. Test Vector: Adding an on-mesh network . . . . . . . . . 74
+ B.10. Test Vector: Insertion notification of an on-mesh network 75
+ B.11. Test Vector: Removing a local on-mesh network . . . . . . 75
+ B.12. Test Vector: Removal notification of an on-mesh network . 76
+ Appendix C. Example Sessions . . . . . . . . . . . . . . . . . . 76
+ C.1. NCP Initialization . . . . . . . . . . . . . . . . . . . 76
+ C.2. Attaching to a network . . . . . . . . . . . . . . . . . 77
+ C.3. Successfully joining a pre-existing network . . . . . . . 77
+ C.4. Unsuccessfully joining a pre-existing network . . . . . . 78
+ C.5. Detaching from a network . . . . . . . . . . . . . . . . 78
+ C.6. Attaching to a saved network . . . . . . . . . . . . . . 79
+ C.7. NCP Software Reset . . . . . . . . . . . . . . . . . . . 79
+ C.8. Adding an on-mesh prefix . . . . . . . . . . . . . . . . 79
+ C.9. Entering low-power modes . . . . . . . . . . . . . . . . 79
+ C.10. Sniffing raw packets . . . . . . . . . . . . . . . . . . 79
+ Appendix D. Glossary . . . . . . . . . . . . . . . . . . . . . . 80
+ Appendix E. Acknowledgments . . . . . . . . . . . . . . . . . . 81
+ Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 82
+
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 6]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+1. Introduction
+
+ Spinel is a host-controller protocol designed to enable
+ interoperation over simple serial connections between general purpose
+ device operating systems (OS) and network co-processors (NCP) for the
+ purpose of controlling and managing their IPv6 network interfaces,
+ achieving the following goals:
+
+ o Adopt a layered approach to the protocol design, allowing future
+ support for other network protocols.
+ o Minimize the number of required commands/methods by providing a
+ rich, property-based API.
+ o Support NCPs capable of being connected to more than one network
+ at a time.
+ o Gracefully handle the addition of new features and capabilities
+ without necessarily breaking backward compatibility.
+ o Be as minimal and light-weight as possible without unnecessarily
+ sacrificing flexibility.
+
+ On top of this core framework, we define the properties and commands
+ to enable various features and network protocols.
+
+1.1. About this Draft
+
+ This document is currently in a draft status and is changing often.
+ This section discusses some ideas for changes to the protocol that
+ haven't yet been fully specified, as well as some of the impetus for
+ the current design.
+
+1.1.1. Scope
+
+ The eventual intent is to have two documents: A Spinel basis document
+ which discusses the network-technology-agnostic mechanisms and a
+ Thread(R) specialization document which describes all of the
+ Thread(R)-specific implementation details. Currently, this document
+ covers both.
+
+1.1.2. Renumbering
+
+ Efforts are currently maintained to try to prevent overtly backward-
+ incompatible changes to the existing protocol, but if you are
+ implementing Spinel in your own products you should expect there to
+ be at least one large renumbering event and major version number
+ change before the standard is considered "baked". All changes will
+ be clearly marked and documented to make such a transition as easy as
+ possible.
+
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 7]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ To allow conclusive detection of protocol (in)compatibility between
+ the host and the NCP, the following commands and properties are
+ already considered to be "baked" and will not change:
+
+ o Command IDs zero through eight. (Reset, No-op, and Property-Value
+ Commands)
+ o Property IDs zero through two. (Last status, Protocol Version,
+ and NCP Version)
+
+ Renumbering would be undertaken in order to better organize the
+ allocation of property IDs and capability IDs. One of the initial
+ goals of this protocol was for it to be possible for a host or NCP to
+ only implement properties with values less than 127 and for the NCP
+ to still be usable---relegating all larger property values for extra
+ features or other capabilities that aren't strictly necessary. This
+ would allow simple implementations to avoid the need to implement
+ support for PUIs (Section 3.2).
+
+ As time has gone by and the protocol has become more fleshed out, it
+ has become clear that some of the initial allocations were inadequate
+ and should be revisited if we want to try to achieve the original
+ goal.
+
+2. Frame Format
+
+ A frame is defined simply as the concatenation of
+
+ o A header byte
+ o A command (up to three bytes, see Section 3.2 for format)
+ o An optional command payload
+
+ +---------+--------+-----+-------------+
+ | Octets: | 1 | 1-3 | n |
+ +---------+--------+-----+-------------+
+ | Fields: | HEADER | CMD | CMD_PAYLOAD |
+ +---------+--------+-----+-------------+
+
+2.1. Header Format
+
+ The header byte is broken down as follows:
+
+ 0 1 2 3 4 5 6 7
+ +---+---+---+---+---+---+---+---+
+ | FLG | NLI | TID |
+ +---+---+---+---+---+---+---+---+
+
+ [CREF1]
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 8]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+2.1.1. FLG: Flag
+
+ The flag field of the header byte ("FLG") is always set to the value
+ two (or "10" in binary). Any frame received with these bits set to
+ any other value else MUST NOT be considered a Spinel frame.
+
+ This convention allows Spinel to be line compatible with BTLE HCI.
+ By defining the first two bit in this way we can disambiguate between
+ Spinel frames and HCI frames (which always start with either "0x01"
+ or "0x04") without any additional framing overhead.
+
+2.1.2. NLI: Network Link Identifier
+
+ The Network Link Identifier (NLI) is a number between 0 and 3, which
+ is associated by the OS with one of up to four IPv6 zone indices
+ corresponding to conceptual IPv6 interfaces on the NCP. This allows
+ the protocol to support IPv6 nodes connecting simultaneously to more
+ than one IPv6 network link using a single NCP instance. The first
+ Network Link Identifier (0) MUST refer to a distinguished conceptual
+ interface provided by the NCP for its IPv6 link type. The other
+ three Network Link Identifiers (1, 2 and 3) MAY be dissociated from
+ any conceptual interface.
+
+2.1.3. TID: Transaction Identifier
+
+ The least significant bits of the header represent the Transaction
+ Identifier(TID). The TID is used for correlating responses to the
+ commands which generated them.
+
+ When a command is sent from the host, any reply to that command sent
+ by the NCP will use the same value for the TID. When the host
+ receives a frame that matches the TID of the command it sent, it can
+ easily recognize that frame as the actual response to that command.
+
+ The TID value of zero (0) is used for commands to which a correlated
+ response is not expected or needed, such as for unsolicited update
+ commands sent to the host from the NCP.
+
+2.1.4. Command Identifier (CMD)
+
+ The command identifier is a 21-bit unsigned integer encoded in up to
+ three bytes using the packed unsigned integer format described in
+ Section 3.2. This encoding allows for up to 2,097,152 individual
+ commands, with the first 127 commands represented as a single byte.
+ Command identifiers larger than 2,097,151 are explicitly forbidden.
+
+
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 9]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ +-----------------------+----------------------------+
+ | CID Range | Description |
+ +-----------------------+----------------------------+
+ | 0 - 63 | Reserved for core commands |
+ | 64 - 15,359 | _UNALLOCATED_ |
+ | 15,360 - 16,383 | Vendor-specific |
+ | 16,384 - 1,999,999 | _UNALLOCATED_ |
+ | 2,000,000 - 2,097,151 | Experimental use only |
+ +-----------------------+----------------------------+
+
+2.1.5. Command Payload (Optional)
+
+ Depending on the semantics of the command in question, a payload MAY
+ be included in the frame. The exact composition and length of the
+ payload is defined by the command identifier.
+
+3. Data Packing
+
+ Data serialization for properties is performed using a light-weight
+ data packing format which was loosely inspired by D-Bus. The format
+ of a serialization is defined by a specially formatted string.
+
+ This packing format is used for notational convenience. While this
+ string-based datatype format has been designed so that the strings
+ may be directly used by a structured data parser, such a thing is not
+ required to implement Spinel. Indeed, higly constrained applications
+ may find such a thing to be too heavyweight.
+
+ Goals:
+
+ o Be lightweight and favor direct representation of values.
+ o Use an easily readable and memorable format string.
+ o Support lists and structures.
+ o Allow properties to be appended to structures while maintaining
+ backward compatibility.
+
+ Each primitive datatype has an ASCII character associated with it.
+ Structures can be represented as strings of these characters. For
+ example:
+
+ o "C": A single unsigned byte.
+ o "C6U": A single unsigned byte, followed by a 128-bit IPv6 address,
+ followed by a zero-terminated UTF8 string.
+ o "A(6)": An array of concatenated IPv6 addresses
+
+ In each case, the data is represented exactly as described. For
+ example, an array of 10 IPv6 address is stored as 160 bytes.
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 10]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+3.1. Primitive Types
+
+ +----------+----------------------+---------------------------------+
+ | Char | Name | Description |
+ +----------+----------------------+---------------------------------+
+ | "." | DATATYPE_VOID | Empty data type. Used |
+ | | | internally. |
+ | "b" | DATATYPE_BOOL | Boolean value. Encoded in |
+ | | | 8-bits as either 0x00 or 0x01. |
+ | | | All other values are illegal. |
+ | "C" | DATATYPE_UINT8 | Unsigned 8-bit integer. |
+ | "c" | DATATYPE_INT8 | Signed 8-bit integer. |
+ | "S" | DATATYPE_UINT16 | Unsigned 16-bit integer. |
+ | "s" | DATATYPE_INT16 | Signed 16-bit integer. |
+ | "L" | DATATYPE_UINT32 | Unsigned 32-bit integer. |
+ | "l" | DATATYPE_INT32 | Signed 32-bit integer. |
+ | "i" | DATATYPE_UINT_PACKED | Packed Unsigned Integer. See |
+ | | | Section 3.2. |
+ | "6" | DATATYPE_IPv6ADDR | IPv6 Address. (Big-endian) |
+ | "E" | DATATYPE_EUI64 | EUI-64 Address. (Big-endian) |
+ | "e" | DATATYPE_EUI48 | EUI-48 Address. (Big-endian) |
+ | "D" | DATATYPE_DATA | Arbitrary data. See Section |
+ | | | 3.3. |
+ | "d" | DATATYPE_DATA_WLEN | Arbitrary data with prepended |
+ | | | length. See Section 3.3. |
+ | "U" | DATATYPE_UTF8 | Zero-terminated UTF8-encoded |
+ | | | string. |
+ | "t(...)" | DATATYPE_STRUCT | Structured datatype with |
+ | | | prepended length. See Section |
+ | | | 3.4. |
+ | "A(...)" | DATATYPE_ARRAY | Array of datatypes. Compound |
+ | | | type. See Section 3.5. |
+ +----------+----------------------+---------------------------------+
+
+ All multi-byte values are little-endian unless explicitly stated
+ otherwise.
+
+3.2. Packed Unsigned Integer
+
+ For certain types of integers, such command or property identifiers,
+ usually have a value on the wire that is less than 127. However, in
+ order to not preclude the use of values larger than 255, we would
+ need to add an extra byte. Doing this would add an extra byte to the
+ majority of instances, which can add up in terms of bandwidth.
+
+ The packed unsigned integer format is based on the unsigned integer
+ format in EXI [1], except that we limit the maximum value to the
+ largest value that can be encoded into three bytes(2,097,151).
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 11]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ For all values less than 127, the packed form of the number is simply
+ a single byte which directly represents the number. For values
+ larger than 127, the following process is used to encode the value:
+
+ 1. The unsigned integer is broken up into _n_ 7-bit chunks and
+ placed into _n_ octets, leaving the most significant bit of each
+ octet unused.
+ 2. Order the octets from least-significant to most-significant.
+ (Little-endian)
+ 3. Clear the most significant bit of the most significant octet.
+ Set the least significant bit on all other octets.
+
+ Where _n_ is the smallest number of 7-bit chunks you can use to
+ represent the given value.
+
+ Take the value 1337, for example:
+
+ 1337 => 0x0539
+ => [39 0A]
+ => [B9 0A]
+
+ To decode the value, you collect the 7-bit chunks until you find an
+ octet with the most significant bit clear.
+
+3.3. Data Blobs
+
+ There are two types for data blobs: "d" and "D".
+
+ o "d" has the length of the data (in bytes) prepended to the data
+ (with the length encoded as type "S"). The size of the length
+ field is not included in the length.
+ o "D" does not have a prepended length: the length of the data is
+ implied by the bytes remaining to be parsed. It is an error for
+ "D" to not be the last type in a type in a type signature.
+
+ This dichotomy allows for more efficient encoding by eliminating
+ redundency. If the rest of the buffer is a data blob, encoding the
+ length would be redundant because we already know how many bytes are
+ in the rest of the buffer.
+
+ In some cases we use "d" even if it is the last field in a type
+ signature. We do this to allow for us to be able to append
+ additional fields to the type signature if necessary in the future.
+ This is usually the case with embedded structs, like in the scan
+ results.
+
+ For example, let's say we have a buffer that is encoded with the
+ datatype signature of "CLLD". In this case, it is pretty easy to
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 12]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ tell where the start and end of the data blob is: the start is 9
+ bytes from the start of the buffer, and its length is the length of
+ the buffer minus 9. (9 is the number of bytes taken up by a byte and
+ two longs)
+
+ The datatype signature "CLLDU" is illegal because we can't determine
+ where the last field (a zero-terminated UTF8 string) starts. But the
+ datatype "CLLdU" _is_ legal, because the parser can determine the
+ exact length of the data blob-- allowing it to know where the start
+ of the next field would be.
+
+3.4. Structured Data
+
+ The structure data type ("t(...)") is a way of bundling together
+ several fields into a single structure. It can be thought of as a
+ "d" type except that instead of being opaque, the fields in the
+ content are known. This is useful for things like scan results where
+ you have substructures which are defined by different layers.
+
+ For example, consider the type signature "Lt(ES)t(6C)". In this
+ hypothetical case, the first struct is defined by the MAC layer, and
+ the second struct is defined by the PHY layer. Because of the use of
+ structures, we know exactly what part comes from that layer.
+ Additionally, we can add fields to each structure without introducing
+ backward compatability problems: Data encoded as "Lt(ESU)t(6C)"
+ (Notice the extra "U") will decode just fine as "Lt(ES)t(6C)".
+ Additionally, if we don't care about the MAC layer and only care
+ about the network layer, we could parse as "Lt()t(6C)".
+
+ Note that data encoded as "Lt(ES)t(6C)" will also parse as "Ldd",
+ with the structures from both layers now being opaque data blobs.
+
+3.5. Arrays
+
+ An array is simply a concatenated set of _n_ data encodings. For
+ example, the type "A(6)" is simply a list of IPv6 addresses---one
+ after the other. The type "A(6E)" likewise a concatenation of IPv6-
+ address/EUI-64 pairs.
+
+ If an array contains many fields, the fields will often be surrounded
+ by a structure ("t(...)"). This effectively prepends each item in
+ the array with its length. This is useful for improving parsing
+ performance or to allow additional fields to be added in the future
+ in a backward compatible way. If there is a high certainty that
+ additional fields will never be added, the struct may be omitted
+ (saving two bytes per item).
+
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 13]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ This specification does not define a way to embed an array as a field
+ alongside other fields.
+
+4. Commands
+
+4.1. CMD 0: (Host->NCP) CMD_NOOP
+
+ +---------+--------+----------+
+ | Octets: | 1 | 1 |
+ +---------+--------+----------+
+ | Fields: | HEADER | CMD_NOOP |
+ +---------+--------+----------+
+
+ No-Operation command. Induces the NCP to send a success status back
+ to the host. This is primarily used for liveliness checks.
+
+ The command payload for this command SHOULD be empty. The receiver
+ MUST ignore any non-empty command payload.
+
+ There is no error condition for this command.
+
+4.2. CMD 1: (Host->NCP) CMD_RESET
+
+ +---------+--------+-----------+
+ | Octets: | 1 | 1 |
+ +---------+--------+-----------+
+ | Fields: | HEADER | CMD_RESET |
+ +---------+--------+-----------+
+
+ Reset NCP command. Causes the NCP to perform a software reset. Due
+ to the nature of this command, the TID is ignored. The host should
+ instead wait for a "CMD_PROP_VALUE_IS" command from the NCP
+ indicating "PROP_LAST_STATUS" has been set to
+ "STATUS_RESET_SOFTWARE".
+
+ The command payload for this command SHOULD be empty. The receiver
+ MUST ignore any non-empty command payload.
+
+ If an error occurs, the value of "PROP_LAST_STATUS" will be emitted
+ instead with the value set to the generated status code for the
+ error.
+
+4.3. CMD 2: (Host->NCP) CMD_PROP_VALUE_GET
+
+
+
+
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 14]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ +---------+--------+--------------------+---------+
+ | Octets: | 1 | 1 | 1-3 |
+ +---------+--------+--------------------+---------+
+ | Fields: | HEADER | CMD_PROP_VALUE_GET | PROP_ID |
+ +---------+--------+--------------------+---------+
+
+ Get property value command. Causes the NCP to emit a
+ "CMD_PROP_VALUE_IS" command for the given property identifier.
+
+ The payload for this command is the property identifier encoded in
+ the packed unsigned integer format described in Section 3.2.
+
+ If an error occurs, the value of "PROP_LAST_STATUS" will be emitted
+ instead with the value set to the generated status code for the
+ error.
+
+4.4. CMD 3: (Host->NCP) CMD_PROP_VALUE_SET
+
+ +---------+--------+--------------------+---------+-------+
+ | Octets: | 1 | 1 | 1-3 | n |
+ +---------+--------+--------------------+---------+-------+
+ | Fields: | HEADER | CMD_PROP_VALUE_SET | PROP_ID | VALUE |
+ +---------+--------+--------------------+---------+-------+
+
+ Set property value command. Instructs the NCP to set the given
+ property to the specific given value, replacing any previous value.
+
+ The payload for this command is the property identifier encoded in
+ the packed unsigned integer format described in Section 3.2, followed
+ by the property value. The exact format of the property value is
+ defined by the property.
+
+ If an error occurs, the value of "PROP_LAST_STATUS" will be emitted
+ with the value set to the generated status code for the error.
+
+4.5. CMD 4: (Host->NCP) CMD_PROP_VALUE_INSERT
+
+ +---------+--------+-----------------------+---------+-------+
+ | Octets: | 1 | 1 | 1-3 | n |
+ +---------+--------+-----------------------+---------+-------+
+ | Fields: | HEADER | CMD_PROP_VALUE_INSERT | PROP_ID | VALUE |
+ +---------+--------+-----------------------+---------+-------+
+
+ Insert value into property command. Instructs the NCP to insert the
+ given value into a list-oriented property, without removing other
+ items in the list. The resulting order of items in the list is
+ defined by the individual property being operated on.
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 15]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ The payload for this command is the property identifier encoded in
+ the packed unsigned integer format described in Section 3.2, followed
+ by the value to be inserted. The exact format of the value is
+ defined by the property.
+
+ If the type signature of the property specified by "PROP_ID" consists
+ of a single structure enclosed by an array ("A(t(...))"), then the
+ contents of "VALUE" MUST contain the contents of the structure
+ ("...") rather than the serialization of the whole item ("t(...)").
+ Specifically, the length of the structure MUST NOT be prepended to
+ "VALUE". This helps to eliminate redundant data.
+
+ If an error occurs, the value of "PROP_LAST_STATUS" will be emitted
+ with the value set to the generated status code for the error.
+
+4.6. CMD 5: (Host->NCP) CMD_PROP_VALUE_REMOVE
+
+ +---------+--------+-----------------------+---------+-------+
+ | Octets: | 1 | 1 | 1-3 | n |
+ +---------+--------+-----------------------+---------+-------+
+ | Fields: | HEADER | CMD_PROP_VALUE_REMOVE | PROP_ID | VALUE |
+ +---------+--------+-----------------------+---------+-------+
+
+ Remove value from property command. Instructs the NCP to remove the
+ given value from a list-oriented property, without affecting other
+ items in the list. The resulting order of items in the list is
+ defined by the individual property being operated on.
+
+ Note that this command operates _by value_, not by index!
+
+ The payload for this command is the property identifier encoded in
+ the packed unsigned integer format described in Section 3.2, followed
+ by the value to be removed. The exact format of the value is defined
+ by the property.
+
+ If the type signature of the property specified by "PROP_ID" consists
+ of a single structure enclosed by an array ("A(t(...))"), then the
+ contents of "VALUE" MUST contain the contents of the structure
+ ("...") rather than the serialization of the whole item ("t(...)").
+ Specifically, the length of the structure MUST NOT be prepended to
+ "VALUE". This helps to eliminate redundant data.
+
+ If an error occurs, the value of "PROP_LAST_STATUS" will be emitted
+ with the value set to the generated status code for the error.
+
+
+
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 16]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+4.7. CMD 6: (NCP->Host) CMD_PROP_VALUE_IS
+
+ +---------+--------+-------------------+---------+-------+
+ | Octets: | 1 | 1 | 1-3 | n |
+ +---------+--------+-------------------+---------+-------+
+ | Fields: | HEADER | CMD_PROP_VALUE_IS | PROP_ID | VALUE |
+ +---------+--------+-------------------+---------+-------+
+
+ Property value notification command. This command can be sent by the
+ NCP in response to a previous command from the host, or it can be
+ sent by the NCP in an unsolicited fashion to notify the host of
+ various state changes asynchronously.
+
+ The payload for this command is the property identifier encoded in
+ the packed unsigned integer format described in Section 3.2, followed
+ by the current value of the given property.
+
+4.8. CMD 7: (NCP->Host) CMD_PROP_VALUE_INSERTED
+
+ +---------+--------+-------------------------+---------+-------+
+ | Octets: | 1 | 1 | 1-3 | n |
+ +---------+--------+-------------------------+---------+-------+
+ | Fields: | HEADER | CMD_PROP_VALUE_INSERTED | PROP_ID | VALUE |
+ +---------+--------+-------------------------+---------+-------+
+
+ Property value insertion notification command. This command can be
+ sent by the NCP in response to the "CMD_PROP_VALUE_INSERT" command,
+ or it can be sent by the NCP in an unsolicited fashion to notify the
+ host of various state changes asynchronously.
+
+ The payload for this command is the property identifier encoded in
+ the packed unsigned integer format described in Section 3.2, followed
+ by the value that was inserted into the given property.
+
+ If the type signature of the property specified by "PROP_ID" consists
+ of a single structure enclosed by an array ("A(t(...))"), then the
+ contents of "VALUE" MUST contain the contents of the structure
+ ("...") rather than the serialization of the whole item ("t(...)").
+ Specifically, the length of the structure MUST NOT be prepended to
+ "VALUE". This helps to eliminate redundant data.
+
+ The resulting order of items in the list is defined by the given
+ property.
+
+
+
+
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 17]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+4.9. CMD 8: (NCP->Host) CMD_PROP_VALUE_REMOVED
+
+ +---------+--------+------------------------+---------+-------+
+ | Octets: | 1 | 1 | 1-3 | n |
+ +---------+--------+------------------------+---------+-------+
+ | Fields: | HEADER | CMD_PROP_VALUE_REMOVED | PROP_ID | VALUE |
+ +---------+--------+------------------------+---------+-------+
+
+ Property value removal notification command. This command can be
+ sent by the NCP in response to the "CMD_PROP_VALUE_REMOVE" command,
+ or it can be sent by the NCP in an unsolicited fashion to notify the
+ host of various state changes asynchronously.
+
+ Note that this command operates _by value_, not by index!
+
+ The payload for this command is the property identifier encoded in
+ the packed unsigned integer format described in Section 3.2, followed
+ by the value that was removed from the given property.
+
+ If the type signature of the property specified by "PROP_ID" consists
+ of a single structure enclosed by an array ("A(t(...))"), then the
+ contents of "VALUE" MUST contain the contents of the structure
+ ("...") rather than the serialization of the whole item ("t(...)").
+ Specifically, the length of the structure MUST NOT be prepended to
+ "VALUE". This helps to eliminate redundant data.
+
+ The resulting order of items in the list is defined by the given
+ property.
+
+4.10. CMD 18: (Host->NCP) CMD_PEEK
+
+ +---------+--------+----------+---------+-------+
+ | Octets: | 1 | 1 | 4 | 2 |
+ +---------+--------+----------+---------+-------+
+ | Fields: | HEADER | CMD_PEEK | ADDRESS | COUNT |
+ +---------+--------+----------+---------+-------+
+
+ This command allows the NCP to fetch values from the RAM of the NCP
+ for debugging purposes. Upon success, "CMD_PEEK_RET" is sent from
+ the NCP to the host. Upon failure, "PROP_LAST_STATUS" is emitted
+ with the appropriate error indication.
+
+ Due to the low-level nature of this command, certain error conditions
+ may induce the NCP to reset.
+
+ The NCP MAY prevent certain regions of memory from being accessed.
+
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 18]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ The implementation of this command has security implications. See
+ Section 13 for more information.
+
+ This command requires the capability "CAP_PEEK_POKE" to be present.
+
+4.11. CMD 19: (NCP->Host) CMD_PEEK_RET
+
+ +---------+--------+--------------+---------+-------+-------+
+ | Octets: | 1 | 1 | 4 | 2 | n |
+ +---------+--------+--------------+---------+-------+-------+
+ | Fields: | HEADER | CMD_PEEK_RET | ADDRESS | COUNT | BYTES |
+ +---------+--------+--------------+---------+-------+-------+
+
+ This command contains the contents of memory that was requested by a
+ previous call to "CMD_PEEK".
+
+ This command requires the capability "CAP_PEEK_POKE" to be present.
+
+4.12. CMD 20: (Host->NCP) CMD_POKE
+
+ +---------+--------+----------+---------+-------+-------+
+ | Octets: | 1 | 1 | 4 | 2 | n |
+ +---------+--------+----------+---------+-------+-------+
+ | Fields: | HEADER | CMD_POKE | ADDRESS | COUNT | BYTES |
+ +---------+--------+----------+---------+-------+-------+
+
+ This command writes the bytes to the specified memory address for
+ debugging purposes.
+
+ Due to the low-level nature of this command, certain error conditions
+ may induce the NCP to reset.
+
+ The implementation of this command has security implications. See
+ Section 13 for more information.
+
+ This command requires the capability "CAP_PEEK_POKE" to be present.
+
+4.13. CMD 21: (Host->NCP) CMD_PROP_VALUE_MULTI_GET
+
+ o Argument-Encoding: "A(i)"
+ o Required Capability: "CAP_CMD_MULTI"
+
+ Fetch the value of multiple properties in one command. Arguments are
+ an array of property IDs. If all properties are fetched
+ successfully, a "CMD_PROP_VALUES_ARE" command is sent back to the
+ host containing the propertyid and value of each fetched property.
+ The order of the results in "CMD_PROP_VALUES_ARE" match the order of
+ properties given in "CMD_PROP_VALUE_GET".
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 19]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ Errors fetching individual properties are reflected as indicating a
+ change to "PROP_LAST_STATUS" for that property's place.
+
+ Not all properties can be fetched using this method. As a general
+ rule of thumb, any property that blocks when getting will fail for
+ that individual property with "STATUS_INVALID_COMMAND_FOR_PROP".
+
+4.14. CMD 22: (Host->NCP) CMD_PROP_VALUE_MULTI_SET
+
+ o Argument-Encoding: "A(iD)"
+ o Required Capability: "CAP_CMD_MULTI"
+
+ +---------+--------+--------------------------+---------------------+
+ | Octets: | 1 | 1 | n |
+ +---------+--------+--------------------------+---------------------+
+ | Fields: | HEADER | CMD_PROP_VALUE_MULTI_SET | Property/Value |
+ | | | | Pairs |
+ +---------+--------+--------------------------+---------------------+
+
+ With each property/value pair being:
+
+ +---------+--------+---------+------------+
+ | Octets: | 2 | 1-3 | n |
+ +---------+--------+---------+------------+
+ | Fields: | LENGTH | PROP_ID | PROP_VALUE |
+ +---------+--------+---------+------------+
+
+ This command sets the value of several properties at once in the
+ given order. The setting of properties stops at the first error,
+ ignoring any later properties.
+
+ The result of this command is generally "CMD_PROP_VALUES_ARE" unless
+ (for example) a parsing error has occured (in which case
+ "CMD_PROP_VALUE_IS" for "PROP_LAST_STATUS" would be the result). The
+ order of the results in "CMD_PROP_VALUES_ARE" match the order of
+ properties given in "CMD_PROP_VALUE_MULTI_SET".
+
+ Since the processing of properties to set stops at the first error,
+ the resulting "CMD_PROP_VALUES_ARE" can contain fewer items than the
+ requested number of properties to set.
+
+ Not all properties can be set using this method. As a general rule
+ of thumb, any property that blocks when setting will fail for that
+ individual property with "STATUS_INVALID_COMMAND_FOR_PROP".
+
+
+
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 20]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+4.15. CMD 23: (NCP->Host) CMD_PROP_VALUES_ARE
+
+ o Argument-Encoding: "A(iD)"
+ o Required Capability: "CAP_CMD_MULTI"
+
+ +---------+--------+---------------------+----------------------+
+ | Octets: | 1 | 1 | n |
+ +---------+--------+---------------------+----------------------+
+ | Fields: | HEADER | CMD_PROP_VALUES_ARE | Property/Value Pairs |
+ +---------+--------+---------------------+----------------------+
+
+ With each property/value pair being:
+
+ +---------+--------+---------+------------+
+ | Octets: | 2 | 1-3 | n |
+ +---------+--------+---------+------------+
+ | Fields: | LENGTH | PROP_ID | PROP_VALUE |
+ +---------+--------+---------+------------+
+
+ This command is emitted by the NCP as the response to both the
+ "CMD_PROP_VALUE_MULTI_GET" and "CMD_PROP_VALUE_MULTI_SET" commands.
+ It is roughly analogous to "CMD_PROP_VALUE_IS", except that it
+ contains more than one property.
+
+ This command SHOULD NOT be emitted asynchronously, or in response to
+ any command other than "CMD_PROP_VALUE_MULTI_GET" or
+ "CMD_PROP_VALUE_MULTI_SET".
+
+ The arguments are a list of structures containing the emitted
+ property and the associated value. These are presented in the same
+ order as given in the associated initiating command. In cases where
+ getting or setting a specific property resulted in an error, the
+ associated slot in this command will describe "PROP_LAST_STATUS".
+
+5. Properties
+
+ Spinel is largely a property-based protocol, similar to
+ representational state transfer (REST), with a property defined for
+ every attribute that an OS needs to create, read, update or delete in
+ the function of an IPv6 interface. The inspiration of this approach
+ was memory-mapped hardware registers for peripherals. The goal is to
+ avoid, as much as possible, the use of large complicated structures
+ and/or method argument lists. The reason for avoiding these is
+ because they have a tendency to change, especially early in
+ development. Adding or removing a property from a structure can
+ render the entire protocol incompatible. By using properties, you
+ simply extend the protocol with an additional property.
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 21]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+ Almost all features and capabilities are implemented using
+ properties. Most new features that are initially proposed as
+ commands can be adapted to be property-based instead. Notable
+ exceptions include "Host Buffer Offload" (Section 9) and "Network
+ Save" (Section 8).
+
+ In Spinel, properties are keyed by an unsigned integer between 0 and
+ 2,097,151 (See Section 3.2).
+
+5.1. Property Methods
+
+ Properties may support one or more of the following methods:
+
+ o "VALUE_GET" (Section 4.3)
+ o "VALUE_SET" (Section 4.4)
+ o "VALUE_INSERT" (Section 4.5)
+ o "VALUE_REMOVE" (Section 4.6)
+
+ Additionally, the NCP can send updates to the host (either
+ synchronously or asynchronously) that inform the host about changes
+ to specific properties:
+
+ o "VALUE_IS" (Section 4.7)
+ o "VALUE_INSERTED" (Section 4.8)
+ o "VALUE_REMOVED" (Section 4.9)
+
+5.2. Property Types
+
+ Conceptually, there are three different types of properties:
+
+ o Single-value properties
+ o Multiple-value (Array) properties
+ o Stream properties
+
+5.2.1. Single-Value Properties
+
+ Single-value properties are properties that have a simple
+ representation of a single value. Examples would be:
+
+ o Current radio channel (Represented as an unsigned 8-bit integer)
+ o Network name (Represented as a UTF-8 encoded string)
+ o 802.15.4 PAN ID (Represented as an unsigned 16-bit integer)
+
+ The valid operations on these sorts of properties are "GET" and
+ "SET".
+
+
+
+
+
+
+Quattlebaum & Woodyatt Expires December 24, 2017 [Page 22]
+
+Internet-Draft Spinel Protocol (Unified) June 2017
+
+
+5.2.2. Multiple-Value Properties
+
+ Multiple-Value Properties have more than one value associated with
+ them. Examples would be:
+
+ o List of channels supported by the radio hardware.
+ o List of IPv6 addresses assigned to the interface.
+ o List of capabilities supported by the NCP.
+
+ The valid operations on these sorts of properties are "VALUE_GET",
+ "VALUE_SET", "VALUE_INSERT", and "VALUE_REMOVE".
+
+ When the value is fetched using "VALUE_GET", the returned value is
+ the concatenation of all of the individual values in the list. If
+ the length of the value for an individual item in the list is not
+ defined by the type then each item returned in the list is prepended
+ with a length (See Section 3.5). The order of the returned items,
+ unless explicitly defined for that specific property, is undefined.
+
+ "VALUE_SET" provides a way to completely replace all previous values.
+ Calling "VALUE_SET" with an empty value effectively instructs the NCP
+ to clear the value of that property.
+
+ "VALUE_INSERT" and "VALUE_REMOVE" provide mechanisms for the
+ insertion or removal of individual items _by value_. The payload for
+ these commands is a plain single value.
+
+5.2.3. Stream Properties
+
+ Stream properties are special properties representing streams of
+ data. Examples would be:
+