Home
last modified time | relevance | path

Searched full:checksum (Results 1 – 25 of 724) sorted by relevance

12345678910>>...29

/external/android-clat/
Dchecksum.c16 * checksum.c - ipv4/ipv6 checksum calculation
26 #include "checksum.h"
29 * adds data to a checksum
30 * current - the current checksum (or 0 to start a new checksum)
31 * data - the data to add to the checksum
35 uint32_t checksum = current; in ip_checksum_add() local
40 checksum += *data_16; in ip_checksum_add()
45 checksum += *(uint8_t *)data_16; in ip_checksum_add()
48 return checksum; in ip_checksum_add()
52 * folds a 32-bit partial checksum into 16 bits
[all …]
Dtranslate.c22 #include "checksum.h"
30 * calculates the checksum over all the packet components starting from pos
31 * checksum - checksum of packet components before pos
32 * packet - packet to calculate the checksum of
34 * returns - the completed 16-bit checksum, ready to write into a checksum header field
36 uint16_t packet_checksum(uint32_t checksum, clat_packet packet, clat_packet_index pos) { in packet_checksum() argument
40 checksum = ip_checksum_add(checksum, packet[i].iov_base, packet[i].iov_len); in packet_checksum()
43 return ip_checksum_finish(checksum); in packet_checksum()
222 * checksum - pseudo-header checksum
228 uint32_t checksum, const uint8_t *payload, size_t payload_size) { in icmp_to_icmp6() argument
[all …]
Dclatd_test.cpp29 #include "checksum.h"
47 55, (p), (c1), (c2), /* TTL=55, protocol=p, checksum=c1,c2 */ \
70 0x00, UDP_LEN, 0, 0, /* Length 21, checksum empty for now */
75 0x08, 0x00, 0x88, 0xd0, /* Type 8, code 0, checksum 0x88d0 */ \
79 0x80, 0x00, 0xc3, 0x42, /* Type 128, code 0, checksum 0xc342 */ \
213 EXPECT_EQ(0, ip_checksum(ip, sizeof(*ip))) << msg << ": Incorrect IP checksum\n"; in check_packet()
257 // If we understand the payload, verify the checksum. in check_packet()
259 uint16_t checksum; in check_packet() local
264 checksum = ip_checksum_finish(ip_checksum_add(pseudo_checksum, payload, payload_length)); in check_packet()
267 checksum = ip_checksum(payload, payload_length); in check_packet()
[all …]
Dipv4.c21 #include "checksum.h"
30 * checksum - pseudo-header checksum
35 uint32_t checksum, size_t len) { in icmp_packet() argument
47 return icmp_to_icmp6(out, pos, icmp, checksum, payload, payload_size); in icmp_packet()
103 * UDP include parts of the IP header in the checksum. Set the length to zero because we don't in ipv4_packet()
109 /* Calculate the pseudo-header checksum. in ipv4_packet()
110 * Technically, the length that is used in the pseudo-header checksum is the transport layer in ipv4_packet()
112 * translation does not change the transport layer length, the checksum is unaffected. in ipv4_packet()
/external/zlib/src/contrib/dotzlib/DotZLib/
DChecksumImpl.cs23 /// The value of the current checksum
28 /// Initializes a new instance of the checksum generator base - the current checksum is
37 /// Initializes a new instance of the checksum generator basewith a specified value
39 /// <param name="initialValue">The value to set the current checksum to</param>
46 /// Resets the current checksum to zero
51 /// Gets the current checksum value
56 /// Updates the current checksum with part of an array of bytes
58 /// <param name="data">The data to update the checksum with</param>
69 /// Updates the current checksum with an array of bytes.
71 /// <param name="data">The data to update the checksum with</param>
[all …]
DDotZLib.cs112 /// Declares methods and properties that enables a running checksum to be calculated
117 /// Gets the current value of the checksum
122 /// Clears the current checksum to 0
127 /// Updates the current checksum with an array of bytes
129 /// <param name="data">The data to update the checksum with</param>
133 /// Updates the current checksum with part of an array of bytes
135 /// <param name="data">The data to update the checksum with</param>
144 /// Updates the current checksum with the data from a string
146 /// <param name="data">The string to update the checksum with</param>
151 /// Updates the current checksum with the data from a string, using a specific encoding
[all …]
/external/autotest/client/common_lib/
Dbase_packages.py15 # the name of the checksum file that stores the packages' checksums
16 CHECKSUM_FILE = "packages.checksum"
224 to dump stuff (like checksum files of the repositories
236 # In memory dictionary that stores the checksum's of packages
375 # then check to see if the .checksum file is the latest
388 # update the checksum in that directory
415 use_checksum : This is set to False to fetch the packages.checksum file
416 so that the checksum comparison is bypassed for the
417 checksum file itself. This is used internally by the
451 # Fetch the package if it is not there, the checksum does
[all …]
/external/guava/guava/src/com/google/common/hash/
DChecksumHashFunction.java23 import java.util.zip.Checksum;
26 * {@link HashFunction} adapter for {@link Checksum} instances.
32 private final Supplier<? extends Checksum> checksumSupplier;
36 ChecksumHashFunction(Supplier<? extends Checksum> checksumSupplier, int bits, String toString) { in ChecksumHashFunction()
59 * Hasher that updates a checksum.
63 private final Checksum checksum; field in ChecksumHashFunction.ChecksumHasher
65 private ChecksumHasher(Checksum checksum) { in ChecksumHasher() argument
66 this.checksum = checkNotNull(checksum); in ChecksumHasher()
71 checksum.update(b); in update()
76 checksum.update(bytes, off, len); in update()
[all …]
/external/llvm/test/Object/Inputs/COFF/
Dsection-aux-symbol.yaml21 CheckSum: 0
33 CheckSum: 0
45 CheckSum: 0
57 CheckSum: 0
69 CheckSum: 0
81 CheckSum: 0
93 CheckSum: 0
105 CheckSum: 0
117 CheckSum: 0
129 CheckSum: 0
[all …]
/external/deqp/scripts/khr_util/
Dregistry_cache.py32 def __init__(self, filename, revision, checksum): argument
35 self.checksum = checksum
38 return hash((self.filename, self.revision, self.checksum))
41 …return (self.filename, self.revision, self.checksum) == (other.filename, other.revision, other.che…
50 return self.checksum
66 def fetchFile (dstPath, url, checksum): argument
79 if checksum != gotChecksum:
80 raise Exception("Checksum mismatch, exepected %s, got %s" % (checksum, gotChecksum))
84 def checkFile (filename, checksum): argument
92 return computeChecksum(readFile(filename)) == checksum
[all …]
/external/tcpdump/tests/
Dudld-v.out2 Checksum 0x6d85 (unverified)
11 Checksum 0x805d (unverified)
20 Checksum 0x805e (unverified)
29 Checksum 0x805c (unverified)
38 Checksum 0x805d (unverified)
47 Checksum 0x805b (unverified)
56 Checksum 0x805c (unverified)
65 Checksum 0x805a (unverified)
74 Checksum 0x805b (unverified)
83 Checksum 0x8059 (unverified)
[all …]
/external/tcpdump/
Din_cksum.c2 * 4.4-Lite-2 Internet checksum routine, modified to take a vector of
48 * Checksum routine for Internet Protocol family headers (Portable Version).
152 * Given the host-byte-order value of the checksum field in a packet
153 * header, and the network-byte-order computed checksum of the data
154 * that the checksum covers (including the checksum itself), compute
155 * what the checksum field *should* have been.
163 * The value that should have gone into the checksum field in in_cksum_shouldbe()
165 * *but* the checksum field. in in_cksum_shouldbe()
167 * We can compute that by subtracting the value of the checksum in in_cksum_shouldbe()
171 * "sum" is the value of the checksum field, and "computed_sum" in in_cksum_shouldbe()
[all …]
/external/libchrome/base/metrics/
Dbucket_ranges_unittest.cc22 EXPECT_EQ(0u, ranges.checksum()); in TEST()
50 // Checksum does not match. in TEST()
60 TEST(BucketRangesTest, Checksum) { in TEST() argument
67 EXPECT_EQ(289217253u, ranges.checksum()); in TEST()
73 EXPECT_EQ(2843835776u, ranges.checksum()); in TEST()
81 uint32_t checksum = i; in TEST() local
84 if (checksum & 1) in TEST()
85 checksum = kReversedPolynomial ^ (checksum >> 1); in TEST()
87 checksum >>= 1; in TEST()
89 EXPECT_EQ(kCrcTable[i], checksum); in TEST()
/external/fonttools/Lib/fontTools/ttLib/
Dsfnt.py80 checksum = calcChecksum(data[:8] + b'\0\0\0\0' + data[12:])
82 checksum = calcChecksum(data)
85 assert checksum == entry.checksum, "bad checksum for '%s' table" % tag
86 elif checksum != entry.checkSum:
88 print("bad checksum for '%s' table" % tag)
146 entry.checkSum = calcChecksum(data[:8] + b'\0\0\0\0' + data[12:])
150 entry.checkSum = calcChecksum(data)
240 checksums.append(self.tables[tags[i]].checkSum)
242 # TODO(behdad) I'm fairly sure the checksum for woff is not working correctly.
245 # Create a SFNT directory for checksum calculation purposes
[all …]
/external/autotest/client/cros/video/
Dframe_checksum_utils.py11 @param checksums: list of checksums, each checksum in a 4-tuple of ints
18 for checksum in checksums:
19 if checksum in counts:
20 counts[checksum] += 1
22 counts[checksum] = 1
37 for i, checksum in enumerate(checksums):
38 if checksum not in d:
39 d[checksum] = i
/external/pdfium/xfa/src/fxbarcode/oned/
DBC_OnedCode128Writer.cpp153 int32_t checkSum = 0; in Encode() local
155 checkSum = Encode128B(contents, patterns); in Encode()
157 checkSum = Encode128C(contents, patterns); in Encode()
162 checkSum %= 103; in Encode()
163 patterns.Add((int32_t*)CBC_OnedCode128Reader::CODE_PATTERNS[checkSum]); in Encode()
188 int32_t checkSum = 0; in Encode128B() local
192 checkSum += CODE_START_B * checkWeight; in Encode128B()
198 checkSum += patternIndex * checkWeight; in Encode128B()
203 return checkSum; in Encode128B()
207 int32_t checkSum = 0; in Encode128C() local
[all …]
/external/autotest/server/site_tests/display_Tearing/
Ddisplay_Tearing.py64 """Gets the frame checksum of the full screen of the given color.
68 @return The frame checksum mentioned above, which is a tuple.
77 # Gets the checksum of the last one image.
82 """Makes checksum table, which maps checksums into colors.
87 x is the checksum of the full screen of pure color y.
98 checksum = self._get_single_color_checksum(chameleon_port, color)
99 if checksum in checksum_table:
101 checksum_table[checksum] = color
102 logging.info('Color %d has checksums %r', (color, checksum))
144 for checksum in captured_checksums:
[all …]
/external/guava/guava-tests/benchmark/com/google/common/hash/
DChecksumBenchmark.java26 import java.util.zip.Checksum;
29 * Benchmarks for comparing {@link Checksum}s and {@link HashFunction}s that wrap {@link Checksum}s.
60 CRC32 checksum = new CRC32(); in crc32Checksum() local
61 checksum.update(testBytes); in crc32Checksum()
62 result ^= checksum.getValue(); in crc32Checksum()
76 Adler32 checksum = new Adler32(); in adler32Checksum() local
77 checksum.update(testBytes); in adler32Checksum()
78 result ^= checksum.getValue(); in adler32Checksum()
/external/iptables/extensions/
Dlibxt_CHECKSUM.c1 /* Shared library add-on to xtables for CHECKSUM
22 "CHECKSUM target options\n" in CHECKSUM_help()
23 " --checksum-fill Fill in packet checksum.\n"); in CHECKSUM_help()
27 {.name = "checksum-fill", .id = O_CHECKSUM_FILL,
46 printf(" CHECKSUM"); in CHECKSUM_print()
58 printf(" --checksum-fill"); in CHECKSUM_save()
62 .name = "CHECKSUM",
/external/chromium-trace/catapult/third_party/gsutil/gslib/commands/
Dversion.py48 being used, the version of the Boto library, a checksum of the
89 shipped_checksum = gslib.CHECKSUM
104 'checksum: {checksum} ({checksum_ok})\n'
118 checksum=cur_checksum,
136 """Computes a checksum of gsutil code.
138 This checksum can be used to determine if users locally modified
144 MD5 checksum of gsutil code.
149 # Checksum gsutil and all .py files under gslib directory.
155 # Sort to ensure consistent checksum build, no matter how os.walk
/external/squashfs-tools/squashfs-tools/
Dprocess_fragments.c58 * Compute 16 bit BSD checksum over the data, and check for sparseness
75 file_buffer->checksum = chksum; in checksum_sparse()
220 char *data_buffer, int fd, unsigned short *checksum) in get_fragment_cksum() argument
237 *checksum = cksum; in get_fragment_cksum()
279 unsigned short checksum; in frag_thrd() local
325 checksum = dupl_ptr->fragment_checksum; in frag_thrd()
329 * If we have the checksum and it matches then in frag_thrd()
332 * If we *don't* have the checksum, then we are in frag_thrd()
334 * "old" filesystem. Read it in and checksum in frag_thrd()
339 data_buffer, fd, &checksum); in frag_thrd()
[all …]
/external/rmi4utils/rmi4update/
Dfirmware_image.cpp28 unsigned long FirmwareImage::Checksum(unsigned short * data, unsigned long len) in Checksum() function in FirmwareImage
30 unsigned long checksum = 0xFFFFFFFF; in Checksum() local
31 unsigned long lsw = checksum & 0xFFFF; in Checksum()
32 unsigned long msw = checksum >> 16; in Checksum()
41 checksum = msw << 16 | lsw; in Checksum()
43 return checksum; in Checksum()
78 unsigned long calculated_checksum = Checksum((uint16_t *)&(m_memBlock[4]), in Initialize()
82 fprintf(stderr, "Firmware image checksum verification failed, saw 0x%08lX, calculated 0x%08lX\n", in Initialize()
129 fprintf(stdout, "Checksum:\t\t0x%lx\n", m_checksum); in PrintHeaderInfo()
/external/autotest/client/site_tests/video_GlitchDetection/
Dvideo_GlitchDetection.py89 raw_test_checksums = [tuple(checksum) for checksum in
125 logging.debug("Write golden checksum file to %s",
129 for checksum in test_checksums:
130 f.write(' '.join([str(i) for i in checksum]) + '\n')
221 Reads the golden checksum file. Each line in file has the format
222 w x y z where w x y z is a chameleon frame checksum
223 @param path: complete path to the golden checksum file.
230 checksum = tuple(int(val) for val in line.split())
231 checksums.append(checksum)
/external/deqp/external/
Dfetch_sources.py52 def __init__(self, url, filename, checksum, baseDir, extractDir = "src", postExtract=None): argument
56 self.checksum = checksum
80 return computeChecksum(readFile(archiveFile)) == self.checksum
89 checksum = computeChecksum(data)
92 if checksum != self.checksum:
93 …raise Exception("Checksum mismatch for %s, exepected %s, got %s" % (self.filename, self.checksum,
/external/guava/guava-tests/test/com/google/common/hash/
DChecksumHashFunctionTest.java24 import java.util.zip.Checksum;
67 private static void assertChecksum(Supplier<Checksum> supplier, String input) { in assertChecksum()
70 Checksum checksum = supplier.get(); in assertChecksum() local
71 checksum.update(bytes, 0, bytes.length); in assertChecksum()
72 long value = checksum.getValue(); in assertChecksum()
80 private static void assertHash32(int expected, Supplier<Checksum> supplier, String input) { in assertHash32()

12345678910>>...29