HomeSort by: relevance | last modified time | path
    Searched defs:crc (Results 1 - 25 of 122) sorted by relevancy

1 2 3 4 5

  /src/distrib/utils/sparkcrc/
sparkcrc.c 42 * Trivial progarm to generate a crc suitable for use in a sparkive file
87 int crc = 0; local in function:main
97 crc = (crc >> 8) ^ crclookup[(crc & 0xff) ^ buf[i]];
100 printf("%d\n", (int)crc);
  /src/sys/dev/nand/
nand_crc.c 34 /* Implements CRC-16 as required by the ONFI 2.3 specification */
47 uint16_t crc = init; local in function:nand_crc16
52 crc ^= data[i] << 8;
55 if ((crc & highbit) != 0x00)
56 crc = (crc << 1) ^ polynom;
58 crc <<= 1;
62 return crc;
  /src/usr.bin/mkubootimage/
crc32.c 93 uint32_t crc; local in function:crc32v
96 crc = ~0U;
103 crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
106 return crc ^ ~0U;
  /src/usr.sbin/mtree/
crc.c 1 /* $NetBSD: crc.c,v 1.11 2024/12/05 17:17:43 christos Exp $ */
42 static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93";
44 __RCSID("$NetBSD: crc.c,v 1.11 2024/12/05 17:17:43 christos Exp $");
114 * locations to store the crc and the number of bytes read. It returns 0 on
117 uint32_t crc_total = ~0u; /* The crc over a number of files. */
120 crc(int fd, uint32_t *cval, uint32_t *clen) function in typeref:typename:int
  /src/sys/dev/onewire/
onewire_subr.c 82 u_int8_t crc = 0; local in function:onewire_crc
85 crc = crctable[crc ^ *p++];
87 return (crc);
  /src/usr.bin/cksum/
crc.c 1 /* $NetBSD: crc.c,v 1.22 2021/03/18 18:12:35 cheusov Exp $ */
42 static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93";
44 __RCSID("$NetBSD: crc.c,v 1.22 2021/03/18 18:12:35 cheusov Exp $");
113 * locations to store the crc and the number of bytes read. It returns 0 on
117 crc(int fd, uint32_t *cval, off_t *clen) function in typeref:typename:int
154 uint32_t crc = crctab[a]; local in function:tables
156 COMPUTE(crc, 0);
157 crcslice[b][a] = crc;
  /src/sys/dev/ir/
sir.c 47 * CRC computation table
211 uint32_t crc; local in function:deframe_process
221 crc = crc_ccitt_16(INITFCS, fstate->buffer,
227 if (crc == GOODFCS)
  /src/sys/opencrypto/
deflate.c 199 * and appending the crc and uncompressed length.
202 * a flag indication final buffer. The crc is maintained
207 * Ditto for uncompress - CRC is extracted from the final packed
208 * and compared against CRC of uncompressed data.
236 u_int32_t crc; local in function:gzip_global
253 crc = crc32(0, data, size);
254 DPRINTF("size %u, crc 0x%x\n", size, crc);
294 crc = crc32(0, NULL, 0); /* get initial crc value *
    [all...]
  /src/sys/ufs/chfs/
ebh_media.h 55 /* sizeof(crc) + sizeof(lid) */
83 * @crc: CRC32 sum
93 * Invalidated eraseblock header means that the @crc and @lid is set to 0.
96 le32 crc; member in struct:chfs_nor_eb_hdr
102 * @crc: CRC32 sum
111 le32 crc; member in struct:chfs_nand_eb_hdr
chfs_scan.c 73 * chfs_scan_check_node_hdr - checks node magic and crc
80 uint32_t crc, hdr_crc; local in function:chfs_scan_check_node_hdr
90 crc = crc32(0, (uint8_t *)nhdr, CHFS_NODE_HDR_SIZE - 4);
92 if (crc != hdr_crc) {
93 dbg("bad crc\n");
100 /* chfs_scan_check_vnode - check vnode crc and add it to vnode cache */
110 uint32_t crc; local in function:chfs_scan_check_vnode
113 crc = crc32(0, (uint8_t *)vnode,
116 /* check node crc */
117 if (crc != le32toh(vnode->node_crc))
282 uint32_t crc; local in function:chfs_scan_check_dirent_node
356 uint32_t crc, vno; local in function:chfs_scan_check_data_node
    [all...]
  /src/common/dist/zlib/examples/
gzjoin.c 239 /* skip header crc if present */
265 local void gzinit(unsigned long *crc, unsigned long *tot, FILE *out)
268 *crc = crc32(0L, Z_NULL, 0);
275 the output, and the gzip trailer is written. crc and tot maintains the
276 crc and length (modulo 2^32) of the output for the trailer. The resulting
278 of gzcopy() to write the gzip header and to initialize crc and tot. */
279 local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot,
410 /* update crc and tot */
411 *crc = crc32_combine(*crc, bget4(in), len)
429 unsigned long crc, tot; \/* running crc and total uncompressed length *\/ local in function:main
    [all...]
gznorm.c 104 unsigned long crc = 0; // accumulated CRC of uncompressed data local in function:gzip_normalize
142 // tracked, for the calculation of the total CRC.
158 // correctly compute the total CRC.
386 // CRC and the total uncompressed length.
391 // Update the total CRC.
395 crc = crc ? crc32_combine(crc, part, len2) : part;
436 // Write the gzip trailer, which is the CRC and the uncompressed lengt
    [all...]
  /src/sys/arch/evbarm/stand/gzboot/
gzboot.c 84 #define HEAD_CRC 0x02 /* bit 1 set: header CRC present */
98 uint32_t crc; /* crc32 of uncompressed data */ member in struct:state
194 unsigned char *start = buf; /* start for CRC computation */
217 /* Check CRC and original size */
218 s->crc = crc32(s->crc, start, (unsigned int)
222 if (get_u32(s) != s->crc) {
223 printf("FATAL: CRC checksum mismatch\n");
241 s->crc = crc32(s->crc, start
    [all...]
  /src/sys/dev/dkwedge/
dkwedge_gpt.c 101 uint32_t crc; local in function:gpt_verify_header_crc
104 crc = hdr->hdr_crc_self;
106 rv = le32toh(crc) == crc32(0, (void *)hdr, le32toh(hdr->hdr_size));
107 hdr->hdr_crc_self = crc;
220 aprint_error("%s: bad GPT partition array CRC\n",
  /src/sys/dev/dtv/
dtv_demux.c 157 /* ISO/IEC 13818-1 Annex A "CRC Decoder Model" */
162 uint32_t CRC = 0xffffffff;
166 CRC = (CRC << 8) ^ crc_tab[((CRC >> 24) ^ *buf++) & 0xff];
168 return CRC;
555 * Verify the CRC of a PSI section.
560 uint32_t crc, sec_crc; local in function:dtv_demux_check_crc
564 * not include a CRC field.
570 crc = dtv_demux_crc32(&sec->sec_buf[0], sec->sec_length - 4)
    [all...]
  /src/sys/external/bsd/drm2/dist/drm/
drm_debugfs_crc.c 48 * DOC: CRC ABI
50 * DRM device drivers can provide to userspace CRC information of each frame as
51 * it reached a given hardware component (a CRC sampling "source").
54 * file dri/0/crtc-N/crc/control in debugfs, with N being the index of the CRTC.
59 * Once frame CRC generation is enabled, userspace can capture them by reading
60 * the dri/0/crtc-N/crc/data file. Each line in that file contains the frame
62 * containing the CRC data. Fields are separated by a single space and the number
63 * of CRC fields is source-specific.
65 * Note that though in some cases the CRC is computed in a specified way and on
66 * the frame contents as supplied by userspace (eDP 1.3), in general the CRC
130 struct drm_crtc_crc *crc = &crtc->crc; local in function:crc_control_write
201 struct drm_crtc_crc *crc = &crtc->crc; local in function:crtc_crc_open
264 struct drm_crtc_crc *crc = &crtc->crc; local in function:crtc_crc_release
291 struct drm_crtc_crc *crc = &crtc->crc; local in function:crtc_crc_read
350 struct drm_crtc_crc *crc = &crtc->crc; local in function:crtc_crc_poll
399 struct drm_crtc_crc *crc = &crtc->crc; local in function:drm_crtc_add_crc_entry
    [all...]
  /src/sys/dev/i2c/
aht20.c 179 uint8_t crc = 0xFF; local in function:aht20_crc
182 crc ^= data[i];
184 if (crc & 0x80)
185 crc = (crc << 1) ^ 0x31;
187 crc <<= 1;
190 return crc;
241 SYSCTL_DESCR("Ignore the CRC byte"), NULL, 0, &sc->sc_ignorecrc,
434 DPRINTF(sc, 2, ("%s: Raw data: STATUS: %02x - RH: %02x %02x - %02x - TEMP: %02x %02x - CRC: %02x -- %02x\n",
450 /* Fake out the CRC check if being asked to ignore CRC *
    [all...]
i2c_exec.c 430 uint8_t crc = 0; local in function:iic_smbus_pec
433 crc = iic_smbus_crc8((crc ^ s[i]) << 8);
436 crc = iic_smbus_crc8((crc ^ r[i]) << 8);
438 return crc;
am2315.c 78 uint16_t crc = 0xffff; local in function:am2315_crc
81 crc ^= data[j];
83 if (crc & 0x01) {
84 crc >>= 1;
85 crc ^= 0xA001;
87 crc >>= 1;
92 return crc;
193 uint16_t crc, readcrc, model; local in function:am2315_attach
265 buf[10], crc, readcrc))
271 crc = am2315_crc(buf, 4)
361 uint16_t crc, readcrc; local in function:am2315_refresh
    [all...]
  /src/sys/net80211/
ieee80211_crypto_wep.c 310 uint32_t i, j, k, crc; local in function:wep_encrypt
339 crc = ~0;
348 crc = crc32_table[(crc ^ *pos) & 0xff] ^ (crc >> 8);
370 crc = ~crc;
373 icv[0] = crc;
374 icv[1] = crc >> 8;
375 icv[2] = crc >> 16
395 uint32_t i, j, k, crc; local in function:wep_decrypt
    [all...]
  /src/sys/dev/iscsi/
iscsi_utils.c 46 * CRC LOOKUP TABLE
48 * The following CRC lookup table was generated automagically
49 * by the Rocksoft^tm Model CRC Algorithm Table Generation
56 * For more information on the Rocksoft^tm Model CRC Algorithm,
57 * see the document titled "A Painless Guide to CRC Error
147 uint32_t crc = 0xffffffff; local in function:gen_digest
150 crc = ((crc >> 8) & 0x00ffffff) ^ crc_table[(crc ^ *bp++) & 0xff];
152 return htonl(bswap32(crc ^ 0xffffffff))
172 uint32_t crc = 0xffffffff; local in function:gen_digest_2
    [all...]
  /src/common/dist/zlib/contrib/minizip/
mztools.c 53 unsigned int crc = READ_32(header + 14); /* crc */ local in function:unzRepair
153 WRITE_32(header + 16, crc);
  /src/sys/dev/usb/
if_cdce.c 270 /* Strip off CRC added by Zaurus, if present */
285 /* Zaurus wants a 32-bit CRC appended to every frame */
286 uint32_t crc; local in function:cdce_uno_tx_prepare
291 extra = sizeof(crc);
299 crc = htole32(~ether_crc32_le(c->unc_buf, m->m_pkthdr.len));
300 memcpy(c->unc_buf + m->m_pkthdr.len, &crc, sizeof(crc));
  /src/sys/arch/atari/stand/tostools/libtos/
cread.c 70 #define HEAD_CRC 0x02 /* bit 1 set: header CRC present */
82 unsigned long crc; /* crc32 of uncompressed data */ member in struct:sd
214 if ((flags & HEAD_CRC) != 0) { /* skip the header crc */
279 unsigned char *start = buf; /* starting point for crc computation */
335 /* Check CRC and original size */
336 s->crc = crc32(s->crc, start, (unsigned int)
340 if (getLong(s) != s->crc ||
349 s->crc = crc32(0L, Z_NULL, 0);
357 s->crc = crc32(s->crc, start
    [all...]
  /src/sys/dev/dmover/
swdmover.c 555 uint32_t crc = 0xffffffffU ^ last; local in function:iscsi_crc32c
558 crc = iscsi_crc32c_table[(crc ^ *buf++) & 0xff] ^ (crc >> 8);
560 return (crc ^ 0xffffffffU);

Completed in 141 milliseconds

1 2 3 4 5