mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 15:47:46 +00:00
[config] ip6 (#4020)
This commit is contained in:
@@ -169,7 +169,7 @@ configure_OPTIONS += --enable-service
|
||||
endif
|
||||
|
||||
ifeq ($(SLAAC),1)
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_ENABLE_SLAAC=1
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(SNTP_CLIENT),1)
|
||||
|
||||
@@ -54,13 +54,13 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
* @def OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
*
|
||||
* 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
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE /* allows command line override */
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_RADIO
|
||||
|
||||
@@ -178,7 +178,7 @@ bool otIp6IsEnabled(otInstance *aInstance);
|
||||
* Add a Network Interface Address to the Thread interface.
|
||||
*
|
||||
* The passed-in instance @p aAddress is copied by the Thread interface. The Thread interface only
|
||||
* supports a fixed number of externally added unicast addresses. See OPENTHREAD_CONFIG_MAX_EXT_IP_ADDRS.
|
||||
* supports a fixed number of externally added unicast addresses. See OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aAddress A pointer to a Network Interface Address.
|
||||
@@ -214,7 +214,7 @@ const otNetifAddress *otIp6GetUnicastAddresses(otInstance *aInstance);
|
||||
* Subscribe the Thread interface to a Network Interface Multicast Address.
|
||||
*
|
||||
* The passed in instance @p aAddress will be copied by the Thread interface. The Thread interface only
|
||||
* supports a fixed number of externally added multicast addresses. See OPENTHREAD_CONFIG_MAX_EXT_MULTICAST_IP_ADDRS.
|
||||
* supports a fixed number of externally added multicast addresses. See OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aAddress A pointer to an IP Address.
|
||||
@@ -518,7 +518,7 @@ otError otIp6SelectSourceAddress(otInstance *aInstance, otMessageInfo *aMessageI
|
||||
/**
|
||||
* This function indicates whether the SLAAC module is enabled or not.
|
||||
*
|
||||
* This function requires the build-time feature `OPENTHREAD_CONFIG_ENABLE_SLAAC` to be enabled.
|
||||
* This function requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled.
|
||||
*
|
||||
* @retval TRUE SLAAC module is enabled.
|
||||
* @retval FALSE SLAAC module is disabled.
|
||||
@@ -529,7 +529,7 @@ bool otIp6IsSlaacEnabled(otInstance *aInstance);
|
||||
/**
|
||||
* This function enables/disables the SLAAC module.
|
||||
*
|
||||
* This function requires the build-time feature `OPENTHREAD_CONFIG_ENABLE_SLAAC` to be enabled.
|
||||
* This function requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled.
|
||||
*
|
||||
* When SLAAC module is enabled, SLAAC addresses (based on on-mesh prefixes in Network Data) are added to the interface.
|
||||
* When SLAAC module is disabled any previously added SLAAC address is removed.
|
||||
@@ -559,7 +559,7 @@ typedef bool (*otIp6SlaacPrefixFilter)(otInstance *aInstance, const otIp6Prefix
|
||||
/**
|
||||
* This function sets the SLAAC module filter handler.
|
||||
*
|
||||
* This function requires the build-time feature `OPENTHREAD_CONFIG_ENABLE_SLAAC` to be enabled.
|
||||
* This function requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled.
|
||||
*
|
||||
* The filter handler is called by SLAAC module when it is about to add a SLAAC address based on a prefix to decide
|
||||
* whether the address should be added or not.
|
||||
|
||||
@@ -329,6 +329,7 @@ HEADERS_COMMON = \
|
||||
config/dhcp6_server.h \
|
||||
config/diag.h \
|
||||
config/dns_client.h \
|
||||
config/ip6.h \
|
||||
config/openthread-core-config-check.h \
|
||||
config/openthread-core-default-config.h \
|
||||
crypto/aes_ccm.hpp \
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "common/instance.hpp"
|
||||
#include "common/locator-getters.hpp"
|
||||
#include "common/logging.hpp"
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
#include "utils/slaac_address.hpp"
|
||||
#endif
|
||||
|
||||
@@ -266,7 +266,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
|
||||
bool otIp6IsSlaacEnabled(otInstance *aInstance)
|
||||
{
|
||||
@@ -294,4 +294,4 @@ void otIp6SetSlaacPrefixFilter(otInstance *aInstance, otIp6SlaacPrefixFilter aFi
|
||||
instance.Get<Utils::Slaac>().SetFilter(aFilter);
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#endif // OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
|
||||
@@ -612,7 +612,7 @@ template <> inline Dhcp6::Dhcp6Server &Instance::Get(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
template <> inline Utils::Slaac &Instance::Get(void)
|
||||
{
|
||||
return mThreadNetif.mSlaac;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "common/locator.hpp"
|
||||
#include "mac/mac_frame.hpp"
|
||||
#include "thread/mle.hpp"
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
#include "utils/slaac_address.hpp"
|
||||
#endif
|
||||
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
*/
|
||||
otError DeleteParentInfo(void);
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
|
||||
/**
|
||||
* This method saves the SLAAC IID secret key.
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
*/
|
||||
otError DeleteSlaacIidSecretKey(void) { return Delete(kKeySlaacIidSecretKey); }
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#endif // OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
|
||||
/**
|
||||
* This method adds a Child Info entry to settings.
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Copyright (c) 2019, The OpenThread Authors.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* This file includes compile-time configurations for the IP6 service.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_IP6_H_
|
||||
#define CONFIG_IP6_H_
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS
|
||||
*
|
||||
* The maximum number of supported IPv6 addresses allows to be externally added.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS
|
||||
#define OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS
|
||||
*
|
||||
* The maximum number of supported IPv6 multicast addresses allows to be externally added.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS
|
||||
#define OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 2
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT
|
||||
*
|
||||
* This setting configures the default hop limit of IPv6.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT
|
||||
#define OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT 64
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IP6_MAX_DATAGRAM_LENGTH
|
||||
*
|
||||
* This setting configures the max datagram length of IPv6.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_MAX_DATAGRAM_LENGTH
|
||||
#define OPENTHREAD_CONFIG_IP6_MAX_DATAGRAM_LENGTH 1280
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
*
|
||||
* Define as 1 to enable support for adding of auto-configured SLAAC addresses by OpenThread.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IP6_SLAAC_NUM_ADDRESSES
|
||||
*
|
||||
* The number of auto-configured SLAAC addresses. Applicable only if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE is enabled.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_NUM_ADDRESSES
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_NUM_ADDRESSES 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRIES
|
||||
*
|
||||
* The number of MPL Seed Set entries for duplicate detection.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRIES
|
||||
#define OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRIES 32
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRY_LIFETIME
|
||||
*
|
||||
* The MPL Seed Set entry lifetime in seconds.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRY_LIFETIME
|
||||
#define OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRY_LIFETIME 5
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MPL_DYNAMIC_INTERVAL_ENABLE
|
||||
*
|
||||
* Define as 1 to enable dynamic MPL interval feature.
|
||||
*
|
||||
* If this feature is enabled, the MPL forward interval will be adjusted dynamically according to
|
||||
* the network scale, which helps to reduce multicast latency.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MPL_DYNAMIC_INTERVAL_ENABLE
|
||||
#define OPENTHREAD_CONFIG_MPL_DYNAMIC_INTERVAL_ENABLE 0
|
||||
#endif
|
||||
|
||||
#endif // CONFIG_IP6_H_
|
||||
@@ -319,26 +319,6 @@
|
||||
#define OPENTHREAD_CONFIG_IP_ADDRS_TO_REGISTER (OPENTHREAD_CONFIG_IP_ADDRS_PER_CHILD)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAX_EXT_IP_ADDRS
|
||||
*
|
||||
* The maximum number of supported IPv6 addresses allows to be externally added.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAX_EXT_IP_ADDRS
|
||||
#define OPENTHREAD_CONFIG_MAX_EXT_IP_ADDRS 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAX_EXT_MULTICAST_IP_ADDRS
|
||||
*
|
||||
* The maximum number of supported IPv6 multicast addresses allows to be externally added.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAX_EXT_MULTICAST_IP_ADDRS
|
||||
#define OPENTHREAD_CONFIG_MAX_EXT_MULTICAST_IP_ADDRS 2
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAX_SERVICE_ALOCS
|
||||
*
|
||||
@@ -359,26 +339,6 @@
|
||||
#define OPENTHREAD_CONFIG_6LOWPAN_REASSEMBLY_TIMEOUT 2
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRIES
|
||||
*
|
||||
* The number of MPL Seed Set entries for duplicate detection.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRIES
|
||||
#define OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRIES 32
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRY_LIFETIME
|
||||
*
|
||||
* The MPL Seed Set entry lifetime in seconds.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRY_LIFETIME
|
||||
#define OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRY_LIFETIME 5
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_JOINER_UDP_PORT
|
||||
*
|
||||
@@ -793,26 +753,6 @@
|
||||
#define OPENTHREAD_CONFIG_PLAT_LOG_FUNCTION otPlatLog
|
||||
#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
|
||||
#define OPENTHREAD_CONFIG_ENABLE_SLAAC 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_NUM_SLAAC_ADDRESSES
|
||||
*
|
||||
* The number of auto-configured SLAAC addresses. Applicable only if OPENTHREAD_CONFIG_ENABLE_SLAAC is enabled.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_NUM_SLAAC_ADDRESSES
|
||||
#define OPENTHREAD_CONFIG_NUM_SLAAC_ADDRESSES 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_NCP_TX_BUFFER_SIZE
|
||||
*
|
||||
@@ -1346,19 +1286,6 @@
|
||||
#define OPENTHREAD_CONFIG_ENABLE_DEBUG_UART 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_ENABLE_DYNAMIC_MPL_INTERVAL
|
||||
*
|
||||
* Define as 1 to enable dynamic MPL interval feature.
|
||||
*
|
||||
* If this feature is enabled, the MPL forward interval will be adjusted dynamically according to
|
||||
* the network scale, which helps to reduce multicast latency.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_ENABLE_DYNAMIC_MPL_INTERVAL
|
||||
#define OPENTHREAD_CONFIG_ENABLE_DYNAMIC_MPL_INTERVAL 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_DISABLE_CSMA_CA_ON_LAST_ATTEMPT
|
||||
*
|
||||
@@ -1511,26 +1438,6 @@
|
||||
#define OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IPV6_DEFAULT_HOP_LIMIT
|
||||
*
|
||||
* This setting configures the default hop limit of IPv6.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IPV6_DEFAULT_HOP_LIMIT
|
||||
#define OPENTHREAD_CONFIG_IPV6_DEFAULT_HOP_LIMIT 64
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IPV6_DEFAULT_MAX_DATAGRAM
|
||||
*
|
||||
* This setting configures the max datagram length of IPv6.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IPV6_DEFAULT_MAX_DATAGRAM
|
||||
#define OPENTHREAD_CONFIG_IPV6_DEFAULT_MAX_DATAGRAM 1280
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_TIME_SYNC_JUMP_NOTIF_MIN_US
|
||||
*
|
||||
|
||||
@@ -104,8 +104,8 @@ class Ip6 : public InstanceLocator
|
||||
public:
|
||||
enum
|
||||
{
|
||||
kDefaultHopLimit = OPENTHREAD_CONFIG_IPV6_DEFAULT_HOP_LIMIT,
|
||||
kMaxDatagramLength = OPENTHREAD_CONFIG_IPV6_DEFAULT_MAX_DATAGRAM,
|
||||
kDefaultHopLimit = OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT,
|
||||
kMaxDatagramLength = OPENTHREAD_CONFIG_IP6_MAX_DATAGRAM_LENGTH,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -242,7 +242,7 @@ void Mpl::AddBufferedMessage(Message &aMessage, uint16_t aSeedId, uint8_t aSeque
|
||||
uint32_t nextTransmissionTime;
|
||||
uint8_t hopLimit = 0;
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_DYNAMIC_MPL_INTERVAL
|
||||
#if OPENTHREAD_CONFIG_MPL_DYNAMIC_INTERVAL_ENABLE
|
||||
// adjust the first MPL forward interval dynamically according to the network scale
|
||||
uint8_t interval = (kDataMessageInterval / Mle::kMaxRouters) * Get<RouterTable>().GetNeighborCount();
|
||||
#else
|
||||
|
||||
@@ -430,8 +430,8 @@ private:
|
||||
otIp6AddressCallback mAddressCallback;
|
||||
void * mAddressCallbackContext;
|
||||
|
||||
NetifUnicastAddress mExtUnicastAddresses[OPENTHREAD_CONFIG_MAX_EXT_IP_ADDRS];
|
||||
NetifMulticastAddress mExtMulticastAddresses[OPENTHREAD_CONFIG_MAX_EXT_MULTICAST_IP_ADDRS];
|
||||
NetifUnicastAddress mExtUnicastAddresses[OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS];
|
||||
NetifMulticastAddress mExtMulticastAddresses[OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS];
|
||||
|
||||
static const otNetifMulticastAddress kRealmLocalAllMplForwardersMulticastAddress;
|
||||
static const otNetifMulticastAddress kLinkLocalAllNodesMulticastAddress;
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "config/dhcp6_server.h"
|
||||
#include "config/diag.h"
|
||||
#include "config/dns_client.h"
|
||||
#include "config/ip6.h"
|
||||
|
||||
#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE || OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE || \
|
||||
OPENTHREAD_CONFIG_COMMISSIONER_ENABLE || OPENTHREAD_ENABLE_JOINER
|
||||
|
||||
@@ -56,7 +56,7 @@ ThreadNetif::ThreadNetif(Instance &aInstance)
|
||||
#if OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
|
||||
, mDhcp6Server(aInstance)
|
||||
#endif // OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
, mSlaac(aInstance)
|
||||
#endif
|
||||
#if OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
#include "thread/time_sync_service.hpp"
|
||||
#include "utils/child_supervision.hpp"
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
#include "utils/slaac_address.hpp"
|
||||
#endif
|
||||
|
||||
@@ -170,7 +170,7 @@ private:
|
||||
#if OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
|
||||
Dhcp6::Dhcp6Server mDhcp6Server;
|
||||
#endif // OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
Utils::Slaac mSlaac;
|
||||
#endif
|
||||
#if OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "crypto/sha256.hpp"
|
||||
#include "net/ip6_address.hpp"
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
|
||||
namespace ot {
|
||||
namespace Utils {
|
||||
@@ -335,4 +335,4 @@ exit:
|
||||
} // namespace Utils
|
||||
} // namespace ot
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#endif // OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
|
||||
@@ -148,7 +148,7 @@ private:
|
||||
bool mEnabled;
|
||||
otIp6SlaacPrefixFilter mFilter;
|
||||
Notifier::Callback mNotifierCallback;
|
||||
Ip6::NetifUnicastAddress mAddresses[OPENTHREAD_CONFIG_NUM_SLAAC_ADDRESSES];
|
||||
Ip6::NetifUnicastAddress mAddresses[OPENTHREAD_CONFIG_IP6_SLAAC_NUM_ADDRESSES];
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1789,7 +1789,7 @@ template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_CAPS>(void)
|
||||
SuccessOrExit(error = mEncoder.WriteUintPacked(SPINEL_CAP_OOB_STEERING_DATA));
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
SuccessOrExit(error = mEncoder.WriteUintPacked(SPINEL_CAP_SLAAC));
|
||||
#endif
|
||||
|
||||
|
||||
@@ -514,7 +514,7 @@ NcpBase::PropertyHandler NcpBase::FindGetPropertyHandler(spinel_prop_key_t aKey)
|
||||
handler = &NcpBase::HandlePropertyGet<SPINEL_PROP_RCP_VERSION>;
|
||||
break;
|
||||
#endif
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
case SPINEL_PROP_SLAAC_ENABLED:
|
||||
handler = &NcpBase::HandlePropertyGet<SPINEL_PROP_SLAAC_ENABLED>;
|
||||
break;
|
||||
@@ -864,7 +864,7 @@ NcpBase::PropertyHandler NcpBase::FindSetPropertyHandler(spinel_prop_key_t aKey)
|
||||
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_CHILD_SUPERVISION_CHECK_TIMEOUT>;
|
||||
break;
|
||||
#endif
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
case SPINEL_PROP_SLAAC_ENABLED:
|
||||
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_SLAAC_ENABLED>;
|
||||
break;
|
||||
|
||||
@@ -3055,7 +3055,7 @@ template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_RCP_VERSION>(void)
|
||||
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
|
||||
template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_SLAAC_ENABLED>(void)
|
||||
{
|
||||
@@ -3074,7 +3074,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
#endif // OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
|
||||
#if OPENTHREAD_ENABLE_LEGACY
|
||||
|
||||
|
||||
@@ -43,13 +43,13 @@
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_INFO "POSIX-APP"
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
* @def OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
*
|
||||
* 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
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE /* allows command line override */
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
|
||||
#endif
|
||||
|
||||
#define OPENTHREAD_CONFIG_UART_CLI_RAW 1
|
||||
|
||||
@@ -123,20 +123,20 @@
|
||||
#define OPENTHREAD_CONFIG_IP_ADDRS_PER_CHILD 10
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAX_EXT_IP_ADDRS
|
||||
* @def OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS
|
||||
*
|
||||
* The maximum number of supported IPv6 addresses allows to be externally added.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_CONFIG_MAX_EXT_IP_ADDRS 8
|
||||
#define OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 8
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAX_EXT_MULTICAST_IP_ADDRS
|
||||
* @def OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS
|
||||
*
|
||||
* The maximum number of supported IPv6 multicast addresses allows to be externally added.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_CONFIG_MAX_EXT_MULTICAST_IP_ADDRS 4
|
||||
#define OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 4
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_FILTER_SIZE
|
||||
@@ -337,12 +337,12 @@
|
||||
#define OPENTHREAD_CONFIG_NCP_ENABLE_MCU_POWER_STATE_CONTROL 1
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_ENABLE_SLAAC
|
||||
* @def OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
*
|
||||
* Define as 1 to enable support for adding of auto-configured SLAAC addresses by OpenThread.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_CONFIG_ENABLE_SLAAC 1
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
|
||||
|
||||
#if OPENTHREAD_RADIO
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user