[ip6] define NetworkPrefix type (#5213)

This commit adds `Ip6::NetworkPrefix` mirroring `otIp6NetworkPrefix`
which represents the Network Prefix (most significant 64 bits) of an
IPv6 address. Methods in `Ip6::Address` are updated to use the new
type. The `otMeshLocalPrefix` and `Mle::MeshLocalPrefix` are also
updated use the `NetworkPrefix` type.
This commit is contained in:
Abtin Keshavarzian
2020-07-20 08:38:16 -07:00
committed by GitHub
parent 434e6bbffc
commit d5370ac4cd
8 changed files with 78 additions and 46 deletions
+2 -12
View File
@@ -99,23 +99,13 @@ struct otExtendedPanId
*/
typedef struct otExtendedPanId otExtendedPanId;
#define OT_MESH_LOCAL_PREFIX_SIZE 8 ///< Size of the Mesh Local Prefix (bytes)
#define OT_MESH_LOCAL_PREFIX_SIZE OT_IP6_PREFIX_SIZE ///< Size of the Mesh Local Prefix (bytes)
/**
* This structure represents a Mesh Local Prefix.
*
*/
OT_TOOL_PACKED_BEGIN
struct otMeshLocalPrefix
{
uint8_t m8[OT_MESH_LOCAL_PREFIX_SIZE]; ///< Byte values
} OT_TOOL_PACKED_END;
/**
* This structure represents a Mesh Local Prefix.
*
*/
typedef struct otMeshLocalPrefix otMeshLocalPrefix;
typedef otIp6NetworkPrefix otMeshLocalPrefix;
#define OT_PSKC_MAX_SIZE 16 ///< Maximum size of the PSKc (bytes)
+1 -1
View File
@@ -53,7 +53,7 @@ extern "C" {
* @note This number versions both OpenThread platform and user APIs.
*
*/
#define OPENTHREAD_API_VERSION (16)
#define OPENTHREAD_API_VERSION (17)
/**
* @addtogroup api-instance