Home
last modified time | relevance | path

Searched refs:mLength (Results 1 – 25 of 101) sorted by relevance

12345

/openthread-3.6.0/src/core/common/
Dheap_array.hpp77 , mLength(0) in Array()
118 mLength = 0; in Clear()
127 IndexType GetLength(void) const { return mLength; } in GetLength()
137 const Type *AsCArray(void) const { return (mLength != 0) ? mArray : nullptr; } in AsCArray()
174 mLength = aOther.mLength; in TakeFrom()
177 aOther.mLength = 0; in TakeFrom()
216 Type *At(IndexType aIndex) { return (aIndex < mLength) ? &mArray[aIndex] : nullptr; } in At()
229 … const Type *At(IndexType aIndex) const { return (aIndex < mLength) ? &mArray[aIndex] : nullptr; } in At()
259 Type *Back(void) { return (mLength > 0) ? &mArray[mLength - 1] : nullptr; } in Back()
269 const Type *Back(void) const { return (mLength > 0) ? &mArray[mLength - 1] : nullptr; } in Back()
[all …]
Ddata.hpp130 mLength = aLength; in Init()
176 LengthType GetLength(void) const { return mLength; } in GetLength()
184 void SetLength(LengthType aLength) { mLength = aLength; } in SetLength()
194 void CopyBytesTo(void *aBuffer) const { memcpy(aBuffer, mBuffer, mLength); } in CopyBytesTo()
207 … bool MatchesBytesIn(const void *aBuffer) const { return memcmp(mBuffer, aBuffer, mLength) == 0; } in MatchesBytesIn()
223 return MatchBytes(mBuffer, static_cast<const uint8_t *>(aBuffer), mLength, aMatcher); in MatchesBytesIn()
237 return (mLength == aOtherData.mLength) && MatchesBytesIn(aOtherData.mBuffer); in operator ==()
254 return (mLength >= aOtherData.mLength) && aOtherData.MatchesBytesIn(mBuffer); in StartsWith()
259 LengthType mLength; member in ot::Data
278 using Base::mLength;
[all …]
Darray.hpp135 : mLength(0) in Array()
160 : mLength(0) in Array()
172 void Clear(void) { mLength = 0; } in Clear()
181 bool IsEmpty(void) const { return (mLength == 0); } in IsEmpty()
190 bool IsFull(void) const { return (mLength == GetMaxSize()); } in IsFull()
206 IndexType GetLength(void) const { return mLength; } in GetLength()
214 void SetLength(IndexType aLength) { mLength = aLength; } in SetLength()
266 Type *At(IndexType aIndex) { return (aIndex < mLength) ? &mElements[aIndex] : nullptr; } in At()
278 …const Type *At(IndexType aIndex) const { return (aIndex < mLength) ? &mElements[aIndex] : nullptr;… in At()
302 Type *Back(void) { return At(mLength - 1); } in Back()
[all …]
Dframe_builder.cpp51 mLength = 0; in Init()
76 memcpy(mBuffer + mLength, aBuffer, aLength); in AppendBytes()
77 mLength += aLength; in AppendBytes()
98 aMacAddress.GetExtended().CopyTo(mBuffer + mLength, Mac::ExtAddress::kReverseByteOrder); in AppendMacAddress()
99 mLength += sizeof(Mac::ExtAddress); in AppendMacAddress()
113 SuccessOrExit(error = aMessage.Read(aOffset, mBuffer + mLength, aLength)); in AppendBytesFromMessage()
114 mLength += aLength; in AppendBytesFromMessage()
130 OT_ASSERT(aOffset <= mLength); in InsertBytes()
134 memmove(mBuffer + aOffset + aLength, mBuffer + aOffset, mLength - aOffset); in InsertBytes()
136 mLength += aLength; in InsertBytes()
[all …]
Dframe_builder.hpp78 uint16_t GetLength(void) const { return mLength; } in GetLength()
105 uint16_t GetRemainingLength(void) const { return mMaxLength - mLength; } in GetRemainingLength()
117 …bool CanAppend(uint16_t aLength) const { return (static_cast<uint32_t>(mLength) + aLength) <= mMax… in CanAppend()
316 uint16_t mLength; member in ot::FrameBuilder
Dstring.cpp263 , mLength(0) in StringWriter()
272 mLength = 0; in Clear()
290 len = vsnprintf(mBuffer + mLength, (mSize > mLength ? (mSize - mLength) : 0), aFormat, aArgs); in AppendVarArgs()
293 mLength += static_cast<uint16_t>(len); in AppendVarArgs()
Dtlvs.hpp88 bool IsExtended(void) const { return (mLength == kExtendedLength); } in IsExtended()
100 uint8_t GetLength(void) const { return mLength; } in GetLength()
108 void SetLength(uint8_t aLength) { mLength = aLength; } in SetLength()
683 uint16_t mLength; member
699 uint8_t mLength; member in ot::Tlv
710 uint16_t GetLength(void) const { return BigEndian::HostSwap16(mLength); } in GetLength()
721 mLength = BigEndian::HostSwap16(aLength); in SetLength()
725 uint16_t mLength; member in ot::ExtendedTlv
Dtlvs.cpp92 aLength = info.mLength; in FindTlvValueOffset()
109 aValueEndOffset = info.mValueOffset + info.mLength; in FindTlvValueStartEndOffsets()
133 mLength = tlv.GetLength(); in ParseFrom()
141 mLength = extTlv.GetLength(); in ParseFrom()
150 VerifyOrExit(mLength <= aMessage.GetLength() - aOffset - headerSize, error = kErrorParse); in ParseFrom()
159 mSize = mLength + headerSize; in ParseFrom()
205 length = Min(info.mLength, static_cast<uint16_t>(aMaxStringLength)); in ReadStringTlv()
237 VerifyOrExit(info.mLength >= aMinLength, error = kErrorParse); in ReadTlvValue()
/openthread-3.6.0/third_party/tcplp/lib/
Dlbuf.c46 buffer->length = newentry->mLength; in lbuf_append()
51 buffer->length += newentry->mLength; in lbuf_append()
57 buffer->tail->mLength += numbytes; in lbuf_extend()
68 while (bytesleft >= curr->mLength - curroffset) { in lbuf_pop()
70 bytesleft -= (curr->mLength - curroffset); in lbuf_pop()
71 buffer->length -= (curr->mLength - curroffset); in lbuf_pop()
97 while (offsetleft > 0 && offsetleft >= curr->mLength) { in lbuf_getrange()
98 offsetleft -= curr->mLength; in lbuf_getrange()
104 while (bytesleft > 0 && bytesleft > curr->mLength) { in lbuf_getrange()
105 bytesleft -= curr->mLength; in lbuf_getrange()
[all …]
/openthread-3.6.0/src/core/meshcop/
Dmeshcop.hpp161 void Clear(void) { mLength = 0; } in Clear()
169 bool IsEmpty(void) const { return mLength == 0; } in IsEmpty()
185 uint8_t GetLength(void) const { return mLength; } in GetLength()
194 bool IsValid(void) const { return (0 < mLength) && (mLength <= kMaxLength); } in IsValid()
234 uint64_t GetMask(void) const { return (static_cast<uint64_t>(1ULL) << mLength) - 1; } in GetMask()
290 uint8_t GetLength(void) const { return mLength; } in GetLength()
338 bool PermitsAllJoiners(void) const { return (mLength > 0) && DoesAllMatch(kPermitAll); } in PermitsAllJoiners()
395 uint8_t GetNumBits(void) const { return (mLength * kBitsPerByte); } in GetNumBits()
397 uint8_t BitIndex(uint8_t aBit) const { return (mLength - 1 - (aBit / kBitsPerByte)); } in BitIndex()
Dmeshcop_tlvs.cpp174 entriesData.mLength = GetLength(); in ReadChannelMask()
187 …error = FindTlvValueOffset(aMessage, Tlv::kChannelMask, entriesData.mOffset, entriesData.mLength)); in FindIn()
210 VerifyOrExit(mLength > 0); // At least one entry. in Parse()
212 while (mLength > 0) in Parse()
214 VerifyOrExit(mLength > kEntryHeaderSize); in Parse()
232 VerifyOrExit(size <= mLength); in Parse()
249 mLength -= size; in Parse()
271 aValue.mLength = 0; in PrepareValue()
283 aValue.mLength += sizeof(Entry); in PrepareValue()
294 return Tlv::Append<ChannelMaskTlv>(aMessage, value.mData, value.mLength); in AppendTo()
Dmeshcop.cpp133 uint8_t remaining = mLength; in CopyTo()
164 return IsValid() && (mLength == aOther.mLength) && ((mValue & mask) == (aOther.mValue & mask)); in operator ==()
171 if (mLength <= BitSizeOf(uint16_t)) in ToString()
175 else if (mLength <= BitSizeOf(uint32_t)) in ToString()
185 string.Append("/len:%d", mLength); in ToString()
193 mLength = aLength; in Init()
221 OT_ASSERT((mLength > 0) && (mLength <= kMaxLength)); in UpdateBloomFilter()
247 …return (mLength > 0) && GetBit(aIndexes.mIndex[0] % GetNumBits()) && GetBit(aIndexes.mIndex[1] % G… in Contains()
279 for (uint8_t i = 0; i < mLength; i++) in DoesAllMatch()
Ddataset.cpp160 , mLength(0) in Dataset()
165 void Dataset::Clear(void) { mLength = 0; } in Clear()
182 const Tlv *Dataset::FindTlv(Tlv::Type aType) const { return As<Tlv>(Tlv::FindTlv(mTlvs, mLength, aT… in FindTlv()
256 memcpy(aDataset.mTlvs, mTlvs, mLength); in ConvertTo()
257 aDataset.mLength = static_cast<uint8_t>(mLength); in ConvertTo()
262 memcpy(mTlvs, aDataset.mTlvs, aDataset.mLength); in Set()
263 mLength = aDataset.mLength; in Set()
276 mLength = aDataset.mLength; in SetFrom()
277 memcpy(mTlvs, aDataset.mTlvs, mLength); in SetFrom()
318 IgnoreError(WriteTlv(Tlv::kChannelMask, value.mData, value.mLength)); in SetFrom()
[all …]
/openthread-3.6.0/src/lib/spinel/
Dspinel_decoder.hpp90 uint16_t GetLength(void) const { return mLength; } in GetLength()
106 uint16_t GetRemainingLength(void) const { return mLength - mIndex; } in GetRemainingLength()
114 bool IsAllRead(void) const { return (mIndex == mLength); } in IsAllRead()
572 void ClearSavedPosition(void) { mSavedIndex = mLength; } in ClearSavedPosition()
573 bool IsSavedPositionValid(void) const { return (mSavedIndex < mLength); } in IsSavedPositionValid()
576 uint16_t mLength; // Frame length (number of bytes). member in ot::Spinel::Decoder
/openthread-3.6.0/src/core/thread/
Dnetwork_data.cpp69 VerifyOrExit(aNetworkData.GetSize() >= mLength, error = kErrorNoBufs); in CopyNetworkData()
71 memcpy(aNetworkData.GetBytes(), mTlvs, mLength); in CopyNetworkData()
72 aNetworkData.SetLength(mLength); in CopyNetworkData()
554 TlvIterator tlvIterator(mTlvs, mLength); in FindPrefix()
572 TlvIterator tlvIterator(mTlvs, mLength); in FindService()
597 length = mLength; in FindNextService()
602 length = static_cast<uint8_t>((mTlvs + mLength) - tlvs); in FindNextService()
649 mLength += static_cast<uint8_t>(aTlvSize); in AppendTlv()
659 OT_ASSERT(CanInsert(aLength) && mTlvs <= start && start <= mTlvs + mLength); in Insert()
660 memmove(start + aLength, start, mLength - static_cast<size_t>(start - mTlvs)); in Insert()
[all …]
Dnetwork_data.hpp132 , mLength(aLength) in NetworkData()
147 , mLength(static_cast<uint8_t>(reinterpret_cast<const uint8_t *>(aEndTlv) - in NetworkData()
158 uint8_t GetLength(void) const { return mLength; } in GetLength()
425 …taTlv *GetTlvsEnd(void) const { return reinterpret_cast<const NetworkDataTlv *>(mTlvs + mLength); } in GetTlvsEnd()
583 uint8_t mLength; member in ot::NetworkData::NetworkData
635 void Clear(void) { mLength = 0; } in Clear()
644 void SetLength(uint8_t aLength) { mLength = aLength; } in SetLength()
721 bool CanInsert(uint16_t aSize) const { return (mLength + aSize <= mSize); } in CanInsert()
/openthread-3.6.0/src/core/net/
Dip4_types.cpp150 SuccessOrExit(StringParseUint8(cur, mLength, kMaxCidrLength)); in FromString()
161 aWriter.Append("%s/%d", AsCoreType(&mAddress).ToString().AsCString(), mLength); in ToString()
182 return (mLength == aOther.mLength) && in operator ==()
183 … (Ip6::Prefix::MatchLength(GetBytes(), aOther.GetBytes(), Ip4::Address::kSize) >= mLength); in operator ==()
189 mLength = aLength; in Set()
Dip6_address.cpp68 mLength = aLength; in Set()
73 return (mLength >= 10) && in IsLinkLocal()
77 bool Prefix::IsMulticast(void) const { return (mLength >= 8) && (mPrefix.mFields.m8[0] == 0xff); } in IsMulticast()
79 bool Prefix::IsUniqueLocal(void) const { return (mLength >= 7) && ((mPrefix.mFields.m8[0] & 0xfe) =… in IsUniqueLocal()
83 …return (mLength == aPrefixLength) && (MatchLength(GetBytes(), aPrefixBytes, GetBytesSize()) >= mLe… in IsEqual()
88 return (mLength >= aSubPrefix.mLength) && in ContainsPrefix()
94 return (mLength >= NetworkPrefix::kLength) && in ContainsPrefix()
101 uint8_t lastByteBitMask = ~(static_cast<uint8_t>(1 << (byteLength * 8 - mLength)) - 1); in Tidy()
116 …return (mLength == aOther.mLength) && (MatchLength(GetBytes(), aOther.GetBytes(), GetBytesSize()) … in operator ==()
191 SuccessOrExit(StringParseUint8(cur, mLength, kMaxLength)); in FromString()
[all …]
Dip6_headers.hpp412 uint8_t GetLength(void) const { return mLength; } in GetLength()
422 void SetLength(uint8_t aLength) { mLength = aLength; } in SetLength()
430 uint16_t GetSize(void) const { return kLengthUnitSize * (mLength + 1); } in GetSize()
439 uint8_t mLength; member in ot::Ip6::ExtensionHeader
502 uint8_t GetLength(void) const { return mLength; } in GetLength()
550 void SetLength(uint8_t aLength) { mLength = aLength; } in SetLength()
556 uint8_t mLength; member in ot::Ip6::Option
Dnat64_translator.cpp122 if (mIp4Cidr.mLength == 0 || !mNat64Prefix.IsValidNat64()) in TranslateFromIp6()
153 …ip4Header.GetDestination().ExtractFromIp6Address(mNat64Prefix.mLength, ip6Header.GetDestination()); in TranslateFromIp6()
213 if (mIp4Cidr.mLength == 0) in TranslateToIp6()
472 VerifyOrExit(aCidr.mLength > 0 && aCidr.mLength <= 32, err = kErrorInvalidArgs); in SetIp4Cidr()
478 if (aCidr.mLength == 32) in SetIp4Cidr()
483 else if (aCidr.mLength == 31) in SetIp4Cidr()
491 numberOfHosts = static_cast<uint32_t>((1 << (Ip4::Address::kSize * 8 - aCidr.mLength)) - 2); in SetIp4Cidr()
575 VerifyOrExit(mIp4Cidr.mLength > 0, err = kErrorNotFound); in GetIp4Cidr()
586 VerifyOrExit(mNat64Prefix.mLength > 0, err = kErrorNotFound); in GetIp6Prefix()
643 if (mIp4Cidr.mLength > 0 && mNat64Prefix.IsValidNat64()) in UpdateState()
/openthread-3.6.0/src/core/utils/
Dflash.hpp159 mLength = 0; in Init()
166 uint16_t GetLength(void) const { return mLength; } in GetLength()
167 void SetLength(uint16_t aLength) { mLength = aLength; } in SetLength()
169 uint16_t GetSize(void) const { return sizeof(*this) + ((mLength + 3) & 0xfffc); } in GetSize()
194 uint16_t mLength; member in ot::Flash::RecordHeader
/openthread-3.6.0/src/core/crypto/
Dstorage.cpp73 , mLength(aKey.GetLength()) in LiteralKey()
79 mLength = sizeof(mBuffer); in LiteralKey()
80 SuccessOrAssert(aKey.ExtractKey(mBuffer, mLength)); in LiteralKey()
/openthread-3.6.0/third_party/tcplp/lib/test/
Dtest_all.c85 memcpy(&buf_string[0], &first.mData[0], first.mLength); in cbuf_test()
88 memcpy(&buf_string[first.mLength], &second.mData[0], second.mLength); in cbuf_test()
90 buf_string[first.mLength + second.mLength] = '\0'; in cbuf_test()
92 buf_string[first.mLength] = '\0'; in cbuf_test()
/openthread-3.6.0/src/core/diags/
Dfactory_diags.hpp156 string.AppendHexBytes(mData, mLength); in ToString()
163 return (mLength != aOther.mLength) || (memcmp(mData, aOther.mData, mLength) != 0); in operator !=()
167 uint16_t mLength; member
/openthread-3.6.0/tests/unit/
Dtest_lowpan.hpp55 uint16_t mLength; member
172 mExtHeader.mLength = aExtHeaderLength; in SetExtHeader()
202 mIphcHeader.mLength = aIphcLength; in SetIphcHeader()
223 mPayload.mLength = aLength; in SetPayload()

12345