/external/openthread/src/core/net/ |
D | ip6_address.cpp | 72 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 …]
|
D | ip6_address.hpp | 224 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);
|
D | ip4_types.cpp | 84 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()
|
D | nd6.cpp | 152 uint8_t RouteInfoOption::OptionLengthForPrefix(uint8_t aPrefixLength) in OptionLengthForPrefix() argument 166 if (aPrefixLength == kMaxPrefixLenForOptionLen1) in OptionLengthForPrefix() 170 else if (aPrefixLength <= kMaxPrefixLenForOptionLen2) in OptionLengthForPrefix()
|
D | nd6.hpp | 410 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()
|
D | netif.cpp | 625 void Netif::UnicastAddress::InitAsSlaacOrigin(uint8_t aPrefixLength, bool aPreferred) in InitAsSlaacOrigin() argument 628 mPrefixLength = aPrefixLength; in InitAsSlaacOrigin()
|
D | netif.hpp | 145 void InitAsSlaacOrigin(uint8_t aPrefixLength, bool aPreferred);
|
D | ip4_types.hpp | 139 void ExtractFromIp6Address(uint8_t aPrefixLength, const Ip6::Address &aIp6Address);
|
/external/openthread/tests/unit/ |
D | test_ip_address.cpp | 197 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()
|
D | test_routing_manager.cpp | 345 Ip6::Prefix PrefixFromString(const char *aString, uint8_t aPrefixLength) in PrefixFromString() argument 350 prefix.mLength = aPrefixLength; in PrefixFromString()
|
/external/openthread/src/core/thread/ |
D | network_data_tlvs.hpp | 645 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()
|
D | network_data.hpp | 424 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()
|
D | network_data.cpp | 509 const PrefixTlv *NetworkData::FindPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const in FindPrefix() 516 if (prefixTlv->IsEqual(aPrefix, aPrefixLength)) in FindPrefix()
|