/openthread-latest/src/core/net/ |
D | ip6.hpp | 391 const Header &aHeader, 396 const Header &aHeader, 405 … void SendIcmpError(Message &aMessage, Icmp::Header::Type aIcmpType, Icmp::Header::Code aIcmpCode); 408 Error AddMplOption(Message &aMessage, Header &aHeader); 409 Error PrepareMulticastToLargerThanRealmLocal(Message &aMessage, const Header &aHeader); 410 Error InsertMplOption(Message &aMessage, Header &aHeader); 412 Error HandleOptions(Message &aMessage, const Header &aHeader, bool &aReceive); 413 Error Receive(Header &aIp6Header, 420 … void UpdateBorderRoutingCounters(const Header &aHeader, uint16_t aMessageLength, bool aIsInbound); 511 const Header &GetIp6Header(void) const { return mIp6Header; } in GetIp6Header() [all …]
|
D | nd6.hpp | 542 class Header : public Equatable<Header>, public Clearable<Header> class in ot::Ip6::Nd::RouterAdvert 544 friend class Clearable<Header>; 552 Header(void) { SetToDefault(); } in Header() function in ot::Ip6::Nd::RouterAdvert::Header 561 bool IsValid(void) const { return GetType() == Icmp::Header::kTypeRouterAdvert; } in IsValid() 647 Icmp::Header::Type GetType(void) const { return static_cast<Icmp::Header::Type>(mType); } in GetType() 681 static_assert(sizeof(Header) == 16, "Invalid RA `Header`"); 720 return (mData.GetBytes() != nullptr) && (mData.GetLength() >= sizeof(Header)) && in IsValid() 721 (GetHeader().GetType() == Icmp::Header::kTypeRouterAdvert); in IsValid() 730 …const Header &GetHeader(void) const { return *reinterpret_cast<const Header *>(mData.GetBytes()); } in GetHeader() 739 bool ContainsAnyOptions(void) const { return (mData.GetLength() > sizeof(Header)); } in ContainsAnyOptions() [all …]
|
D | icmp6.cpp | 57 Message *Icmp::NewMessage(void) { return Get<Ip6>().NewMessage(sizeof(Header)); } in NewMessage() 65 Header icmpHeader; in SendEchoRequest() 70 icmpHeader.SetType(Header::kTypeEchoRequest); in SendEchoRequest() 84 Error Icmp::SendError(Header::Type aType, Header::Code aCode, const MessageInfo &aMessageInfo, cons… in SendError() 96 Error Icmp::SendError(Header::Type aType, Header::Code aCode, const MessageInfo &aMessageInfo, cons… in SendError() 101 Header icmp6Header; in SendError() 134 Header icmp6Header; in HandleMessage() 140 if (icmp6Header.GetType() == Header::kTypeEchoRequest) in HandleMessage() 185 Header icmp6Header; in HandleEchoRequest() 195 icmp6Header.SetType(Header::kTypeEchoReply); in HandleEchoRequest() [all …]
|
D | icmp6.hpp | 76 class Header : public otIcmp6Header, public Clearable<Header> class in ot::Ip6::Icmp 227 …void HandleReceiveMessage(Message &aMessage, const MessageInfo &aMessageInfo, const Header &aIcmp6… in HandleReceiveMessage() 286 …Error SendError(Header::Type aType, Header::Code aCode, const MessageInfo &aMessageInfo, const Mes… 300 …Error SendError(Header::Type aType, Header::Code aCode, const MessageInfo &aMessageInfo, const Hea… 367 DefineCoreType(otIcmp6Header, Ip6::Icmp::Header);
|
D | dns_dso.cpp | 109 mRetryDelayErrorCode = Dns::Header::kResponseSuccess; in Init() 157 return Get<MessagePool>().Allocate(Message::kTypeOther, sizeof(Dns::Header), in NewMessage() 282 …return SendMessage(aMessage, kRequestMessage, aMessageId, Dns::Header::kResponseSuccess, aResponse… in SendRequestMessage() 317 Error Dso::Connection::SendRetryDelayMessage(uint32_t aDelay, Dns::Header::Response aResponseCode) in SendRetryDelayMessage() 481 Dns::Header::Response aResponseCode, in SendMessage() 486 Dns::Header header; in SendMessage() 546 header.SetType(Dns::Header::kTypeQuery); in SendMessage() 551 header.SetType(Dns::Header::kTypeResponse); in SendMessage() 555 header.SetType(Dns::Header::kTypeQuery); in SendMessage() 561 header.SetQueryType(Dns::Header::kQueryTypeDso); in SendMessage() [all …]
|
D | nd6.cpp | 187 void RouterAdvert::Header::SetToDefault(void) in SetToDefault() 195 mType = Icmp::Header::kTypeRouterAdvert; in SetToDefault() 198 RoutePreference RouterAdvert::Header::GetDefaultRouterPreference(void) const in GetDefaultRouterPreference() 203 void RouterAdvert::Header::SetDefaultRouterPreference(RoutePreference aPreference) in SetDefaultRouterPreference() 246 Error RouterAdvert::TxMessage::AppendHeader(const Header &aHeader) in AppendHeader() 248 return AppendBytes(reinterpret_cast<const uint8_t *>(&aHeader), sizeof(Header)); in AppendHeader() 316 mHeader.SetType(Icmp::Header::kTypeRouterSolicit); in RouterSolicitMessage() 328 mType = Icmp::Header::kTypeNeighborSolicit; in NeighborSolicitMessage() 340 mType = Icmp::Header::kTypeNeighborAdvert; in NeighborAdvertMessage()
|
D | nat64_translator.cpp | 84 …Message *message = Get<Ip6::Ip6>().NewMessage(sizeof(Ip6::Header) - sizeof(Ip4::Header), aSettings… in NewIp4Message() 118 Ip6::Header ip6Header; in TranslateFromIp6() 119 Ip4::Header ip4Header; in TranslateFromIp6() 148 aMessage.RemoveHeader(sizeof(Ip6::Header)); in TranslateFromIp6() 179 ip4Header.SetTotalLength(sizeof(Ip4::Header) + aMessage.GetLength() - aMessage.GetOffset()); in TranslateFromIp6() 205 Ip6::Header ip6Header; in TranslateToIp6() 206 Ip4::Header ip4Header; in TranslateToIp6() 241 aMessage.RemoveHeader(sizeof(Ip4::Header)); in TranslateToIp6() 408 Ip4::Icmp::Header icmp4Header; in TranslateIcmp4() 409 Ip6::Icmp::Header icmp6Header; in TranslateIcmp4() [all …]
|
D | dns_dso.hpp | 360 const Dns::Header &aHeader, 682 … Dns::Header::Response aResponseCode = Dns::Header::kResponseSuccess); 702 Dns::Header::Response GetRetryDelayErrorCode(void) const { return mRetryDelayErrorCode; } in GetRetryDelayErrorCode() 795 Dns::Header::Response aResponseCode = Dns::Header::kResponseSuccess, 799 Error ProcessRequestOrUnidirectionalMessage(const Dns::Header &aHeader, 802 …Error ProcessResponseMessage(const Dns::Header &aHeader, const Message &aMessage, Tlv::Type aPrima… 803 Error ProcessKeepAliveMessage(const Dns::Header &aHeader, const Message &aMessage); 804 Error ProcessRetryDelayMessage(const Dns::Header &aHeader, const Message &aMessage); 805 void SendErrorResponse(const Dns::Header &aHeader, Dns::Header::Response aResponseCode); 832 Dns::Header::Response mRetryDelayErrorCode;
|
D | ip6.cpp | 56 using IcmpType = ot::Ip6::Icmp::Header::Type; 94 …Message::kTypeIp6, sizeof(Header) + sizeof(HopByHopHeader) + sizeof(MplOption) + aReserved, aSetti… in NewMessage() 101 const Header *header; in NewMessageFromData() 103 VerifyOrExit((aData != nullptr) && (aDataLength >= sizeof(Header))); in NewMessageFromData() 106 header = reinterpret_cast<const Header *>(aData); in NewMessageFromData() 108 VerifyOrExit(sizeof(Header) + header->GetPayloadLength() == aDataLength); in NewMessageFromData() 180 Error Ip6::AddMplOption(Message &aMessage, Header &aHeader) in AddMplOption() 206 Error Ip6::PrepareMulticastToLargerThanRealmLocal(Message &aMessage, const Header &aHeader) in PrepareMulticastToLargerThanRealmLocal() 209 Header tunnelHeader; in PrepareMulticastToLargerThanRealmLocal() 248 Error Ip6::InsertMplOption(Message &aMessage, Header &aHeader) in InsertMplOption() [all …]
|
D | checksum.cpp | 179 headerOffset = Ip6::Tcp::Header::kChecksumFieldOffset; in UpdateMessageChecksum() 183 headerOffset = Ip6::Udp::Header::kChecksumFieldOffset; in UpdateMessageChecksum() 187 headerOffset = Ip6::Icmp::Header::kChecksumFieldOffset; in UpdateMessageChecksum() 214 headerOffset = Ip4::Tcp::Header::kChecksumFieldOffset; in UpdateMessageChecksum() 218 headerOffset = Ip4::Udp::Header::kChecksumFieldOffset; in UpdateMessageChecksum() 222 headerOffset = Ip4::Icmp::Header::kChecksumFieldOffset; in UpdateMessageChecksum() 238 void Checksum::UpdateIp4HeaderChecksum(Ip4::Header &aHeader) in UpdateIp4HeaderChecksum()
|
D | ip6_headers.cpp | 44 Error Header::ParseFrom(const Message &aMessage) in ParseFrom() 50 VerifyOrExit(sizeof(Header) + GetPayloadLength() == aMessage.GetLength()); in ParseFrom() 58 bool Header::IsValid(void) const in IsValid() 66 return IsVersion6() && ((sizeof(Header) + GetPayloadLength()) <= kMaxLength); in IsValid()
|
D | sntp_client.cpp | 90 Header header; in Query() 133 Message *Client::NewMessage(const Header &aHeader) in NewMessage() 200 Message *Client::FindRelatedQuery(const Header &aResponseHeader, QueryMetadata &aQueryMetadata) in FindRelatedQuery() 271 Header responseHeader; in HandleUdpReceive() 281 VerifyOrExit(responseHeader.GetMode() == Header::kModeServer, error = kErrorFailed); in HandleUdpReceive() 286 char kissCode[Header::kKissCodeLength + 1]; in HandleUdpReceive() 288 memcpy(kissCode, responseHeader.GetKissCode(), Header::kKissCodeLength); in HandleUdpReceive() 289 kissCode[Header::kKissCodeLength] = 0; in HandleUdpReceive()
|
D | dnssd_server.cpp | 111 Finalize(query, Header::kResponseServerFailure); in Stop() 154 VerifyOrExit(request.mHeader.GetType() == Header::kTypeQuery); in HandleUdpReceive() 166 ResponseCode rcode = Header::kResponseSuccess; in ProcessQuery() 182 rcode = Header::kResponseServerFailure; in ProcessQuery() 212 rcode = Header::kResponseNameError; in ProcessQuery() 216 rcode = Header::kResponseServerFailure; in ProcessQuery() 224 if (rcode != Header::kResponseSuccess) in ProcessQuery() 250 mHeader.SetType(Header::kTypeResponse); in AllocateAndInitFrom() 278 if (rcode == Header::kResponseServerFailure) in Send() 283 IgnoreError(mMessage->SetLength(sizeof(Header))); in Send() [all …]
|
D | sntp_client.hpp | 123 class Header : public Clearable<Header> class in ot::Sntp::Client 265 Message *NewMessage(const Header &aHeader); 271 Message *FindRelatedQuery(const Header &aResponseHeader, QueryMetadata &aQueryMetadata);
|
D | ip4_types.hpp | 303 class Header : public Clearable<Header> class 607 class Header : public Clearable<Header> class in ot::Ip4::Icmp
|
/openthread-latest/tests/unit/ |
D | test_ip4_header.cpp | 37 void VerifyEcnDscp(const Header &aHeader, uint8_t aDscp, Ecn aEcn) in VerifyEcnDscp() 58 Header header; in TestIp4Header() 92 VerifyOrQuit(BigEndian::ReadUint16(headerBytes + Header::kTotalLengthOffset) == kTotalLength, in TestIp4Header() 94 VerifyOrQuit(headerBytes[Header::kProtocolOffset] == kProtoIcmp, "kProtocol is incorrect"); in TestIp4Header() 95 VerifyOrQuit(headerBytes[Header::kTtlOffset] == kTtl, "kTtl is incorrect"); in TestIp4Header() 96 VerifyOrQuit(memcmp(&headerBytes[Header::kSourceAddressOffset], &source, sizeof(source)) == 0, in TestIp4Header() 98 …VerifyOrQuit(memcmp(&headerBytes[Header::kDestinationAddressOffset], &destination, sizeof(destinat… in TestIp4Header() 114 VerifyOrQuit(memcmp(&headerBytes[Header::kSourceAddressOffset], &source, sizeof(source)) == 0, in TestIp4Header() 116 …VerifyOrQuit(memcmp(&headerBytes[Header::kDestinationAddressOffset], &destination, sizeof(destinat… in TestIp4Header() 118 VerifyOrQuit(BigEndian::ReadUint16(headerBytes + Header::kTotalLengthOffset) == kTotalLength, in TestIp4Header() [all …]
|
D | test_ip6_header.cpp | 37 void VerifyVersionTcFlow(const Header &aHeader, uint8_t aDscp, Ecn aEcn, uint32_t aFlow) in VerifyVersionTcFlow() 62 Header header; in TestIp6Header() 98 …VerifyOrQuit(BigEndian::ReadUint16(headerBytes + Header::kPayloadLengthFieldOffset) == kPayloadLen… in TestIp6Header() 100 …VerifyOrQuit(headerBytes[Header::kNextHeaderFieldOffset] == kProtoUdp, "kNextHeaderFieldOffset is … in TestIp6Header() 101 …VerifyOrQuit(headerBytes[Header::kHopLimitFieldOffset] == kHopLimit, "kHopLimitFieldOffset is inco… in TestIp6Header() 102 VerifyOrQuit(memcmp(&headerBytes[Header::kSourceFieldOffset], &source, sizeof(source)) == 0, in TestIp6Header() 104 …VerifyOrQuit(memcmp(&headerBytes[Header::kDestinationFieldOffset], &destination, sizeof(destinatio… in TestIp6Header()
|
D | test_aes.cpp | 74 aesCcm.Header(test, headerLength); in TestMacBeaconFrame() 81 aesCcm.Header(test, headerLength); in TestMacBeaconFrame() 135 aesCcm.Header(test, kHeaderLength); in TestMacCommandFrame() 142 aesCcm.Header(test, kHeaderLength); in TestMacCommandFrame() 157 aesCcm.Header(test, kHeaderLength); in TestMacCommandFrame() 167 aesCcm.Header(test, kHeaderLength); in TestMacCommandFrame() 230 aesCcm.Header(header); in TestInPlaceAesCcmProcessing() 241 aesCcm.Header(header); in TestInPlaceAesCcmProcessing()
|
D | test_checksum.cpp | 175 constexpr uint16_t kMinSize = sizeof(Ip6::Udp::Header); in TestUdpMessageChecksum() 187 Message *message = instance->Get<Ip6::Ip6>().NewMessage(sizeof(Ip6::Udp::Header)); in TestUdpMessageChecksum() 188 Ip6::Udp::Header udpHeader; in TestUdpMessageChecksum() 243 constexpr uint16_t kMinSize = sizeof(Ip6::Icmp::Header); in TestIcmp6MessageChecksum() 255 Message *message = instance->Get<Ip6::Ip6>().NewMessage(sizeof(Ip6::Icmp::Header)); in TestIcmp6MessageChecksum() 256 Ip6::Icmp::Header icmp6Header; in TestIcmp6MessageChecksum() 312 constexpr size_t kMinSize = sizeof(Ip4::Tcp::Header); in TestTcp4MessageChecksum() 330 Message *message = instance->Get<Ip6::Ip6>().NewMessage(sizeof(Ip4::Tcp::Header)); in TestTcp4MessageChecksum() 331 Ip4::Tcp::Header tcpHeader; in TestTcp4MessageChecksum() 367 constexpr uint16_t kMinSize = sizeof(Ip4::Udp::Header); in TestUdp4MessageChecksum() [all …]
|
D | test_lowpan.hpp | 108 const Ip6::Header &GetIpHeader(void) const { return mIpHeader; } in GetIpHeader() 265 Ip6::Header mIpHeader; 267 Ip6::Header mIpTunneledHeader; 268 Ip6::Udp::Header mUdpHeader;
|
/openthread-latest/src/core/radio/ |
D | trel_packet.cpp | 45 void Header::SetAckMode(AckMode aAckMode) in SetAckMode() 59 uint16_t Header::GetSize(Type aType) in GetSize() 61 uint16_t size = sizeof(Header); in GetSize() 77 Header::InfoString Header::ToString(void) const in ToString() 113 void Packet::Init(Header::Type aType, uint8_t *aPayload, uint16_t aPayloadLength) in Init() 115 uint16_t headerSize = Header::GetSize(aType); in Init()
|
D | trel_link.cpp | 122 Header::Type type; in BeginTransmit() 140 type = Header::kTypeBroadcast; in BeginTransmit() 144 type = Header::kTypeUnicast; in BeginTransmit() 157 type = Header::kTypeBroadcast; in BeginTransmit() 162 if (type == Header::kTypeBroadcast) in BeginTransmit() 193 txPacket.GetHeader().SetAckMode(Header::kNoAck); in BeginTransmit() 198 txPacket.GetHeader().SetAckMode(Header::kAckRequested); in BeginTransmit() 207 if (type == Header::kTypeUnicast) in BeginTransmit() 323 Header::Type type; in ProcessReceivedPacket() 329 if (type != Header::kTypeAck) in ProcessReceivedPacket() [all …]
|
D | trel_packet.hpp | 55 class Header class 284 void Init(Header::Type aType, uint8_t *aPayload, uint16_t aPayloadLength); 325 Header &GetHeader(void) { return *reinterpret_cast<Header *>(Base::GetBytes()); } in GetHeader() 333 …const Header &GetHeader(void) const { return *reinterpret_cast<const Header *>(Base::GetBytes()); } in GetHeader()
|
/openthread-latest/src/core/crypto/ |
D | aes_ccm.hpp | 128 void Header(const void *aHeader, uint32_t aHeaderLength); 138 template <typename ObjectType> void Header(const ObjectType &aObject) in Header() function in ot::Crypto::AesCcm 142 Header(&aObject, sizeof(ObjectType)); in Header()
|
/openthread-latest/src/core/thread/ |
D | mesh_forwarder_ftd.cpp | 62 Ip6::Header ip6Header; in SendMessage() 158 IgnoreError(message.Read(Ip6::Header::kDestinationFieldOffset, ip6Dst)); in HandleResolved() 184 IgnoreError(message.Read(Ip6::Header::kHopLimitFieldOffset, hopLimit)); in HandleResolved() 186 message.Write(Ip6::Header::kHopLimitFieldOffset, hopLimit); in HandleResolved() 284 Ip6::Header ip6header; in RemoveMessagesForChild() 309 Ip6::Header ip6Header; in RemoveDataResponseMessages() 394 Error MeshForwarder::UpdateIp6RouteFtd(const Ip6::Header &aIp6Header, Message &aMessage) in UpdateIp6RouteFtd() 525 Error MeshForwarder::CheckReachability(uint16_t aMeshDest, const Ip6::Header &aIp6Header) in CheckReachability() 568 IgnoreError(Get<Ip6::Icmp>().SendError(Ip6::Icmp::Header::kTypeDstUnreach, in SendDestinationUnreachable() 569 … Ip6::Icmp::Header::kCodeDstUnreachNoRoute, messageInfo, aIp6Headers)); in SendDestinationUnreachable()
|