Home
last modified time | relevance | path

Searched refs:checksum (Results 1 – 16 of 16) sorted by relevance

/openthread-3.4.0/examples/platforms/utils/
Dsoft_source_match_table.c55 uint16_t checksum; member
64 uint16_t checksum = aShortAddress + sPanId; in utilsSoftSrcMatchShortFindEntry() local
68 if (checksum == srcMatchShortEntry[i].checksum && srcMatchShortEntry[i].allocated) in utilsSoftSrcMatchShortFindEntry()
96 uint16_t checksum = aShortAddress + sPanId; in addToSrcMatchShortIndirect() local
98 srcMatchShortEntry[entry].checksum = checksum; in addToSrcMatchShortIndirect()
105 srcMatchShortEntry[entry].checksum = 0; in removeFromSrcMatchShortIndirect()
157 uint16_t checksum; member
166 uint16_t checksum = sPanId; in utilsSoftSrcMatchExtFindEntry() local
168 checksum += (uint16_t)aExtAddress->m8[0] | (uint16_t)(aExtAddress->m8[1] << 8); in utilsSoftSrcMatchExtFindEntry()
169 checksum += (uint16_t)aExtAddress->m8[2] | (uint16_t)(aExtAddress->m8[3] << 8); in utilsSoftSrcMatchExtFindEntry()
[all …]
/openthread-3.4.0/src/core/net/
Dchecksum.cpp81 uint16_t checksum = GetValue(); in WriteToMessage() local
83 if (checksum != 0xffff) in WriteToMessage()
85 checksum = ~checksum; in WriteToMessage()
88 checksum = Encoding::BigEndian::HostSwap16(checksum); in WriteToMessage()
90 aMessage.Write(aOffset, checksum); in WriteToMessage()
150 Checksum checksum; in VerifyMessageChecksum() local
152 checksum.Calculate(aMessageInfo.GetPeerAddr(), aMessageInfo.GetSockAddr(), aIpProto, aMessage); in VerifyMessageChecksum()
154 return (checksum.GetValue() == kValidRxChecksum) ? kErrorNone : kErrorDrop; in VerifyMessageChecksum()
163 Checksum checksum; in UpdateMessageChecksum() local
185 checksum.Calculate(aSource, aDestination, aIpProto, aMessage); in UpdateMessageChecksum()
[all …]
Dip6.cpp1687 uint16_t checksum = 0; in GetChecksum() local
1692 checksum = mHeader.mUdp.GetChecksum(); in GetChecksum()
1696 checksum = mHeader.mTcp.GetChecksum(); in GetChecksum()
1700 checksum = mHeader.mIcmp.GetChecksum(); in GetChecksum()
1707 return checksum; in GetChecksum()
/openthread-3.4.0/tests/scripts/thread-cert/
Dipv6.py83 checksum = 0
85 checksum += halfword
86 checksum = (checksum & 0xffff) + (checksum >> 16)
88 checksum ^= 0xffff
90 if checksum == 0:
93 return checksum
192 def checksum(self): member in UpperLayerProtocol
194 return self.header.checksum
196 @checksum.setter
197 def checksum(self, value): member in UpperLayerProtocol
[all …]
Dtest_ipv6.py121 self.checksum = 0
170 def any_icmp_payload(_type, code, checksum, body): argument
171 return bytearray([_type, code, (checksum >> 8) & 0xff, checksum & 0xff]) + body
174 def any_udp_payload(src_port, dst_port, payload, checksum): argument
178 (checksum >> 8) & 0xff, checksum & 0xff]) + payload
415 checksum = any_checksum()
417 udp_header = UDPHeader(src_port, dst_port, payload_length, checksum)
426 self.assertEqual(checksum, struct.unpack("!H", data[6:])[0])
433 checksum = any_checksum()
436 struct.pack("!H", payload_length) + struct.pack("!H", checksum)
[all …]
Dlowpan.py298 checksum = struct.unpack(">H", data.read(2))[0]
301 checksum = 0
303 return checksum
310 checksum = self._decompress_udp_checksum(udphc, data)
312 header = ipv6.UDPHeader(src_port, dst_port, checksum=checksum)
Dtest_lowpan.py2286 checksum = any_checksum()
2288 data_bytes = struct.pack(">H", checksum)
2295 self.assertEqual(checksum, actual_checksum)
/openthread-3.4.0/tests/unit/
Dtest_checksum.cpp459 Checksum checksum; in TestExampleVector() local
461 VerifyOrQuit(checksum.GetValue() == 0, "Incorrect initial checksum value"); in TestExampleVector()
463 checksum.AddData(kTestVector, sizeof(kTestVector)); in TestExampleVector()
464 VerifyOrQuit(checksum.GetValue() == kTestVectorChecksum); in TestExampleVector()
465 VerifyOrQuit(checksum.GetValue() == CalculateChecksum(kTestVector, sizeof(kTestVector)), ); in TestExampleVector()
DCMakeLists.txt137 add_executable(ot-test-checksum
141 target_include_directories(ot-test-checksum
146 target_compile_options(ot-test-checksum
151 target_link_libraries(ot-test-checksum
156 add_test(NAME ot-test-checksum COMMAND ot-test-checksum)
/openthread-3.4.0/tests/scripts/thread-cert/pktverify/
Dtest_layer_fields.py243 self.assertIsInstance(icmpv6.checksum, int)
270 self.assertIsInstanceOrNull(lowpan.udp.checksum, int)
275 self.assertIsInstanceOrNull(lowpan.nhc.udp.checksum, int)
/openthread-3.4.0/third_party/nlbuild-autotools/repo/etc/
Dlcov.config98 # Calculate a checksum for each line if non-zero
/openthread-3.4.0/src/core/thread/
Dlowpan.cpp936 uint16_t checksum; in DecompressUdpHeader() local
938 SuccessOrExit(aFrameData.ReadBigEndianUint16(checksum)); in DecompressUdpHeader()
939 aUdpHeader.SetChecksum(checksum); in DecompressUdpHeader()
/openthread-3.4.0/src/core/
DMakefile.am251 net/checksum.cpp \
573 net/checksum.hpp \
DBUILD.gn534 "net/checksum.cpp",
535 "net/checksum.hpp",
DCMakeLists.txt161 net/checksum.cpp
/openthread-3.4.0/src/cli/
DREADME_HISTORY.md508 - Message checksum (valid for UDP, TCP, or ICMP6 message)