Home
last modified time | relevance | path

Searched refs:GetBytes (Results 1 – 25 of 71) sorted by relevance

123

/openthread-latest/tests/unit/
Dtest_data.cpp54 VerifyOrQuit(data.GetBytes() == nullptr); in TestData()
61 VerifyOrQuit(data.GetBytes() == &kData[0]); in TestData()
73 VerifyOrQuit(data2.GetBytes() == &kDataCopy[0]); in TestData()
80 VerifyOrQuit(data2.GetBytes() == &kDataCopy[0]); in TestData()
88 VerifyOrQuit(data2.GetBytes() == &kDataCopy[0]); in TestData()
98 VerifyOrQuit(data.GetBytes() == nullptr); in TestData()
109 VerifyOrQuit(data.GetBytes() == &u8); in TestData()
113 VerifyOrQuit(data.GetBytes() == reinterpret_cast<uint8_t *>(&u16)); in TestData()
138 VerifyOrQuit(mutableData.GetBytes() == nullptr); in TestMutableData()
142 VerifyOrQuit(mutableData.GetBytes() == &buffer[0]); in TestMutableData()
[all …]
Dtest_frame_builder.cpp69 VerifyOrQuit(frameBuilder.GetBytes() == buffer); in TestFrameBuilder()
77 VerifyOrQuit(frameBuilder.GetBytes() == buffer); in TestFrameBuilder()
86 VerifyOrQuit(frameBuilder.GetBytes() == buffer); in TestFrameBuilder()
99 VerifyOrQuit(frameBuilder.GetBytes() == buffer); in TestFrameBuilder()
106 VerifyOrQuit(frameBuilder.GetBytes() == buffer); in TestFrameBuilder()
112 VerifyOrQuit(frameBuilder.GetBytes() == buffer); in TestFrameBuilder()
119 VerifyOrQuit(frameBuilder.GetBytes() == buffer); in TestFrameBuilder()
123 VerifyOrQuit(frameBuilder.GetBytes() == buffer); in TestFrameBuilder()
130 VerifyOrQuit(frameBuilder.GetBytes() == buffer); in TestFrameBuilder()
136 VerifyOrQuit(frameBuilder.GetBytes() == buffer); in TestFrameBuilder()
[all …]
Dtest_ecdsa.cpp98 DumpBuffer("PublicKey", publicKey.GetBytes(), Ecdsa::P256::PublicKey::kSize); in TestEcdsaVector()
101 VerifyOrQuit(memcmp(publicKey.GetBytes(), kPublicKey, sizeof(kPublicKey)) == 0, in TestEcdsaVector()
109 DumpBuffer("Hash", hash.GetBytes(), sizeof(hash)); in TestEcdsaVector()
113 DumpBuffer("Signature", signature.GetBytes(), sizeof(signature)); in TestEcdsaVector()
120 VerifyOrQuit(memcmp(signature.GetBytes(), kExpectedSignature, sizeof(kExpectedSignature)) == 0); in TestEcdsaVector()
155 DumpBuffer("PublicKey", publicKey.GetBytes(), Ecdsa::P256::PublicKey::kSize); in TestEcdsaKeyGenerationSignAndVerify()
162 DumpBuffer("Hash", hash.GetBytes(), sizeof(hash)); in TestEcdsaKeyGenerationSignAndVerify()
166 DumpBuffer("Signature", signature.GetBytes(), sizeof(signature)); in TestEcdsaKeyGenerationSignAndVerify()
Dtest_heap_string.cpp153 void PrintData(const Heap::Data &aData) { DumpBuffer("data", aData.GetBytes(), aData.GetLength()); } in PrintData()
180 VerifyOrQuit(aData.GetBytes() == nullptr); in VerifyData()
187 VerifyOrQuit(aData.GetBytes() != nullptr); in VerifyData()
189 VerifyOrQuit(memcmp(aData.GetBytes(), aBytes, aLength) == 0, "Data content is incorrect"); in VerifyData()
249 oldBuffer = data.GetBytes(); in TestHeapData()
253 VerifyOrQuit(oldBuffer == data.GetBytes(), "did not reuse old buffer on same data length"); in TestHeapData()
Dtest_ip_address.cpp62 VerifyOrQuit(0 == memcmp(address.GetBytes(), aTestVector->mAddr, sizeof(AddressType)), in checkAddressFromString()
193 VerifyOrQuit(memcmp(prefix.GetBytes(), testVector.mAddr, sizeof(Ip6::Address)) == 0); in TestIp6AddressFromString()
273 VerifyOrQuit(0 == memcmp(cidr.GetBytes(), aTestVector->mAddr, sizeof(aTestVector->mAddr)), in checkCidrFromString()
445 prefix.Set(address.GetBytes(), aPrefixLength); in PrefixFrom()
494 VerifyOrQuit(prefix.IsEqual(subPrefix.GetBytes(), subPrefix.GetLength())); in TestIp6Prefix()
500 VerifyOrQuit(!prefix.IsEqual(subPrefix.GetBytes(), subPrefix.GetLength())); in TestIp6Prefix()
520 isPrefixSmaller = ((prefix.GetBytes()[index] & mask) == 0); in TestIp6Prefix()
835 prefix.Set(address.GetBytes(), testCase.mLength); in TestIp4Ip6Translation()
Dtest_lowpan.cpp241 memcpy(result + message->GetLength(), frameData.GetBytes(), frameData.GetLength()); in Test()
245 …VerifyOrQuit((frameData.GetBytes() - iphc) == aVector.mIphcHeader.mLength, "Lowpan::Decompress fai… in Test()
1893 …VerifyOrQuit(frameData.GetBytes() - frame == length, "ParseFrom() did not skip over parsed content… in TestLowpanMeshHeader()
1921 …VerifyOrQuit(frameData.GetBytes() - frame == length, "ParseFrom() did not skip over parsed content… in TestLowpanMeshHeader()
1936 …VerifyOrQuit(frameData.GetBytes() - kMeshHeader3 == length, "ParseFrom() did not skip over parsed … in TestLowpanMeshHeader()
1988 …VerifyOrQuit(frameData.GetBytes() - frame == length, "ParseFrom() did not skip over parsed content… in TestLowpanFragmentHeader()
1997 VerifyOrQuit(frameData.GetBytes() == frame); in TestLowpanFragmentHeader()
2028 …VerifyOrQuit(frameData.GetBytes() - frame == length, "ParseFrom() did not skip over parsed content… in TestLowpanFragmentHeader()
2037 VerifyOrQuit(frameData.GetBytes() == frame); in TestLowpanFragmentHeader()
2046 …VerifyOrQuit(frameData.GetBytes() - frame == length, "ParseFrom() did not skip over parsed content… in TestLowpanFragmentHeader()
[all …]
Dtest_dataset.cpp219 VerifyOrQuit(memcmp(dataset.GetBytes(), kTlvBytes, sizeof(kTlvBytes)) == 0); in TestDataset()
223 VerifyOrQuit(memcmp(dataset.GetBytes(), kTlvBytes, sizeof(kTlvBytes)) == 0); in TestDataset()
224 VerifyOrQuit(memcmp(dataset.GetBytes() + sizeof(kTlvBytes), kTlvBytes, sizeof(kTlvBytes)) == 0); in TestDataset()
/openthread-latest/src/core/common/
Ddata.hpp159 const uint8_t *GetBytes(void) const { return mBuffer; } in GetBytes() function in ot::Data
306 uint8_t *GetBytes(void) { return AsNonConst(Base::GetBytes()); } in GetBytes() function in ot::MutableData
313 const uint8_t *GetBytes(void) const { return Base::GetBytes(); } in GetBytes() function in ot::MutableData
318 void ClearBytes(void) { memset(GetBytes(), 0, mLength); } in ClearBytes()
361 return CopyBytesFrom(aData.GetBytes(), aData.GetLength()); in CopyBytesFrom()
Dheap_data.hpp79 bool IsNull(void) const { return (mData.GetBytes() == nullptr); } in IsNull()
86 const uint8_t *GetBytes(void) const { return mData.GetBytes(); } in GetBytes() function in ot::Heap::Data
148 …Error CopyBytesTo(Message &aMessage) const { return aMessage.AppendBytes(mData.GetBytes(), mData.G… in CopyBytesTo()
Dheap_data.cpp69 SuccessOrAssert(aMessage.Read(aOffset, mData.GetBytes(), aLength)); in SetFrom()
102 Heap::Free(mData.GetBytes()); in Free()
112 Heap::Free(mData.GetBytes()); in UpdateBuffer()
132 mData.Init(aData.mData.GetBytes(), aData.GetLength()); in TakeFrom()
Dframe_data.cpp92 memcpy(aBuffer, GetBytes(), aLength); in ReadBytes()
99 void FrameData::SkipOver(uint16_t aLength) { Init(GetBytes() + aLength, GetLength() - aLength); } in SkipOver()
/openthread-latest/src/core/radio/
Dtrel_packet.hpp266 uint8_t *GetBuffer(void) { return Base::GetBytes(); } in GetBuffer()
273 const uint8_t *GetBuffer(void) const { return Base::GetBytes(); } in GetBuffer()
295 Header &GetHeader(void) { return *reinterpret_cast<Header *>(Base::GetBytes()); } in GetHeader()
302 …const Header &GetHeader(void) const { return *reinterpret_cast<const Header *>(Base::GetBytes()); } in GetHeader()
309 uint8_t *GetPayload(void) { return Base::GetBytes() + GetHeader().GetLength(); } in GetPayload()
316 const uint8_t *GetPayload(void) const { return Base::GetBytes() + GetHeader().GetLength(); } in GetPayload()
/openthread-latest/src/core/net/
Dip6_address.cpp72 …return (mLength == aPrefixLength) && (MatchLength(GetBytes(), aPrefixBytes, GetBytesSize()) >= mLe… in IsEqual()
78 …(MatchLength(GetBytes(), aSubPrefix.GetBytes(), aSubPrefix.GetBytesSize()) >= aSubPrefix.GetLength… in ContainsPrefix()
84 (MatchLength(GetBytes(), aSubPrefix.m8, NetworkPrefix::kSize) >= NetworkPrefix::kLength); in ContainsPrefix()
105 …return (mLength == aOther.mLength) && (MatchLength(GetBytes(), aOther.GetBytes(), GetBytesSize()) … in operator ==()
115 matchedLength = MatchLength(GetBytes(), aOther.GetBytes(), SizeForLength(minLength)); in operator <()
123 …isSmaller = GetBytes()[matchedLength / kBitsPerByte] < aOther.GetBytes()[matchedLength / kBitsPerB… in operator <()
307 Address::CopyBits(mFields.m8, aPrefix.GetBytes() + NetworkPrefix::kSize, in ApplyPrefix()
391 memcpy(&mFields.m8[12], aIp4Address.GetBytes(), sizeof(Ip4::Address)); in SetToIp4Mapped()
396 …return Prefix::MatchLength(mFields.m8, aPrefix.GetBytes(), aPrefix.GetBytesSize()) >= aPrefix.GetL… in MatchesPrefix()
406 void Address::SetPrefix(const Prefix &aPrefix) { CopyBits(mFields.m8, aPrefix.GetBytes(), aPrefix.G… in SetPrefix()
[all …]
Dchecksum.cpp107 AddData(aSource.GetBytes(), sizeof(Ip6::Address)); in Calculate()
108 AddData(aDestination.GetBytes(), sizeof(Ip6::Address)); in Calculate()
118 AddData(chunk.GetBytes(), chunk.GetLength()); in Calculate()
135 AddData(aSource.GetBytes(), sizeof(Ip4::Address)); in Calculate()
136 AddData(aDestination.GetBytes(), sizeof(Ip4::Address)); in Calculate()
147 AddData(chunk.GetBytes(), chunk.GetLength()); in Calculate()
Dip4_types.cpp74 SetBytes(&aIp6Address.GetBytes()[12]); in ExtractFromIp4MappedIp6Address()
117 i = aIp6Address.GetBytes()[ip6Index++]; in ExtractFromIp6Address()
194 … (Ip6::Prefix::MatchLength(GetBytes(), aOther.GetBytes(), Ip4::Address::kSize) >= mLength); in operator ==()
Dip6_address.hpp108 const uint8_t *GetBytes(void) const { return mPrefix.mFields.m8; } in GetBytes() function in ot::Ip6::Prefix
394 const uint8_t *GetBytes(void) const { return mFields.m8; } in GetBytes() function in ot::Ip6::InterfaceIdentifier
564 const uint8_t *GetBytes(void) const { return mFields.m8; } in GetBytes() function in ot::Ip6::Address
853 SetMulticastNetworkPrefix(aPrefix.GetBytes(), aPrefix.GetLength()); in SetMulticastNetworkPrefix()
Dnd6.hpp736 return (mData.GetBytes() != nullptr) && (mData.GetLength() >= sizeof(Header)) && in IsValid()
745 …const Header &GetHeader(void) const { return *reinterpret_cast<const Header *>(mData.GetBytes()); } in GetHeader()
760 const uint8_t *GetOptionStart(void) const { return (mData.GetBytes() + sizeof(Header)); } in GetOptionStart()
776 const uint8_t *GetDataEnd(void) const { return mData.GetBytes() + mData.GetLength(); } in GetDataEnd()
/openthread-latest/src/core/thread/
Dnetwork_data.hpp158 const uint8_t *GetBytes(void) const { return mTlvs; } in GetBytes() function in ot::NetworkData::NetworkData
418 return FindPrefix(aPrefix.GetBytes(), aPrefix.GetLength()); in FindPrefix()
579 using NetworkData::GetBytes;
594 uint8_t *GetBytes(void) { return AsNonConst(AsConst(this)->GetBytes()); } in GetBytes() function in ot::NetworkData::MutableNetworkData
649 …PrefixTlv *FindPrefix(const Ip6::Prefix &aPrefix) { return FindPrefix(aPrefix.GetBytes(), aPrefix.… in FindPrefix()
Dlowpan.cpp183 memcmp(multicastContext.mPrefix.GetBytes(), aIpAddr.mFields.m8 + 4, 8) == 0) in CompressMulticast()
632 ip6HeaderBytes[1] |= (aFrameData.GetBytes()[0] & 0xc0) >> 2; in DecompressBaseHeader()
644 ip6HeaderBytes[1] |= aFrameData.GetBytes()[0] & 0x0f; in DecompressBaseHeader()
645 ip6HeaderBytes[2] |= aFrameData.GetBytes()[1]; in DecompressBaseHeader()
646 ip6HeaderBytes[3] |= aFrameData.GetBytes()[2]; in DecompressBaseHeader()
801 … memcpy(aIp6Header.GetDestination().mFields.m8 + 4, dstContext.mPrefix.GetBytes(), 8); in DecompressBaseHeader()
814 SuccessOrExit(DispatchToNextHeader(*aFrameData.GetBytes(), nextHeader)); in DecompressBaseHeader()
840 SuccessOrExit(DispatchToNextHeader(aFrameData.GetBytes()[len], hdr[0])); in DecompressExtensionHeader()
857 SuccessOrExit(aMessage.AppendBytes(aFrameData.GetBytes(), len)); in DecompressExtensionHeader()
983 byte = *aFrameData.GetBytes(); in Decompress()
[all …]
Dnetwork_data_local.cpp127 DumpDebg("AddPrefix", GetBytes(), GetLength()); in AddPrefix()
149 DumpDebg("RmvPrefix", GetBytes(), GetLength()); in RemovePrefix()
211 DumpDebg("AddService", GetBytes(), GetLength()); in AddService()
234 DumpDebg("RmvService", GetBytes(), GetLength()); in RemoveService()
/openthread-latest/src/posix/platform/
Dmulticast_routing.cpp165 memcpy(&ipv6mr.ipv6mr_multiaddr, aAddress.GetBytes(), sizeof(ipv6mr.ipv6mr_multiaddr)); in UpdateMldReport()
325 …memcpy(mf6cctl.mf6cc_origin.sin6_addr.s6_addr, aSrcAddr.GetBytes(), sizeof(mf6cctl.mf6cc_origin.si… in AddMulticastForwardingCache()
326 memcpy(mf6cctl.mf6cc_mcastgrp.sin6_addr.s6_addr, aGroupAddr.GetBytes(), in AddMulticastForwardingCache()
355 memcpy(mf6cctl.mf6cc_mcastgrp.sin6_addr.s6_addr, aGroupAddr.GetBytes(), in UnblockInboundMulticastForwardingCache()
371 memcpy(mf6cctl.mf6cc_origin.sin6_addr.s6_addr, mfc.mSrcAddr.GetBytes(), in UnblockInboundMulticastForwardingCache()
435 …memcpy(sioc_sg_req6.src.sin6_addr.s6_addr, aMfc.mSrcAddr.GetBytes(), sizeof(sioc_sg_req6.src.sin6_… in UpdateMulticastRouteInfo()
436 …memcpy(sioc_sg_req6.grp.sin6_addr.s6_addr, aMfc.mGroupAddr.GetBytes(), sizeof(sioc_sg_req6.grp.sin… in UpdateMulticastRouteInfo()
596 memcpy(mf6cctl.mf6cc_origin.sin6_addr.s6_addr, aMfc.mSrcAddr.GetBytes(), in RemoveMulticastForwardingCache()
598 memcpy(mf6cctl.mf6cc_mcastgrp.sin6_addr.s6_addr, aMfc.mGroupAddr.GetBytes(), in RemoveMulticastForwardingCache()
/openthread-latest/src/core/crypto/
Decdsa.hpp105 const uint8_t *GetBytes(void) const { return m8; } in GetBytes() function in ot::Crypto::Ecdsa::P256::Signature
312 const uint8_t *GetBytes(void) const { return m8; } in GetBytes() function in ot::Crypto::Ecdsa::P256::PublicKey
Dstorage.hpp288 const uint8_t *GetBytes(void) const { return mKey; } in GetBytes() function in ot::Crypto::Key
370 const uint8_t *GetBytes(void) const { return mKey; } in GetBytes() function in ot::Crypto::LiteralKey
Dsha256.hpp82 const uint8_t *GetBytes(void) const { return m8; } in GetBytes() function in ot::Crypto::Sha256::Hash
/openthread-latest/src/core/border_router/
Dinfra_if.cpp88 … return otPlatInfraIfSendIcmp6Nd(mIfIndex, &aDestination, aPacket.GetBytes(), aPacket.GetLength()); in Send()
97 VerifyOrExit(aPacket.GetBytes() != nullptr, error = kErrorInvalidArgs); in HandledReceived()

123