Home
last modified time | relevance | path

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

1234

/openthread-3.4.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()
82 memcpy(mBuffer + mLength, aBuffer, aLength); in AppendBytes()
83 mLength += aLength; in AppendBytes()
104 aMacAddress.GetExtended().CopyTo(mBuffer + mLength, Mac::ExtAddress::kReverseByteOrder); in AppendMacAddress()
105 mLength += sizeof(Mac::ExtAddress); in AppendMacAddress()
119 SuccessOrExit(error = aMessage.Read(aOffset, mBuffer + mLength, aLength)); in AppendBytesFromMessage()
120 mLength += aLength; in AppendBytesFromMessage()
136 OT_ASSERT(aOffset <= mLength); in InsertBytes()
140 memmove(mBuffer + aOffset + aLength, mBuffer + aOffset, mLength - aOffset); in InsertBytes()
142 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
Dtlvs.hpp89 bool IsExtended(void) const { return (mLength == kExtendedLength); } in IsExtended()
101 uint8_t GetLength(void) const { return mLength; } in GetLength()
109 void SetLength(uint8_t aLength) { mLength = aLength; } in SetLength()
510 uint16_t mLength; member
526 uint8_t mLength; member in ot::Tlv
537 uint16_t GetLength(void) const { return HostSwap16(mLength); } in GetLength()
548 mLength = HostSwap16(aLength); in SetLength()
552 uint16_t mLength; member in ot::ExtendedTlv
Dstring.cpp234 , mLength(0) in StringWriter()
243 mLength = 0; in Clear()
261 len = vsnprintf(mBuffer + mLength, (mSize > mLength ? (mSize - mLength) : 0), aFormat, aArgs); in AppendVarArgs()
264 mLength += static_cast<uint16_t>(len); in AppendVarArgs()
Dtlvs.cpp97 aLength = info.mLength; in FindTlvValueOffset()
121 mLength = tlv.GetLength(); in ParseFrom()
129 mLength = extTlv.GetLength(); in ParseFrom()
138 VerifyOrExit(mLength <= aMessage.GetLength() - aOffset - headerSize, error = kErrorParse); in ParseFrom()
147 mSize = mLength + headerSize; in ParseFrom()
193 length = Min(info.mLength, static_cast<uint16_t>(aMaxStringLength)); in ReadStringTlv()
225 VerifyOrExit(info.mLength >= aMinLength, error = kErrorParse); in ReadTlvValue()
/openthread-3.4.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.4.0/src/core/meshcop/
Dmeshcop.hpp162 void Clear(void) { mLength = 0; } in Clear()
170 bool IsEmpty(void) const { return mLength == 0; } in IsEmpty()
186 uint8_t GetLength(void) const { return mLength; } in GetLength()
195 bool IsValid(void) const { return (0 < mLength) && (mLength <= kMaxLength); } in IsValid()
235 uint64_t GetMask(void) const { return (static_cast<uint64_t>(1ULL) << mLength) - 1; } in GetMask()
291 uint8_t GetLength(void) const { return mLength; } in GetLength()
339 bool PermitsAllJoiners(void) const { return (mLength > 0) && DoesAllMatch(kPermitAll); } in PermitsAllJoiners()
396 uint8_t GetNumBits(void) const { return (mLength * CHAR_BIT); } in GetNumBits()
398 uint8_t BitIndex(uint8_t aBit) const { return (mLength - 1 - (aBit / CHAR_BIT)); } in BitIndex()
Ddataset.cpp160 , mLength(0) in Dataset()
165 void Dataset::Clear(void) { mLength = 0; } in Clear()
182 const Tlv *Dataset::GetTlv(Tlv::Type aType) const { return Tlv::FindTlv(mTlvs, mLength, aType); } in GetTlv()
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()
398 uint16_t bytesAvailable = sizeof(mTlvs) - mLength; in SetTlv()
[all …]
Dmeshcop.cpp132 uint8_t remaining = mLength; in CopyTo()
163 return IsValid() && (mLength == aOther.mLength) && ((mValue & mask) == (aOther.mValue & mask)); in operator ==()
170 if (mLength <= sizeof(uint16_t) * CHAR_BIT) in ToString()
174 else if (mLength <= sizeof(uint32_t) * CHAR_BIT) in ToString()
184 string.Append("/len:%d", mLength); in ToString()
192 mLength = aLength; in Init()
220 OT_ASSERT((mLength > 0) && (mLength <= kMaxLength)); in UpdateBloomFilter()
246 …return (mLength > 0) && GetBit(aIndexes.mIndex[0] % GetNumBits()) && GetBit(aIndexes.mIndex[1] % G… in Contains()
278 for (uint8_t i = 0; i < mLength; i++) in DoesAllMatch()
/openthread-3.4.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.4.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.4.0/src/core/net/
Dip4_types.cpp148 SuccessOrExit(StringParseUint8(cur, mLength, kMaxCidrLength)); in FromString()
159 aWriter.Append("%s/%d", AsCoreType(&mAddress).ToString().AsCString(), mLength); in ToString()
180 return (mLength == aOther.mLength) && in operator ==()
181 … (Ip6::Prefix::MatchLength(GetBytes(), aOther.GetBytes(), Ip4::Address::kSize) >= mLength); in operator ==()
187 mLength = aLength; in Set()
Dip6_address.cpp70 mLength = aLength; in Set()
75 return (mLength >= 10) && ((mPrefix.mFields.m16[0] & HostSwap16(0xffc0)) == HostSwap16(0xfe80)); in IsLinkLocal()
78 bool Prefix::IsMulticast(void) const { return (mLength >= 8) && (mPrefix.mFields.m8[0] == 0xff); } in IsMulticast()
80 bool Prefix::IsUniqueLocal(void) const { return (mLength >= 7) && ((mPrefix.mFields.m8[0] & 0xfe) =… in IsUniqueLocal()
84 …return (mLength == aPrefixLength) && (MatchLength(GetBytes(), aPrefixBytes, GetBytesSize()) >= mLe… in IsEqual()
89 return (mLength >= aSubPrefix.mLength) && in ContainsPrefix()
95 return (mLength >= NetworkPrefix::kLength) && in ContainsPrefix()
102 uint8_t lastByteBitMask = ~(static_cast<uint8_t>(1 << (byteLength * 8 - mLength)) - 1); in Tidy()
117 …return (mLength == aOther.mLength) && (MatchLength(GetBytes(), aOther.GetBytes(), GetBytesSize()) … in operator ==()
192 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.cpp120 if (mIp4Cidr.mLength == 0 || !mNat64Prefix.IsValidNat64()) in TranslateFromIp6()
151 …ip4Header.GetDestination().ExtractFromIp6Address(mNat64Prefix.mLength, ip6Header.GetDestination()); in TranslateFromIp6()
211 if (mIp4Cidr.mLength == 0) in TranslateToIp6()
470 VerifyOrExit(aCidr.mLength > 0 && aCidr.mLength <= 32, err = kErrorInvalidArgs); in SetIp4Cidr()
476 if (aCidr.mLength == 32) in SetIp4Cidr()
481 else if (aCidr.mLength == 31) in SetIp4Cidr()
489 numberOfHosts = static_cast<uint32_t>((1 << (Ip4::Address::kSize * 8 - aCidr.mLength)) - 2); in SetIp4Cidr()
572 VerifyOrExit(mIp4Cidr.mLength > 0, err = kErrorNotFound); in GetIp4Cidr()
583 VerifyOrExit(mNat64Prefix.mLength > 0, err = kErrorNotFound); in GetIp6Prefix()
640 if (mIp4Cidr.mLength > 0 && mNat64Prefix.IsValidNat64()) in UpdateState()
/openthread-3.4.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.4.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.4.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.4.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.4.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()
/openthread-3.4.0/src/core/mac/
Dmac_frame.cpp149 mLength = builder.GetLength(); in InitMacHeader()
157 mLength += CalculateSecurityHeaderSize(secCtl); in InitMacHeader()
158 mLength += CalculateMicSize(secCtl); in InitMacHeader()
163 mLength += kCommandIdSize; in InitMacHeader()
166 mLength += GetFcsSize(); in InitMacHeader()
177 VerifyOrExit((index + GetFooterLength()) <= mLength, error = kErrorParse); in ValidatePsdu()
529 VerifyOrExit(kFcfSize < mLength, index = kInvalidIndex); in FindSecurityHeaderIndex()
753 uint16_t Frame::GetPayloadLength(void) const { return mLength - (GetHeaderLength() + GetFooterLengt… in GetPayloadLength()
755 void Frame::SetPayloadLength(uint16_t aLength) { mLength = GetHeaderLength() + GetFooterLength() + … in SetPayloadLength()
768 VerifyOrExit(index < mLength, index = kInvalidIndex); in SkipSecurityHeaderIndex()
[all …]

1234