mirror of
https://github.com/espressif/openthread.git
synced 2026-08-09 04:07:47 +00:00
[dua] support to specify iid for domain unicast address (#4900)
This commit is contained in:
@@ -53,7 +53,7 @@ extern "C" {
|
||||
* @note This number versions both OpenThread platform and user APIs.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_API_VERSION (2)
|
||||
#define OPENTHREAD_API_VERSION (3)
|
||||
|
||||
/**
|
||||
* @addtogroup api-instance
|
||||
|
||||
@@ -57,6 +57,24 @@ extern "C" {
|
||||
#define OT_IP6_IID_SIZE 8 ///< Size of an IPv6 Interface Identifier (bytes)
|
||||
#define OT_IP6_ADDRESS_SIZE 16 ///< Size of an IPv6 address (bytes)
|
||||
|
||||
/**
|
||||
* @struct otIp6InterfaceIdentifier
|
||||
*
|
||||
* This structure represents the Interface Identifier of an IPv6 address.
|
||||
*
|
||||
*/
|
||||
OT_TOOL_PACKED_BEGIN
|
||||
struct otIp6InterfaceIdentifier
|
||||
{
|
||||
uint8_t m8[OT_IP6_IID_SIZE]; ///< The Interface Identifier of an IPv6 address.
|
||||
} OT_TOOL_PACKED_END;
|
||||
|
||||
/**
|
||||
* This structure represents the Interface Identifier of an IPv6 address.
|
||||
*
|
||||
*/
|
||||
typedef struct otIp6InterfaceIdentifier otIp6InterfaceIdentifier;
|
||||
|
||||
/**
|
||||
* @struct otIp6Address
|
||||
*
|
||||
|
||||
@@ -477,7 +477,7 @@ otError otThreadSetNetworkName(otInstance *aInstance, const char *aNetworkName);
|
||||
/**
|
||||
* Get the Thread Domain Name.
|
||||
*
|
||||
* This function is only availble since Thread 1.2.
|
||||
* This function is only available since Thread 1.2.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
@@ -491,7 +491,7 @@ const char *otThreadGetDomainName(otInstance *aInstance);
|
||||
/**
|
||||
* Set the Thread Domain Name.
|
||||
*
|
||||
* This function is only availble since Thread 1.2.
|
||||
* This function is only available since Thread 1.2.
|
||||
* This function succeeds only when Thread protocols are disabled.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
@@ -505,6 +505,35 @@ const char *otThreadGetDomainName(otInstance *aInstance);
|
||||
*/
|
||||
otError otThreadSetDomainName(otInstance *aInstance, const char *aDomainName);
|
||||
|
||||
/**
|
||||
* Set/Clear the Interface Identifier manually specified for the Thread Domain Unicast Address.
|
||||
*
|
||||
* This function is only available since Thread 1.2 when `OPENTHREAD_CONFIG_DUA_ENABLE` is enabled.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aIid A pointer to the Interface Identifier to set or NULL to clear.
|
||||
*
|
||||
* @retval OT_ERROR_NONE Successfully set/cleared the Interface Identifier.
|
||||
* @retval OT_ERROR_INVALID_ARGS The specified Interface Identifier is reserved.
|
||||
*
|
||||
* @sa otThreadGetFixedDuaInterfaceIdentifier
|
||||
*/
|
||||
otError otThreadSetFixedDuaInterfaceIdentifier(otInstance *aInstance, const otIp6InterfaceIdentifier *aIid);
|
||||
|
||||
/**
|
||||
* Get the Interface Identifier manually specified for the Thread Domain Unicast Address.
|
||||
*
|
||||
* This function is only available since Thread 1.2 when `OPENTHREAD_CONFIG_DUA_ENABLE` is enabled.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @returns A pointer to the Interface Identifier which was set manually, or NULL if none was set.
|
||||
*
|
||||
* @sa otThreadSetFixedDuaInterfaceIdentifier
|
||||
*
|
||||
*/
|
||||
const otIp6InterfaceIdentifier *otThreadGetFixedDuaInterfaceIdentifier(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Get the thrKeySequenceCounter.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user