Home
last modified time | relevance | path

Searched refs:Ip4 (Results 1 – 14 of 14) sorted by relevance

/openthread-3.7.0/src/core/net/
Dchecksum.cpp123 void Checksum::Calculate(const Ip4::Address &aSource, in Calculate()
124 const Ip4::Address &aDestination, in Calculate()
133 if (aIpProto != Ip4::kProtoIcmp) in Calculate()
135 AddData(aSource.GetBytes(), sizeof(Ip4::Address)); in Calculate()
136 AddData(aDestination.GetBytes(), sizeof(Ip4::Address)); in Calculate()
204 const Ip4::Address &aSource, in UpdateMessageChecksum()
205 const Ip4::Address &aDestination, in UpdateMessageChecksum()
213 case Ip4::kProtoTcp: in UpdateMessageChecksum()
214 headerOffset = Ip4::Tcp::Header::kChecksumFieldOffset; in UpdateMessageChecksum()
217 case Ip4::kProtoUdp: in UpdateMessageChecksum()
[all …]
Dnat64_translator.cpp84 …Message *message = Get<Ip6::Ip6>().NewMessage(sizeof(Ip6::Header) - sizeof(Ip4::Header), aSettings… in NewIp4Message()
119 Ip4::Header ip4Header; in TranslateFromIp6()
160 ip4Header.SetProtocol(Ip4::kProtoUdp); in TranslateFromIp6()
164 ip4Header.SetProtocol(Ip4::kProtoTcp); in TranslateFromIp6()
168 ip4Header.SetProtocol(Ip4::kProtoIcmp); in TranslateFromIp6()
179 ip4Header.SetTotalLength(sizeof(Ip4::Header) + aMessage.GetLength() - aMessage.GetOffset()); in TranslateFromIp6()
206 Ip4::Header ip4Header; in TranslateToIp6()
241 aMessage.RemoveHeader(sizeof(Ip4::Header)); in TranslateToIp6()
254 case Ip4::kProtoUdp: in TranslateToIp6()
258 case Ip4::kProtoTcp: in TranslateToIp6()
[all …]
Dchecksum.hpp100 const Ip4::Address &aSource,
101 const Ip4::Address &aDestination,
110 static void UpdateIp4HeaderChecksum(Ip4::Header &aHeader);
128 void Calculate(const Ip4::Address &aSource,
129 const Ip4::Address &aDestination,
Dnat64_translator.hpp252 Error SetIp4Cidr(const Ip4::Cidr &aCidr);
327 Error GetIp4Cidr(Ip4::Cidr &aCidr);
347 … typedef String<Ip6::Address::kInfoStringSize + Ip4::Address::kAddressStringSize + 4> InfoString;
355 Ip4::Address mIp4;
362 bool Matches(const Ip4::Address &aIp4) const { return mIp4 == aIp4; } in Matches()
377 AddressMapping *FindMapping(const Ip4::Address &aIp4Addr);
390 Array<Ip4::Address, kAddressMappingPoolSize> mIp4AddressPool;
395 Ip4::Cidr mIp4Cidr;
Dip6_address.cpp396 void Address::SetToIp4Mapped(const Ip4::Address &aIp4Address) in SetToIp4Mapped()
400 memcpy(&mFields.m8[12], aIp4Address.GetBytes(), sizeof(Ip4::Address)); in SetToIp4Mapped()
507 void Address::SynthesizeFromIp4Address(const Prefix &aPrefix, const Ip4::Address &aIp4Address) in SynthesizeFromIp4Address()
540 for (uint8_t i = 0; i < Ip4::Address::kSize; i++) in SynthesizeFromIp4Address()
609 endIndex -= Ip4::Address::kSize / sizeof(uint16_t); in ParseFrom()
646 Ip4::Address ip4Addr; in ParseFrom()
649 … memcpy(GetArrayEnd(mFields.m8) - Ip4::Address::kSize, ip4Addr.GetBytes(), Ip4::Address::kSize); in ParseFrom()
Dip4_types.cpp40 namespace Ip4 { namespace
194 … (Ip6::Prefix::MatchLength(GetBytes(), aOther.GetBytes(), Ip4::Address::kSize) >= mLength); in operator ==()
199 memcpy(mAddress.mFields.m8, aAddress, Ip4::Address::kSize); in Set()
Dip4_types.hpp66 namespace Ip4 { namespace
723 DefineCoreType(otIp4Address, Ip4::Address);
724 DefineCoreType(otIp4Cidr, Ip4::Cidr);
Dip6_address.hpp52 namespace Ip4 { namespace
830 void SetToIp4Mapped(const Ip4::Address &aIp4Address);
1004 void SynthesizeFromIp4Address(const Prefix &aPrefix, const Ip4::Address &aIp4Address);
Ddns_types.hpp1656 SetLength(sizeof(Ip4::Address)); in Init()
1665 void SetAddress(const Ip4::Address &aAddress) { mAddress = aAddress; } in SetAddress()
1673 const Ip4::Address &GetAddress(void) const { return mAddress; } in GetAddress()
1676 Ip4::Address mAddress; // IPv4 Address of A Resource Record.
Dmdns.cpp6170 VerifyOrExit(aRecord.GetLength() >= sizeof(Ip4::Address)); in ProcessResponseRecord()
/openthread-3.7.0/tests/unit/
Dtest_checksum.cpp115 uint16_t CalculateChecksum(const Ip4::Address &aSource, in CalculateChecksum()
116 const Ip4::Address &aDestination, in CalculateChecksum()
126 Ip4::Address mSource; in CalculateChecksum()
127 Ip4::Address mDestination; in CalculateChecksum()
312 constexpr size_t kMinSize = sizeof(Ip4::Tcp::Header); in TestTcp4MessageChecksum()
318 Ip4::Address sourceAddress; in TestTcp4MessageChecksum()
319 Ip4::Address destAddress; in TestTcp4MessageChecksum()
330 Message *message = instance->Get<Ip6::Ip6>().NewMessage(sizeof(Ip4::Tcp::Header)); in TestTcp4MessageChecksum()
331 Ip4::Tcp::Header tcpHeader; in TestTcp4MessageChecksum()
353 Checksum::UpdateMessageChecksum(*message, sourceAddress, destAddress, Ip4::kProtoTcp); in TestTcp4MessageChecksum()
[all …]
Dtest_ip_address.cpp225 typedef TestVector<Ip4::Address> Ip4AddressTestVector; in TestIp4AddressFromString()
260 Ip4::Cidr cidr; in checkCidrFromString()
770 Ip4::Address expectedIp4Address; in TestIp4MappedIp6Address()
771 Ip4::Address ip4Address; in TestIp4MappedIp6Address()
822 Ip4::Address ip4Address; in TestIp4Ip6Translation()
850 const Ip4::Address expectedAddress = ip4Address; in TestIp4Ip6Translation()
851 Ip4::Address address; in TestIp4Ip6Translation()
897 Ip4::Address network; in TestIp4Cidr()
898 Ip4::Cidr cidr; in TestIp4Cidr()
899 Ip4::Address generated; in TestIp4Cidr()
Dtest_ip4_header.cpp35 namespace Ip4 { namespace
79 header.SetProtocol(Ip4::kProtoIcmp); in TestIp4Header()
129 ot::Ip4::TestIp4Header(); in main()
Dtest_nat64.cpp147 Ip4::Cidr nat64cidr; in TestNat64()