Home
last modified time | relevance | path

Searched refs:GetOffset (Results 1 – 25 of 39) sorted by relevance

12

/openthread-2.7.6/src/core/net/
Dip6.cpp554 SuccessOrExit(error = aMessage.Read(aMessage.GetOffset(), hbhHeader)); in HandleOptions()
555 endOffset = aMessage.GetOffset() + (hbhHeader.GetLength() + 1) * 8; in HandleOptions()
561 while (aMessage.GetOffset() < endOffset) in HandleOptions()
563 SuccessOrExit(error = aMessage.Read(aMessage.GetOffset(), optionHeader)); in HandleOptions()
571 … VerifyOrExit(aMessage.GetOffset() + sizeof(optionHeader) + optionHeader.GetLength() <= endOffset, in HandleOptions()
620 … FragmentHeader::MakeDivisibleByEight(kMinimalMtu - aMessage.GetOffset() - sizeof(fragmentHeader)); in FragmentDatagram()
621 uint16_t payloadLeft = aMessage.GetLength() - aMessage.GetOffset(); in FragmentDatagram()
652 …SuccessOrExit(error = fragment->SetLength(aMessage.GetOffset() + sizeof(fragmentHeader) + payloadF… in FragmentDatagram()
657 fragment->SetOffset(aMessage.GetOffset()); in FragmentDatagram()
658 fragment->Write(aMessage.GetOffset(), fragmentHeader); in FragmentDatagram()
[all …]
Dchecksum.cpp98 uint16_t length = aMessage.GetLength() - aMessage.GetOffset(); in Calculate()
109 aMessage.GetFirstChunk(aMessage.GetOffset(), length, chunk); in Calculate()
154 checksum.WriteToMessage(aMessage.GetOffset() + headerOffset, aMessage); in UpdateMessageChecksum()
Dicmp6.cpp131 SuccessOrExit(error = aMessage.Read(aMessage.GetOffset(), icmp6Header)); in HandleMessage()
196 …payloadLength = aRequestMessage.GetLength() - aRequestMessage.GetOffset() - Header::kDataFieldOffs… in HandleEchoRequest()
200 …aRequestMessage.CopyTo(aRequestMessage.GetOffset() + Header::kDataFieldOffset, Header::kDataFieldO… in HandleEchoRequest()
212 IgnoreError(replyMessage->Read(replyMessage->GetOffset(), icmp6Header)); in HandleEchoRequest()
Ddhcp6_server.cpp192 SuccessOrExit(aMessage.Read(aMessage.GetOffset(), header)); in HandleUdpReceive()
209 uint16_t offset = aMessage.GetOffset(); in ProcessSolicit()
210 uint16_t length = aMessage.GetLength() - aMessage.GetOffset(); in ProcessSolicit()
Dudp6.cpp481 SuccessOrExit(error = aMessage.Read(aMessage.GetOffset(), udpHeader)); in HandleMessage()
534 aMessage.RemoveHeader(aMessage.GetOffset()); in HandlePayload()
535 OT_ASSERT(aMessage.GetOffset() == 0); in HandlePayload()
Ddhcp6_client.cpp410 SuccessOrExit(aMessage.Read(aMessage.GetOffset(), header)); in HandleUdpReceive()
424 uint16_t offset = aMessage.GetOffset(); in ProcessReply()
425 uint16_t length = aMessage.GetLength() - aMessage.GetOffset(); in ProcessReply()
Dip6_headers.hpp566 …uint16_t GetOffset(void) const { return (HostSwap16(mOffsetMore) & kOffsetMask) >> kOffsetOffset; } in GetOffset() function in ot::Ip6::FragmentHeader
Dsntp_client.cpp348 SuccessOrExit(aMessage.Read(aMessage.GetOffset(), responseHeader)); in HandleUdpReceive()
/openthread-2.7.6/src/core/meshcop/
Dborder_agent.cpp200 if (aResponse->GetLength() > aResponse->GetOffset()) in HandleCoapResponse()
373 uint16_t udpLength = aMessage.GetLength() - aMessage.GetOffset(); in HandleUdpReceive()
383 aMessage.CopyTo(aMessage.GetOffset(), offset, udpLength, *message); in HandleUdpReceive()
410 if (aMessage.GetLength() > aMessage.GetOffset()) in HandleRelayReceive()
428 …essOrExit(error = aForwardMessage.SetLength(offset + aMessage.GetLength() - aMessage.GetOffset())); in ForwardToCommissioner()
429 …aMessage.CopyTo(aMessage.GetOffset(), offset, aMessage.GetLength() - aMessage.GetOffset(), aForwar… in ForwardToCommissioner()
471 SuccessOrExit(error = message->SetLength(offset + aMessage.GetLength() - aMessage.GetOffset())); in HandleRelayTransmit()
472 …aMessage.CopyTo(aMessage.GetOffset(), offset, aMessage.GetLength() - aMessage.GetOffset(), *messag… in HandleRelayTransmit()
516 if (aMessage.GetLength() - aMessage.GetOffset() > 0) in ForwardToLeader()
522 SuccessOrExit(error = message->SetLength(offset + aMessage.GetLength() - aMessage.GetOffset())); in ForwardToLeader()
[all …]
Ddataset_manager_ftd.cpp75 uint16_t offset = aMessage.GetOffset(); in HandleSet()
108 VerifyOrExit((offset - aMessage.GetOffset()) <= Dataset::kMaxSize); in HandleSet()
200 offset = aMessage.GetOffset(); in HandleSet()
459 uint16_t offset = aMessage.GetOffset(); in ApplyActiveDataset()
Dcommissioner.cpp1100 aMessage.ReadBytes(aMessage.GetOffset(), buf, aMessage.GetLength() - aMessage.GetOffset()); in HandleJoinerFinalize()
1102 aMessage.GetLength() - aMessage.GetOffset()); in HandleJoinerFinalize()
1132 message->ReadBytes(message->GetOffset(), buf, message->GetLength() - message->GetOffset()); in SendJoinFinalizeResponse()
1133 …P("[THCI] direction=send | type=JOIN_FIN.rsp |", buf, message->GetLength() - message->GetOffset()); in SendJoinFinalizeResponse()
Djoiner.cpp681 aMessage.ReadBytes(aMessage.GetOffset(), buf, aMessage.GetLength() - aMessage.GetOffset()); in LogCertMessage()
683 otDumpCertMeshCoP(aText, buf, aMessage.GetLength() - aMessage.GetOffset()); in LogCertMessage()
Djoiner_router.cpp154 tlv.SetLength(aMessage.GetLength() - aMessage.GetOffset()); in HandleUdpReceive()
158 aMessage.CopyTo(aMessage.GetOffset(), offset, tlv.GetLength(), *message); in HandleUdpReceive()
Ddtls.cpp629 …eiveMessage != nullptr && (rval = mReceiveMessage->GetLength() - mReceiveMessage->GetOffset()) > 0, in HandleMbedtlsReceive()
637 …rval = mReceiveMessage->ReadBytes(mReceiveMessage->GetOffset(), aBuf, static_cast<uint16_t>(aLengt… in HandleMbedtlsReceive()
/openthread-2.7.6/tests/unit/
Dtest_checksum.cpp103 payloadLength = aMessage.GetLength() - aMessage.GetOffset(); in CalculateChecksum()
110 SuccessOrQuit(aMessage.Read(aMessage.GetOffset(), data.mPayload, payloadLength)); in CalculateChecksum()
181 SuccessOrQuit(message->Read(message->GetOffset(), udpHeader)); in TestUdpMessageChecksum()
253 SuccessOrQuit(message->Read(message->GetOffset(), icmp6Header)); in TestIcmp6MessageChecksum()
Dtest_lowpan.cpp186 message->ReadBytes(message->GetOffset(), result + compressBytes, in Test()
187 message->GetLength() - message->GetOffset()); in Test()
190 compressBytes + message->GetLength() - message->GetOffset()); in Test()
193 VerifyOrQuit(message->GetOffset() == aVector.mPayloadOffset, "Lowpan::Compress failed"); in Test()
220 … VerifyOrQuit(message->GetOffset() == aVector.mPayloadOffset, "Lowpan::Decompress failed"); in Test()
221 VerifyOrQuit(message->GetOffset() == message->GetLength(), "Lowpan::Decompress failed"); in Test()
/openthread-2.7.6/src/core/thread/
Dlowpan.cpp266 uint16_t startOffset = aMessage.GetOffset(); in Compress()
279 SuccessOrExit(error = aMessage.Read(aMessage.GetOffset(), ip6Header)); in Compress()
472 uint16_t startOffset = aMessage.GetOffset(); in CompressExtensionHeader()
478 SuccessOrExit(error = aMessage.Read(aMessage.GetOffset(), extHeader)); in CompressExtensionHeader()
509 uint16_t offset = aMessage.GetOffset(); in CompressExtensionHeader()
512 while ((offset - aMessage.GetOffset()) < len) in CompressExtensionHeader()
539 … VerifyOrExit(aMessage.GetOffset() + len + padLength <= aMessage.GetLength(), error = kErrorParse); in CompressExtensionHeader()
564 uint16_t startOffset = aMessage.GetOffset(); in CompressUdp()
569 SuccessOrExit(error = aMessage.Read(aMessage.GetOffset(), udpHeader)); in CompressUdp()
1090 udpHeader.SetLength(aDatagramLength - aMessage.GetOffset()); in DecompressUdpHeader()
[all …]
Dmesh_forwarder.cpp240 if (mSendMessage->GetOffset() == 0) in ScheduleTransmissionTask()
772 if (aMessage.GetOffset() == 0) in PrepareDataFrame()
798 payloadLength = aMessage.GetLength() - aMessage.GetOffset(); in PrepareDataFrame()
844 aMessage.ReadBytes(aMessage.GetOffset(), payload, payloadLength); in PrepareDataFrame()
847 nextOffset = aMessage.GetOffset() + payloadLength; in PrepareDataFrame()
855 payloadLength = aMessage.GetLength() - aMessage.GetOffset(); in PrepareDataFrame()
859 aMessage.GetOffset()); in PrepareDataFrame()
873 aMessage.ReadBytes(aMessage.GetOffset(), payload, payloadLength); in PrepareDataFrame()
876 nextOffset = aMessage.GetOffset() + payloadLength; in PrepareDataFrame()
1282 message->GetOffset() == fragmentHeader.GetDatagramOffset() && in HandleFragment()
[all …]
Dnetwork_diagnostic.cpp290 offset = aRequest.GetOffset() + sizeof(NetworkDiagnosticTlv); in FillRequestedTlvs()
474 SuccessOrExit(error = aMessage.Read(aMessage.GetOffset(), networkDiagnosticTlv)); in HandleDiagnosticGetQuery()
537 SuccessOrExit(error = aMessage.Read(aMessage.GetOffset(), networkDiagnosticTlv)); in HandleDiagnosticGetRequest()
615 SuccessOrExit(aMessage.Read(aMessage.GetOffset(), tlv)); in HandleDiagnosticReset()
619 offset = aMessage.GetOffset() + sizeof(NetworkDiagnosticTlv); in HandleDiagnosticReset()
721 uint16_t offset = aMessage.GetOffset() + aIterator; in GetNextDiagTlv()
877 … aIterator = static_cast<uint16_t>(offset - aMessage.GetOffset() + tlv.GetSize()); in GetNextDiagTlv()
Dmle.cpp2628 while (aMessage.GetOffset() < aMessage.GetLength()) in SendMessage()
2630 length = aMessage.ReadBytes(aMessage.GetOffset(), buf, sizeof(buf)); in SendMessage()
2632 aMessage.WriteBytes(aMessage.GetOffset(), buf, length); in SendMessage()
2699 length = aMessage.ReadBytes(aMessage.GetOffset(), &header, sizeof(header)); in HandleUdpReceive()
2739 …VerifyOrExit(aMessage.GetOffset() + header.GetLength() + sizeof(messageTag) <= aMessage.GetLength(… in HandleUdpReceive()
2753 … aMessage.GetLength() - aMessage.GetOffset(), sizeof(messageTag), nonce, sizeof(nonce)); in HandleUdpReceive()
2759 mleOffset = aMessage.GetOffset(); in HandleUdpReceive()
2761 while (aMessage.GetOffset() < aMessage.GetLength()) in HandleUdpReceive()
2763 length = aMessage.ReadBytes(aMessage.GetOffset(), buf, sizeof(buf)); in HandleUdpReceive()
2766 aMessage.WriteBytes(aMessage.GetOffset(), buf, length); in HandleUdpReceive()
[all …]
/openthread-2.7.6/src/core/utils/
Dping_sender.cpp208 SuccessOrExit(aMessage.Read(aMessage.GetOffset(), timestamp)); in HandleIcmpReceive()
214 reply.mSize = aMessage.GetLength() - aMessage.GetOffset(); in HandleIcmpReceive()
/openthread-2.7.6/src/core/common/
Dmessage.cpp276 if (GetOffset() > aLength) in SetLength()
299 OT_ASSERT(GetOffset() + aDelta <= GetLength()); in MoveOffset()
437 SetOffset(GetOffset() + aLength); in PrependBytes()
667 offset = GetOffset() < aLength ? GetOffset() : aLength; in Clone()
Dtlvs.cpp123 uint16_t offset = aMessage.GetOffset(); in Find()
/openthread-2.7.6/src/core/coap/
Dcoap.cpp708 VerifyOrExit((aMessage.GetLength() - aMessage.GetOffset()) <= in SendNextBlock2Request()
710 (aMessage.GetLength() - aMessage.GetOffset()) <= kMaxBlockLength, in SendNextBlock2Request()
714 …bufLen = aMessage.ReadBytes(aMessage.GetOffset(), buf, aMessage.GetLength() - aMessage.GetOffset()… in SendNextBlock2Request()
768 …VerifyOrExit((aMessage.GetLength() - aMessage.GetOffset()) <= kMaxBlockLength, error = kErrorNoBuf… in ProcessBlock1Request()
769 …bufLen = aMessage.ReadBytes(aMessage.GetOffset(), buf, aMessage.GetLength() - aMessage.GetOffset()… in ProcessBlock1Request()
/openthread-2.7.6/src/core/api/
Dmessage_api.cpp63 return message.GetOffset(); in otMessageGetOffset()

12