mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 03:37:46 +00:00
[meshcop] add MeshLocalPrefixTlv::GetMeshLocalPrefixLength() (#3930)
This commit is contained in:
@@ -150,7 +150,7 @@ otError DatasetManager::HandleSet(Coap::Message &aMessage, const Ip6::MessageInf
|
||||
if (Tlv::GetTlv(aMessage, Tlv::kMeshLocalPrefix, sizeof(meshLocalPrefix), meshLocalPrefix) == OT_ERROR_NONE &&
|
||||
meshLocalPrefix.IsValid() &&
|
||||
memcmp(&meshLocalPrefix.GetMeshLocalPrefix(), &Get<Mle::MleRouter>().GetMeshLocalPrefix(),
|
||||
meshLocalPrefix.GetLength()))
|
||||
meshLocalPrefix.GetMeshLocalPrefixLength()))
|
||||
{
|
||||
doesAffectConnectivity = true;
|
||||
}
|
||||
|
||||
@@ -606,6 +606,14 @@ public:
|
||||
*/
|
||||
bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); }
|
||||
|
||||
/**
|
||||
* This method returns the size (in bytes) of the Mesh Local Prefix field.
|
||||
*
|
||||
* @returns The size (in bytes) of the Mesh Local Prefix field (8 bytes).
|
||||
*
|
||||
*/
|
||||
uint8_t GetMeshLocalPrefixLength(void) const { return sizeof(mMeshLocalPrefix); }
|
||||
|
||||
/**
|
||||
* This method returns the Mesh Local Prefix value.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user