Home
last modified time | relevance | path

Searched refs:aPrefixLength (Results 1 – 13 of 13) sorted by relevance

/external/openthread/src/core/net/
Dip6_address.cpp72 bool Prefix::IsEqual(const uint8_t *aPrefixBytes, uint8_t aPrefixLength) const in IsEqual()
74 …return (mLength == aPrefixLength) && (MatchLength(GetBytes(), aPrefixBytes, GetBytesSize()) >= mLe… in IsEqual()
368 bool Address::MatchesPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const in MatchesPrefix()
370 …rn Prefix::MatchLength(mFields.m8, aPrefix, Prefix::SizeForLength(aPrefixLength)) >= aPrefixLength; in MatchesPrefix()
383 void Address::SetPrefix(uint8_t aOffset, const uint8_t *aPrefix, uint8_t aPrefixLength) in SetPrefix() argument
385 uint8_t bytes = aPrefixLength / CHAR_BIT; in SetPrefix()
386 uint8_t extraBits = aPrefixLength % CHAR_BIT; in SetPrefix()
388 OT_ASSERT(aPrefixLength <= (sizeof(Address) - aOffset) * CHAR_BIT); in SetPrefix()
406 void Address::SetMulticastNetworkPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) in SetMulticastNetworkPrefix() argument
408 SetPrefix(kMulticastNetworkPrefixOffset, aPrefix, aPrefixLength); in SetMulticastNetworkPrefix()
[all …]
Dip6_address.hpp224 bool IsEqual(const uint8_t *aPrefixBytes, uint8_t aPrefixLength) const;
830 bool MatchesPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const;
842 …void SetPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) { SetPrefix(0, aPrefix, aPrefixLengt… in SetPrefix() argument
870 void SetMulticastNetworkPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength);
1010 void SetPrefix(uint8_t aOffset, const uint8_t *aPrefix, uint8_t aPrefixLength);
Dip4_types.cpp84 void Address::ExtractFromIp6Address(uint8_t aPrefixLength, const Ip6::Address &aIp6Address) in ExtractFromIp6Address() argument
110 OT_ASSERT(Ip6::Prefix::IsValidNat64PrefixLength(aPrefixLength)); in ExtractFromIp6Address()
112 ip6Index = aPrefixLength / CHAR_BIT; in ExtractFromIp6Address()
Dnd6.cpp152 uint8_t RouteInfoOption::OptionLengthForPrefix(uint8_t aPrefixLength) in OptionLengthForPrefix() argument
166 if (aPrefixLength == kMaxPrefixLenForOptionLen1) in OptionLengthForPrefix()
170 else if (aPrefixLength <= kMaxPrefixLenForOptionLen2) in OptionLengthForPrefix()
Dnd6.hpp410 static uint8_t OptionLengthForPrefix(uint8_t aPrefixLength);
420 static uint16_t OptionSizeForPrefix(uint8_t aPrefixLength) in OptionSizeForPrefix() argument
422 return kLengthUnit * OptionLengthForPrefix(aPrefixLength); in OptionSizeForPrefix()
Dnetif.cpp625 void Netif::UnicastAddress::InitAsSlaacOrigin(uint8_t aPrefixLength, bool aPreferred) in InitAsSlaacOrigin() argument
628 mPrefixLength = aPrefixLength; in InitAsSlaacOrigin()
Dnetif.hpp145 void InitAsSlaacOrigin(uint8_t aPrefixLength, bool aPreferred);
Dip4_types.hpp139 void ExtractFromIp6Address(uint8_t aPrefixLength, const Ip6::Address &aIp6Address);
/external/openthread/tests/unit/
Dtest_ip_address.cpp197 bool CheckPrefix(const ot::Ip6::Address &aAddress, const uint8_t *aPrefix, uint8_t aPrefixLength) in CheckPrefix() argument
203 for (uint8_t bit = 0; bit < aPrefixLength; bit++) in CheckPrefix()
218 …faceId(const ot::Ip6::Address &aAddress1, const ot::Ip6::Address &aAddress2, uint8_t aPrefixLength) in CheckInterfaceId() argument
224 for (uint8_t bit = aPrefixLength; bit < sizeof(ot::Ip6::Address) * CHAR_BIT; bit++) in CheckInterfaceId()
278 ot::Ip6::Prefix PrefixFrom(const char *aAddressString, uint8_t aPrefixLength) in PrefixFrom() argument
284 prefix.Set(address.GetBytes(), aPrefixLength); in PrefixFrom()
Dtest_routing_manager.cpp345 Ip6::Prefix PrefixFromString(const char *aString, uint8_t aPrefixLength) in PrefixFromString() argument
350 prefix.mLength = aPrefixLength; in PrefixFromString()
/external/openthread/src/core/thread/
Dnetwork_data_tlvs.hpp645 void Init(uint8_t aDomainId, uint8_t aPrefixLength, const uint8_t *aPrefix) in Init() argument
650 mPrefixLength = aPrefixLength; in Init()
651 memcpy(GetPrefix(), aPrefix, Ip6::Prefix::SizeForLength(aPrefixLength)); in Init()
742 bool IsEqual(const uint8_t *aPrefix, uint8_t aPrefixLength) const in IsEqual()
744 return (aPrefixLength == mPrefixLength) && in IsEqual()
745 … (Ip6::Prefix::MatchLength(GetPrefix(), aPrefix, Ip6::Prefix::SizeForLength(aPrefixLength)) >= in IsEqual()
905 static uint16_t CalculateSize(uint8_t aPrefixLength) in CalculateSize() argument
907 return sizeof(PrefixTlv) + Ip6::Prefix::SizeForLength(aPrefixLength); in CalculateSize()
Dnetwork_data.hpp424 const PrefixTlv *FindPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const;
681 PrefixTlv *FindPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) in FindPrefix() argument
683 return AsNonConst(AsConst(this)->FindPrefix(aPrefix, aPrefixLength)); in FindPrefix()
Dnetwork_data.cpp509 const PrefixTlv *NetworkData::FindPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const in FindPrefix()
516 if (prefixTlv->IsEqual(aPrefix, aPrefixLength)) in FindPrefix()