Searched refs:crc (Results 1 - 25 of 56) sorted by relevance

123

/haiku/src/add-ons/kernel/file_systems/btrfs/
H A Dcrc_table.cpp13 * This code based off of crc code in UDF-2.50 specs, as permitted.
43 uint32 crc, poly; local
53 crc = reflect32(n);
55 if (crc & 0x80000000)
56 crc = (crc << 1) ^ poly;
58 crc <<= 1;
60 crc = reflect32(crc);
61 printf("0x%08x%s%s", crc, (
[all...]
H A DCRCTable.h9 uint32 calculate_crc(uint32 crc, uint8* data, uint16 length);
H A DCRCTable.cpp61 /*! \brief Calculates the UDF crc checksum for the given byte stream.
63 Based on crc code from UDF-2.50 6.5, as permitted.
69 \return The crc checksum.
72 calculate_crc(uint32 crc, uint8* data, uint16 length) argument
76 crc = kCrcTable[(crc ^ *data) & 0xff] ^ (crc >> 8);
78 return crc;
/haiku/src/add-ons/kernel/file_systems/shared/
H A Dcrc_table.cpp13 This code based off of crc code in UDF-2.50 specs, as permitted.
21 ulong crc, poly; local
39 crc = n << 8;
41 if (crc & 0x8000)
42 crc = (crc << 1) ^ poly;
44 crc <<= 1;
45 crc &= 0xffff;
47 printf("0x%04x%s ", crc, (n != 255 ? "," : ""));
H A DCRCTable.h13 uint16 calculate_crc(uint16 crc, uint8 *data, uint16 length);
H A DCRCTable.cpp50 /*! \brief Calculates the EXT4 crc checksum for the given byte stream.
52 Based on crc code from UDF-2.50 6.5, as permitted.
58 \return The crc checksum, or 0 if an error occurred.
61 calculate_crc(uint16 crc, uint8 *data, uint16 length) argument
65 crc = kCrcTable[(crc ^ *data) & 0xff] ^ (crc >> 8);
67 return crc;
H A Dcrc32.cpp126 * uint32 crc;
128 * crc = ~0U;
130 * crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
131 * return crc ^ ~0U;
224 singletable_crc32c(uint32 crc, const void *buf, size_t size) argument
230 crc = crc32Table[(crc ^ *p++) & 0xff] ^ (crc >>
696 crc32c_sb8_64_bit(uint32 crc, const unsigned char *p_buf, uint32 length, uint32 init_bytes) argument
[all...]
/haiku/src/libs/compat/openbsd_network/compat/netinet/
H A Dif_ethersubr.h36 ether_crc32_le_update(u_int32_t crc, const u_int8_t *buf, size_t len) argument
47 crc ^= buf[i];
48 crc = (crc >> 4) ^ crctab[crc & 0xf];
49 crc = (crc >> 4) ^ crctab[crc & 0xf];
52 return (crc);
57 ether_crc32_be_update(u_int32_t crc, cons argument
[all...]
/haiku/src/add-ons/kernel/file_systems/ext2/
H A Dcrc_table.cpp13 This code based off of crc code in UDF-2.50 specs, as permitted.
24 ulong crc, poly; local
42 crc = n;
44 if (crc & 0x0001)
45 crc = (crc >> 1) ^ poly;
47 crc >>= 1;
49 printf("0x%04x%s ", crc, (n != 255 ? "," : ""));
/haiku/src/libs/compat/freebsd_network/
H A Dfbsd_ether.c50 uint32_t crc;
54 crc = 0xffffffff; /* initial value */
58 carry = (crc ^ data) & 1;
59 crc >>= 1;
61 crc = (crc ^ ETHER_CRC_POLY_LE);
64 return (crc);
77 uint32_t crc; local
79 crc = 0xffffffff; /* initial value */
82 crc
95 uint32_t crc, carry; local
[all...]
/haiku/src/bin/unzip/
H A Dcrc32.c31 #define DO1(buf) crc = CRC32(crc, *buf++)
37 ulg crc32(crc, buf, len)
38 register ulg crc; /* crc shift register */
41 /* Run a set of bytes through the crc shift register. If buf is a NULL
42 pointer, then initialize the crc shift register contents instead.
43 Return the current crc in either case. */
51 crc = crc
[all...]
H A Dcrypt.c170 * and the cyclic redundancy check crc.
172 void crypthead(passwd, crc, zfile)
174 ulg crc; /* crc of file being encrypted */
196 /* Encrypt random header (last two bytes is high word of crc) */
202 ztemp = zencode((int)(crc >> 16) & 0xff, t);
204 ztemp = zencode((int)(crc >> 24) & 0xff, t);
238 crypthead(passwd, z->crc, dest);
300 /* If last two bytes of header don't match crc (or file time in the
306 (z->flg & 8 ? (ush) z->tim & 0xffff : (ush)(z->crc >> 1
[all...]
H A Dcryptf.c173 * and the cyclic redundancy check crc.
175 void crypthead(passwd, crc, zfile)
177 ulg crc; /* crc of file being encrypted */
199 /* Encrypt random header (last two bytes is high word of crc) */
205 ztemp = zencode((int)(crc >> 16) & 0xff, t);
207 ztemp = zencode((int)(crc >> 24) & 0xff, t);
241 crypthead(passwd, z->crc, dest);
303 /* If last two bytes of header don't match crc (or file time in the
309 (z->flg & 8 ? (ush) z->tim & 0xffff : (ush)(z->crc >> 1
[all...]
/haiku/src/add-ons/kernel/file_systems/xfs/
H A DChecksum.h19 inside it. The offset of the 32bit crc fields is passed as the
27 uint32 crc; local
30 crc = calculate_crc32c(XFS_CRC_SEED, (uint8*)buffer, cksum_offset);
33 crc = calculate_crc32c(crc, (uint8*)&zero, sizeof(uint32));
36 return calculate_crc32c(crc, (uint8*)buffer + cksum_offset + sizeof(uint32),
65 uint32 crc = xfs_start_cksum_update(buffer, length, cksum_offset); local
67 *(uint32 *)(buffer + cksum_offset) = ~crc;
77 uint32 crc = xfs_start_cksum_safe(buffer, length, cksum_offset); local
79 TRACE("calculated crc
[all...]
/haiku/src/apps/serialconnect/
H A DXModem.cpp137 uint16_t crc = CRC(fBuffer, kBlockSize); local
139 crcBuf[0] = crc >> 8;
140 crcBuf[1] = crc & 0xFF;
174 uint16_t crc = 0; local
177 crc ^= ((uint16_t)(*buf++)) << 8;
179 if( crc & 0x8000 )
180 crc = (crc << 1) ^ 0x1021;
182 crc = crc <<
[all...]
/haiku/src/libs/compat/openbsd_wlan/net80211/
H A Dieee80211_crypto_wep.c89 u_int32_t iv, crc; local
136 crc = ~0;
161 crc = ether_crc32_le_update(crc, mtod(m, caddr_t) + moff, len);
181 crc = ~crc;
182 icvp[0] = crc;
183 icvp[1] = crc >> 8;
184 icvp[2] = crc >> 16;
185 icvp[3] = crc >> 2
206 u_int32_t crc, crc0; local
[all...]
H A Dieee80211_crypto_tkip.c193 u_int32_t crc; local
245 crc = ~0;
270 crc = ether_crc32_le_update(crc, mtod(m, caddr_t) + moff, len);
291 crc = ether_crc32_le_update(crc, mic, IEEE80211_TKIP_MICLEN);
297 crc = ~crc;
298 icvp[0] = crc;
299 icvp[1] = crc >>
362 u_int32_t crc, crc0; local
[all...]
/haiku/src/add-ons/kernel/partitioning_systems/gpt/
H A Dgpt.h42 void SetHeaderCRC(uint32 crc) argument
43 { header_crc = B_HOST_TO_LENDIAN_INT32(crc); }
76 void SetEntriesCRC(uint32 crc) argument
77 { entries_crc = B_HOST_TO_LENDIAN_INT32(crc); }
H A Dcrc32.cpp101 uint32 crc = ~0U; local
103 crc = kTab[(crc ^ *buffer++) & 0xff] ^ (crc >> 8);
104 return crc ^ ~0U;
/haiku/src/libs/compat/freebsd_wlan/net80211/
H A Dieee80211_crypto_wep.c353 uint32_t i, j, k, crc; local
379 crc = ~0;
388 crc = crc32_table[(crc ^ *pos) & 0xff] ^ (crc >> 8);
410 crc = ~crc;
413 icv[0] = crc;
414 icv[1] = crc >> 8;
415 icv[2] = crc >> 1
436 uint32_t i, j, k, crc; local
[all...]
H A Dieee80211_crypto_tkip.c671 u32 i, j, k, crc; local
688 crc = ~0;
698 crc = crc32_table[(crc ^ *pos) & 0xff] ^ (crc >> 8);
713 crc = ~crc;
716 icv[0] = crc;
717 icv[1] = crc >> 8;
718 icv[2] = crc >> 1
731 u32 i, j, k, crc; local
[all...]
/haiku/headers/private/firewire/
H A Diec13213.h142 crc:16; member in struct:csrhdr
144 uint32_t crc:16,
150 BIT16x2(crc_len, crc);
154 BIT16x2(crc_len, crc);
245 BIT16x2(crc_len, crc);
/haiku/src/add-ons/kernel/file_systems/udf/
H A DUtils.cpp24 /*! \brief Calculates the UDF crc checksum for the given byte stream.
26 Based on crc code from UDF-2.50 6.5, as permitted.
31 \return The crc checksum, or 0 if an error occurred.
36 uint16 crc = 0; local
39 crc = kCrcTable[(crc >> 8 ^ *data) & 0xff] ^ (crc << 8);
41 return crc;
/haiku/src/bin/fwcontrol/
H A Dfwcrom.c248 uint32_t data, sum, crc = 0; local
253 sum = ((crc >> 12) ^ (data >> shift)) & 0xf;
254 crc = (crc << 4) ^ (sum << 12) ^ (sum << 5) ^ sum;
256 crc &= 0xffff;
258 return((uint16_t) crc);
321 uint16_t crc; local
342 crc = crom_crc((uint32_t *)&dir->entry[0], dir->crc_len);
343 len -= snprintf(buf, len, "len=%d crc=0x%04x(%s) ",
344 dir->crc_len, dir->crc,
[all...]
/haiku/src/system/kernel/debug/
H A Ddebug_paranoia.cpp60 uint32 crc = 0xffffffff; local
63 crc = (crc >> 8) ^ sCRC32Table[(crc & 0xff) ^ *data];
67 return crc;

Completed in 273 milliseconds

123