![]() |
![]() |
OpenThread
1.05.03.02
|
#include <meshcop_tlvs.hpp>
Public Member Functions | |
const Ip6::NetworkPrefix & | GetMeshLocalPrefix (void) const |
uint8_t | GetMeshLocalPrefixLength (void) const |
void | Init (void) |
bool | IsValid (void) const |
void | SetMeshLocalPrefix (const Ip6::NetworkPrefix &aMeshLocalPrefix) |
![]() | |
Tlv * | GetNext (void) |
const Tlv * | GetNext (void) const |
Type | GetType (void) const |
void | SetType (Type aType) |
![]() | |
Error | AppendTo (Message &aMessage) const |
uint8_t | GetLength (void) const |
Tlv * | GetNext (void) |
const Tlv * | GetNext (void) const |
uint32_t | GetSize (void) const |
uint8_t | GetType (void) const |
uint8_t * | GetValue (void) |
const uint8_t * | GetValue (void) const |
bool | IsExtended (void) const |
void | SetLength (uint8_t aLength) |
void | SetType (uint8_t aType) |
Private Attributes | |
Ip6::NetworkPrefix | mMeshLocalPrefix |
Additional Inherited Members | |
![]() | |
enum | Type : uint8_t { kChannel = OT_MESHCOP_TLV_CHANNEL, kPanId = OT_MESHCOP_TLV_PANID, kExtendedPanId = OT_MESHCOP_TLV_EXTPANID, kNetworkName = OT_MESHCOP_TLV_NETWORKNAME, kPskc = OT_MESHCOP_TLV_PSKC, kNetworkKey = OT_MESHCOP_TLV_NETWORKKEY, kNetworkKeySequence = OT_MESHCOP_TLV_NETWORK_KEY_SEQUENCE, kMeshLocalPrefix = OT_MESHCOP_TLV_MESHLOCALPREFIX, kSteeringData = OT_MESHCOP_TLV_STEERING_DATA, kBorderAgentLocator = OT_MESHCOP_TLV_BORDER_AGENT_RLOC, kCommissionerId = OT_MESHCOP_TLV_COMMISSIONER_ID, kCommissionerSessionId = OT_MESHCOP_TLV_COMM_SESSION_ID, kSecurityPolicy = OT_MESHCOP_TLV_SECURITYPOLICY, kGet = OT_MESHCOP_TLV_GET, kActiveTimestamp = OT_MESHCOP_TLV_ACTIVETIMESTAMP, kCommissionerUdpPort = OT_MESHCOP_TLV_COMMISSIONER_UDP_PORT, kState = OT_MESHCOP_TLV_STATE, kJoinerDtlsEncapsulation = OT_MESHCOP_TLV_JOINER_DTLS, kJoinerUdpPort = OT_MESHCOP_TLV_JOINER_UDP_PORT, kJoinerIid = OT_MESHCOP_TLV_JOINER_IID, kJoinerRouterLocator = OT_MESHCOP_TLV_JOINER_RLOC, kJoinerRouterKek = OT_MESHCOP_TLV_JOINER_ROUTER_KEK, kProvisioningUrl = OT_MESHCOP_TLV_PROVISIONING_URL, kVendorName = OT_MESHCOP_TLV_VENDOR_NAME_TLV, kVendorModel = OT_MESHCOP_TLV_VENDOR_MODEL_TLV, kVendorSwVersion = OT_MESHCOP_TLV_VENDOR_SW_VERSION_TLV, kVendorData = OT_MESHCOP_TLV_VENDOR_DATA_TLV, kVendorStackVersion = OT_MESHCOP_TLV_VENDOR_STACK_VERSION_TLV, kUdpEncapsulation = OT_MESHCOP_TLV_UDP_ENCAPSULATION_TLV, kIp6Address = OT_MESHCOP_TLV_IPV6_ADDRESS_TLV, kPendingTimestamp = OT_MESHCOP_TLV_PENDINGTIMESTAMP, kDelayTimer = OT_MESHCOP_TLV_DELAYTIMER, kChannelMask = OT_MESHCOP_TLV_CHANNELMASK, kCount = OT_MESHCOP_TLV_COUNT, kPeriod = OT_MESHCOP_TLV_PERIOD, kScanDuration = OT_MESHCOP_TLV_SCAN_DURATION, kEnergyList = OT_MESHCOP_TLV_ENERGY_LIST, kDiscoveryRequest = OT_MESHCOP_TLV_DISCOVERYREQUEST, kDiscoveryResponse = OT_MESHCOP_TLV_DISCOVERYRESPONSE, kJoinerAdvertisement = OT_MESHCOP_TLV_JOINERADVERTISEMENT } |
![]() | |
typedef Ip6::NetworkPrefix | ValueType |
The TLV Value type. More... | |
![]() | |
static Error | FindTlv (const Message &aMessage, Type aType, uint16_t aMaxLength, Tlv &aTlv) |
template<typename TlvType > | |
static Error | FindTlv (const Message &aMessage, TlvType &aTlv) |
static Tlv * | FindTlv (uint8_t *aTlvsStart, uint16_t aTlvsLength, Type aType) |
static const Tlv * | FindTlv (const uint8_t *aTlvsStart, uint16_t aTlvsLength, Type aType) |
template<typename TlvType > | |
static TlvType * | FindTlv (uint8_t *aTlvsStart, uint16_t aTlvsLength) |
template<typename TlvType > | |
static const TlvType * | FindTlv (const uint8_t *aTlvsStart, uint16_t aTlvsLength) |
static bool | IsValid (const Tlv &aTlv) |
![]() | |
template<typename TlvType > | |
static Error | Append (Message &aMessage, const void *aValue, uint8_t aLength) |
template<typename SimpleTlvType > | |
static Error | Append (Message &aMessage, const typename SimpleTlvType::ValueType &aValue) |
template<typename UintTlvType > | |
static Error | Append (Message &aMessage, typename UintTlvType::UintValueType aValue) |
template<typename TlvType > | |
static Error | Find (const Message &aMessage, void *aValue, uint8_t aLength) |
template<typename SimpleTlvType > | |
static Error | Find (const Message &aMessage, typename SimpleTlvType::ValueType &aValue) |
template<typename UintTlvType > | |
static Error | Find (const Message &aMessage, typename UintTlvType::UintValueType &aValue) |
static Error | FindTlv (const Message &aMessage, uint8_t aType, uint16_t aMaxSize, Tlv &aTlv) |
template<typename TlvType > | |
static Error | FindTlv (const Message &aMessage, TlvType &aTlv) |
static Error | FindTlvOffset (const Message &aMessage, uint8_t aType, uint16_t &aOffset) |
static Error | FindTlvValueOffset (const Message &aMessage, uint8_t aType, uint16_t &aValueOffset, uint16_t &aLength) |
template<typename SimpleTlvType > | |
static Error | Read (const Message &aMessage, uint16_t aOffset, typename SimpleTlvType::ValueType &aValue) |
template<typename UintTlvType > | |
static Error | Read (const Message &aMessage, uint16_t aOffset, typename UintTlvType::UintValueType &aValue) |
static Error | ReadTlv (const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLength) |
![]() | |
static constexpr uint8_t | kBaseTlvMaxLength = OT_NETWORK_BASE_TLV_MAX_LENGTH |
![]() | |
static constexpr uint8_t | kType = kTlvTypeValue |
The TLV Type value. More... | |
![]() | |
static const uint8_t | kExtendedLength = 255 |
This class implements Mesh Local Prefix TLV generation and parsing.
|
inline |
This method initializes the TLV.
References Tlv::kMeshLocalPrefix, Tlv::SetLength(), and Tlv::SetType().
|
inline |
This method indicates whether or not the TLV appears to be well-formed.
TRUE | If the TLV appears to be well-formed. |
FALSE | If the TLV does not appear to be well-formed. |
References Tlv::GetLength().
|
inline |
This method returns the size (in bytes) of the Mesh Local Prefix field.
|
inline |
This method returns the Mesh Local Prefix value.
|
inline |
This method sets the Mesh Local Prefix value.
[in] | aMeshLocalPrefix | A pointer to the Mesh Local Prefix value. |
|
private |