[slaac] add config option to enable/disable SLAAC support (#3512)

This commit adds `OPENTHREAD_CONFIG_ENABLE_SLAAC` as a build
configuration option to enable/disable SLAAC support within
OpenThread. This feature is disabled by default. This commit also
adds `SLAAC` to `common-switches` list to allow builds to enable
this feature easily.
This commit is contained in:
Abtin Keshavarzian
2019-02-13 18:17:18 -08:00
committed by Jonathan Hui
parent 96de36385a
commit 7a69ae36a1
8 changed files with 89 additions and 10 deletions
+37
View File
@@ -26,6 +26,39 @@
# POSSIBILITY OF SUCH DAMAGE.
#
# OpenThread Features (Makefile default configuration).
BORDER_AGENT ?= 0
BORDER_ROUTER ?= 0
CERT_LOG ?= 0
COAP ?= 0
COAPS ?= 0
COMMISSIONER ?= 0
COVERAGE ?= 0
CHANNEL_MANAGER ?= 0
CHANNEL_MONITOR ?= 0
CHILD_SUPERVISION ?= 0
DEBUG ?= 0
DHCP6_CLIENT ?= 0
DHCP6_SERVER ?= 0
DIAGNOSTIC ?= 0
DISABLE_DOC ?= 0
DNS_CLIENT ?= 0
ECDSA ?= 0
JAM_DETECTION ?= 0
JOINER ?= 0
LEGACY ?= 0
LINK_RAW ?= 0
MAC_FILTER ?= 0
MTD_NETDIAG ?= 0
PLATFORM_UDP ?= 0
SERVICE ?= 0
SLAAC ?= 1 # SLAAC is enabled by default
SNTP_CLIENT ?= 0
TIME_SYNC ?= 0
UDP_FORWARD ?= 0
ifeq ($(BORDER_AGENT),1)
configure_OPTIONS += --enable-border-agent
endif
@@ -127,6 +160,10 @@ ifeq ($(SERVICE),1)
configure_OPTIONS += --enable-service
endif
ifeq ($(SLAAC),1)
COMMONCFLAGS += -DOPENTHREAD_CONFIG_ENABLE_SLAAC=1
endif
ifeq ($(SNTP_CLIENT),1)
configure_OPTIONS += --enable-sntp-client
endif
@@ -53,6 +53,16 @@
#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED
#endif
/**
* @def OPENTHREAD_CONFIG_ENABLE_SLAAC
*
* Define as 1 to enable support for adding of auto-configured SLAAC addresses by OpenThread.
*
*/
#ifndef OPENTHREAD_CONFIG_ENABLE_SLAAC /* allows command line override */
#define OPENTHREAD_CONFIG_ENABLE_SLAAC 1
#endif
#if OPENTHREAD_RADIO
/**
* @def OPENTHREAD_CONFIG_ENABLE_SOFTWARE_ACK_TIMEOUT