Home
last modified time | relevance | path

Searched refs:icmp6Header (Results 1 – 4 of 4) sorted by relevance

/openthread-2.7.6/src/core/net/
Dicmp6.cpp93 Header icmp6Header; in SendError() local
101 SuccessOrExit(aMessage.Read(sizeof(ip6Header), icmp6Header)); in SendError()
102 VerifyOrExit(!icmp6Header.IsError()); in SendError()
108 SuccessOrExit(error = message->SetLength(sizeof(icmp6Header) + sizeof(ip6Header))); in SendError()
110 message->Write(sizeof(icmp6Header), ip6Header); in SendError()
112 icmp6Header.Clear(); in SendError()
113 icmp6Header.SetType(aType); in SendError()
114 icmp6Header.SetCode(aCode); in SendError()
115 message->Write(0, icmp6Header); in SendError()
129 Header icmp6Header; in HandleMessage() local
[all …]
/openthread-2.7.6/tests/unit/
Dtest_checksum.cpp223 Ip6::Icmp::Header icmp6Header; in TestIcmp6MessageChecksum() local
231 … Random::NonCrypto::FillBuffer(reinterpret_cast<uint8_t *>(&icmp6Header), sizeof(icmp6Header)); in TestIcmp6MessageChecksum()
232 icmp6Header.SetChecksum(0); in TestIcmp6MessageChecksum()
233 message->Write(0, icmp6Header); in TestIcmp6MessageChecksum()
235 if (size > sizeof(icmp6Header)) in TestIcmp6MessageChecksum()
238 uint16_t payloadSize = size - sizeof(icmp6Header); in TestIcmp6MessageChecksum()
241 message->WriteBytes(sizeof(icmp6Header), &buffer[0], payloadSize); in TestIcmp6MessageChecksum()
253 SuccessOrQuit(message->Read(message->GetOffset(), icmp6Header)); in TestIcmp6MessageChecksum()
254 VerifyOrQuit(icmp6Header.GetChecksum() != 0, "Failed to update checksum"); in TestIcmp6MessageChecksum()
/openthread-2.7.6/src/core/utils/
Dhistory_tracker.cpp79 Ip6::Icmp::Header icmp6Header; in RecordMessage() local
113 SuccessOrExit(aMessage.Read(sizeof(Ip6::Header), icmp6Header)); in RecordMessage()
114 checksum = icmp6Header.GetChecksum(); in RecordMessage()
118 icmp6Header.Clear(); in RecordMessage()
142 entry->mIcmp6Type = icmp6Header.GetType(); in RecordMessage()
/openthread-2.7.6/src/core/border_router/
Drouting_manager.cpp269 const Ip6::Icmp::Header *icmp6Header; in RecvIcmp6Message() local
273 VerifyOrExit(aBuffer != nullptr && aBufferLength >= sizeof(*icmp6Header), error = kErrorParse); in RecvIcmp6Message()
275 icmp6Header = reinterpret_cast<const Ip6::Icmp::Header *>(aBuffer); in RecvIcmp6Message()
277 switch (icmp6Header->GetType()) in RecvIcmp6Message()