Home
last modified time | relevance | path

Searched refs:nbytes (Results 1 – 25 of 440) sorted by relevance

12345678910>>...18

/netbsd/src/usr.bin/bdes/
Dbdes.c713 register int nbytes; /* number of bytes to read */ in cfbenc() local
721 nbytes = fbbits / 8; in cfbenc()
725 for (bn = 1; (n = READ(ibuf, nbytes)) == nbytes; bn++) { in cfbenc()
728 for (n = 0; n < 8 - nbytes; n++) in cfbenc()
729 UCHAR(ivec, n) = UCHAR(ivec, n+nbytes); in cfbenc()
730 for (n = 0; n < nbytes; n++) in cfbenc()
731 UCHAR(ivec, 8-nbytes+n) = ibuf[n] ^ UCHAR(msgbuf, n); in cfbenc()
732 WRITE(&CHAR(ivec, 8-nbytes), nbytes); in cfbenc()
739 MEMZERO(&ibuf[n], nbytes - n); in cfbenc()
740 ibuf[nbytes - 1] = n; in cfbenc()
[all …]
/netbsd/src/sys/external/bsd/drm2/include/linux/
Dkfifo.h75 _init_kfifo(struct kfifo_meta *meta, size_t nbytes) in _init_kfifo() argument
81 meta->kfm_nbytes = nbytes; in _init_kfifo()
97 _kfifo_alloc(struct kfifo_meta *meta, void *bufp, size_t nbytes, gfp_t gfp) in _kfifo_alloc() argument
101 buf = kmalloc(nbytes, gfp); in _kfifo_alloc()
108 _init_kfifo(meta, nbytes); in _kfifo_alloc()
139 const size_t nbytes = meta->kfm_nbytes; in _kfifo_len() local
141 return (head <= tail ? tail - head : nbytes + tail - head); in _kfifo_len()
157 const size_t nbytes = meta->kfm_nbytes; in _kfifo_out_peek() local
164 if (size <= nbytes - head) { in _kfifo_out_peek()
167 } else if (size <= nbytes + tail - head) { in _kfifo_out_peek()
[all …]
/netbsd/src/usr.bin/hexdump/
Dodsyntax.c60 int nbytes; member
224 int nbytes = 0; in posixtypes() local
232 nbytes = 1; in posixtypes()
238 nbytes = sizeof(float); in posixtypes()
241 nbytes = sizeof(double); in posixtypes()
244 nbytes = sizeof(long double); in posixtypes()
253 nbytes = strtol(type_string, &tmp, 10); in posixtypes()
256 nbytes = 8; in posixtypes()
265 nbytes = sizeof(char); in posixtypes()
268 nbytes = sizeof(short); in posixtypes()
[all …]
/netbsd/src/external/gpl3/gdb/dist/sim/cris/
Drvdummy.c136 send_output (int fd, unsigned char *buf, int nbytes) in send_output() argument
138 while (nbytes > 0) in send_output()
140 ssize_t written = write (fd, buf, nbytes); in send_output()
147 nbytes -= written; in send_output()
156 expect_input (int fd, unsigned char *buf, int nbytes, int ncomp) in expect_input() argument
161 for (i = 0; i < nbytes; i++) in expect_input()
202 int nbytes = 0; in handle_input() local
234 bytes[nbytes++] = data; in handle_input()
237 expect_input (fd, bytes, nbytes, nbytes); in handle_input()
241 for (i = 0; i < nbytes; i++) in handle_input()
[all …]
/netbsd/src/external/bsd/openldap/dist/libraries/liblutil/
Dentropy.c54 int lutil_entropy( unsigned char *buf, ber_len_t nbytes ) in lutil_entropy() argument
56 if( nbytes == 0 ) return 0; in lutil_entropy()
69 rc = read( fd, buf, nbytes ); in lutil_entropy()
73 nbytes-=rc; in lutil_entropy()
76 } while( nbytes > 0 ); in lutil_entropy()
79 return nbytes > 0 ? -1 : 0; in lutil_entropy()
92 if(!CryptGenRandom(hProv, (DWORD) nbytes, (BYTE *) buf)) { in lutil_entropy()
143 for( n = 0; n < nbytes; n += 16 ) { in lutil_entropy()
163 lutil_MD5Update( &ctx, buf, nbytes ); in lutil_entropy()
168 nbytes - n >= 16 ? 16 : nbytes - n ); in lutil_entropy()
/netbsd/src/external/bsd/file/dist/src/
Dencoding.c86 size_t nbytes = b->flen; in file_encoding() local
102 if (nbytes > ms->encoding_max) in file_encoding()
103 nbytes = ms->encoding_max; in file_encoding()
105 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding()
111 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding()
112 if (looks_utf7(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
121 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding()
125 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding()
129 } else if ((ucs_type = looks_ucs32(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
138 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding()
[all …]
Dis_simh.c118 uint32_t nbytes, cbytes; in simh_parse() local
124 while (ue - uc >= CAST(ptrdiff_t, sizeof(nbytes))) { in simh_parse()
125 nbytes = getlen(&uc); in simh_parse()
126 if ((nt > 0 || nr > 0) && nbytes == 0xFFFFFFFF) in simh_parse()
129 if (nbytes == 0) { in simh_parse()
138 uc += nbytes; in simh_parse()
139 if (ue - uc < CAST(ptrdiff_t, sizeof(nbytes))) in simh_parse()
142 if (nbytes != cbytes) in simh_parse()
/netbsd/src/crypto/external/bsd/openssl/dist/engines/
De_padlock.c314 const unsigned char *in_arg, size_t nbytes) in padlock_ecb_cipher() argument
317 ALIGNED_CIPHER_DATA(ctx), nbytes); in padlock_ecb_cipher()
322 const unsigned char *in_arg, size_t nbytes) in padlock_cbc_cipher() argument
328 if ((ret = padlock_cbc_encrypt(out_arg, in_arg, cdata, nbytes))) in padlock_cbc_cipher()
335 const unsigned char *in_arg, size_t nbytes) in padlock_cfb_cipher() argument
347 while (chunk < AES_BLOCK_SIZE && nbytes != 0) { in padlock_cfb_cipher()
349 chunk++, nbytes--; in padlock_cfb_cipher()
351 while (chunk < AES_BLOCK_SIZE && nbytes != 0) { in padlock_cfb_cipher()
354 ivp[chunk++] = c, nbytes--; in padlock_cfb_cipher()
360 if (nbytes == 0) in padlock_cfb_cipher()
[all …]
/netbsd/src/lib/libc/db/btree/
Dbt_split.c92 uint32_t n, nbytes, nksize = 0; /* pacify gcc */ in __bt_split() local
182 nbytes = NBINTERNAL(bi->ksize); in __bt_split()
186 nbytes = NBINTERNAL(bl->ksize); in __bt_split()
199 if (n < nbytes) { in __bt_split()
201 bt_pfxsaved += nbytes - n; in __bt_split()
203 nbytes = n; in __bt_split()
211 nbytes = NRINTERNAL; in __bt_split()
218 if ((uint32_t)h->upper - (uint32_t)h->lower < nbytes + sizeof(indx_t)) { in __bt_split()
221 bt_root(t, h, &l, &r, &skip, nbytes) : in __bt_split()
222 bt_page(t, h, &l, &r, &skip, nbytes); in __bt_split()
[all …]
/netbsd/src/crypto/external/bsd/netpgp/dist/src/netpgpverify/
Drsa.c69 int nbytes; in lowlevel_rsa_private_encrypt() local
78 nbytes = PGPV_BN_num_bytes(rsa->n); in lowlevel_rsa_private_encrypt()
79 decbuf = netpgp_allocate(1, nbytes); in lowlevel_rsa_private_encrypt()
82 PGPV_BN_bin2bn(decbuf, nbytes, decbn); in lowlevel_rsa_private_encrypt()
92 signc = PGPV_BN_bn2bin(signedbn, &encbuf[nbytes - signedbytes]); in lowlevel_rsa_private_encrypt()
93 memset(encbuf, 0x0, nbytes - signc); in lowlevel_rsa_private_encrypt()
94 r = nbytes; in lowlevel_rsa_private_encrypt()
96 netpgp_deallocate(decbuf, nbytes); in lowlevel_rsa_private_encrypt()
108 int nbytes; in lowlevel_rsa_public_encrypt() local
116 nbytes = PGPV_BN_num_bytes(rsa->n); in lowlevel_rsa_public_encrypt()
[all …]
/netbsd/src/crypto/external/bsd/netpgp/dist/src/librsa/
Drsa.c69 int nbytes; in lowlevel_rsa_private_encrypt() local
78 nbytes = BN_num_bytes(rsa->n); in lowlevel_rsa_private_encrypt()
79 decbuf = netpgp_allocate(1, nbytes); in lowlevel_rsa_private_encrypt()
82 BN_bin2bn(decbuf, nbytes, decbn); in lowlevel_rsa_private_encrypt()
92 signc = BN_bn2bin(signedbn, &encbuf[nbytes - signedbytes]); in lowlevel_rsa_private_encrypt()
93 memset(encbuf, 0x0, nbytes - signc); in lowlevel_rsa_private_encrypt()
94 r = nbytes; in lowlevel_rsa_private_encrypt()
96 netpgp_deallocate(decbuf, nbytes); in lowlevel_rsa_private_encrypt()
108 int nbytes; in lowlevel_rsa_public_encrypt() local
116 nbytes = BN_num_bytes(rsa->n); in lowlevel_rsa_public_encrypt()
[all …]
/netbsd/src/sys/arch/arc/isa/
Disadma.c29 bus_size_t nbytes; member
133 isadma_start(void *addr, bus_size_t nbytes, int chan, int flags) in isadma_start() argument
146 ((chan & 4) ? (nbytes >= (1<<17) || nbytes & 1 || (u_int)addr & 1) : in isadma_start()
147 (nbytes >= (1<<16)))) in isadma_start()
160 di->nbytes = nbytes; in isadma_start()
165 if (isadma_map(addr, nbytes, di->phys, mflags) != 1) in isadma_start()
170 isadma_copytobuf(addr, nbytes, 1, di->phys); in isadma_start()
191 outb(waport + 1, --nbytes); in isadma_start()
192 outb(waport + 1, nbytes>>8); in isadma_start()
214 nbytes >>= 1; in isadma_start()
[all …]
/netbsd/src/crypto/external/bsd/heimdal/dist/lib/roken/
Dnet_write.c49 net_write (rk_socket_t fd, const void *buf, size_t nbytes) in net_write() argument
53 size_t rem = nbytes; in net_write()
65 return nbytes - rem; in net_write()
73 return nbytes; in net_write()
79 net_write(rk_socket_t sock, const void *buf, size_t nbytes) in net_write() argument
83 size_t rem = nbytes; in net_write()
112 return nbytes - rem; in net_write()
121 return nbytes - rem; in net_write()
130 return nbytes; in net_write()
Dnet_read.c47 net_read (rk_socket_t fd, void *buf, size_t nbytes) in net_read() argument
51 size_t rem = nbytes; in net_read()
66 return nbytes; in net_read()
72 net_read(rk_socket_t sock, void *buf, size_t nbytes) in net_read() argument
76 size_t rem = nbytes; in net_read()
117 return nbytes; in net_read()
/netbsd/src/external/gpl2/xcvs/dist/src/
Dsocket-client.c68 int nbytes; in socket_buffer_input() local
94 nbytes = recv (sb->socket, data + *got, size - *got, 0); in socket_buffer_input()
95 if (nbytes < 0) in socket_buffer_input()
98 if (nbytes == 0) in socket_buffer_input()
109 *got += nbytes; in socket_buffer_input()
141 int nbytes; in socket_buffer_output() local
143 nbytes = send (sb->socket, data, have, 0); in socket_buffer_output()
144 if (nbytes < 0) in socket_buffer_output()
148 have -= nbytes; in socket_buffer_output()
149 data += nbytes; in socket_buffer_output()
/netbsd/src/sys/external/bsd/drm2/drm/
Ddrm_gem_vm.c69 size_t nbytes, int prot, struct uvm_object **uobjp, voff_t *uoffsetp, in drm_gem_or_legacy_mmap_object() argument
74 KASSERT(nbytes > 0); in drm_gem_or_legacy_mmap_object()
76 ret = drm_gem_mmap_object(dev, byte_offset, nbytes, prot, uobjp, in drm_gem_or_legacy_mmap_object()
83 return drm_legacy_mmap_object(dev, byte_offset, nbytes, prot, uobjp, in drm_gem_or_legacy_mmap_object()
88 drm_gem_mmap_object(struct drm_device *dev, off_t byte_offset, size_t nbytes, in drm_gem_mmap_object() argument
93 KASSERT(nbytes > 0); in drm_gem_mmap_object()
96 ret = drm_gem_mmap_object_locked(dev, byte_offset, nbytes, prot, in drm_gem_mmap_object()
105 size_t nbytes, int prot __unused, struct uvm_object **uobjp, in drm_gem_mmap_object_locked() argument
110 const unsigned long npages = (nbytes >> PAGE_SHIFT); in drm_gem_mmap_object_locked()
118 KASSERT(nbytes == (npages << PAGE_SHIFT)); in drm_gem_mmap_object_locked()
Ddrm_cache.c81 drm_clflush_virt_range(void *vaddr, unsigned long nbytes) in drm_clflush_virt_range() argument
86 drm_md_clflush_virt_range(vaddr, nbytes); in drm_clflush_virt_range()
140 drm_md_clflush_virt_range(const void *ptr, size_t nbytes) in drm_md_clflush_virt_range() argument
145 const vaddr_t end = roundup(vaddr + nbytes, clflush_size); in drm_md_clflush_virt_range()
201 drm_md_clflush_virt_range(const void *ptr, size_t nbytes) in drm_md_clflush_virt_range() argument
207 cache_flush(ptr, nbytes); in drm_md_clflush_virt_range()
247 drm_md_clflush_virt_range(const void *ptr, size_t nbytes) in drm_md_clflush_virt_range() argument
252 vaddr_t end = roundup(va + nbytes, dcsize); in drm_md_clflush_virt_range()
/netbsd/src/sys/dev/isa/
Disadma.c351 _isa_dmastart(struct isa_dma_state *ids, int chan, void *addr, bus_size_t nbytes, struct proc *p, i… in _isa_dmastart() argument
367 chan, addr, (u_long)nbytes, p, flags, busdmaflags); in _isa_dmastart()
377 if (nbytes > (1 << 17) || nbytes & 1 || (u_long)addr & 1) { in _isa_dmastart()
380 (unsigned long) nbytes, addr); in _isa_dmastart()
384 if (nbytes > (1 << 16)) { in _isa_dmastart()
387 (unsigned long) nbytes); in _isa_dmastart()
396 error = bus_dmamap_load(ids->ids_dmat, dmam, addr, nbytes, in _isa_dmastart()
424 ids->ids_dmalength[chan] = nbytes; in _isa_dmastart()
445 (--nbytes) & 0xff); in _isa_dmastart()
447 (nbytes >> 8) & 0xff); in _isa_dmastart()
[all …]
/netbsd/src/lib/libbsdmalloc/
Dmalloc.c178 malloc(size_t nbytes) in malloc() argument
217 if (nbytes <= (n = pagesz - sizeof (*op) - RSLOP)) { in malloc()
230 while (nbytes > amt + n) { in malloc()
260 op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1); in malloc()
356 realloc(void *cp, size_t nbytes) in realloc() argument
365 return (malloc(nbytes)); in realloc()
366 if (nbytes == 0) { in realloc()
408 if (nbytes <= onb && nbytes > i) { in realloc()
410 op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1); in realloc()
423 if ((res = malloc(nbytes)) == NULL) { in realloc()
[all …]
/netbsd/src/sys/dev/
Dcgd_crypto.c179 cgd_cipher_aes_cbc(void *privdata, void *dst, const void *src, size_t nbytes, in cgd_cipher_aes_cbc() argument
190 aes_cbc_enc(&apd->ap_enckey, src, dst, nbytes, iv, in cgd_cipher_aes_cbc()
194 aes_cbc_dec(&apd->ap_deckey, src, dst, nbytes, iv, in cgd_cipher_aes_cbc()
261 cgd_cipher_aes_xts(void *cookie, void *dst, const void *src, size_t nbytes, in cgd_cipher_aes_xts() argument
272 aes_xts_enc(&ax->ax_enckey, src, dst, nbytes, tweak, in cgd_cipher_aes_xts()
276 aes_xts_dec(&ax->ax_deckey, src, dst, nbytes, tweak, in cgd_cipher_aes_xts()
330 cgd_cipher_3des_cbc(void *privdata, void *dst, const void *src, size_t nbytes, in cgd_cipher_3des_cbc() argument
344 des_ede3_cbc_encrypt(src, dst, nbytes, in cgd_cipher_3des_cbc()
349 des_ede3_cbc_encrypt(src, dst, nbytes, in cgd_cipher_3des_cbc()
401 cgd_cipher_bf_cbc(void *privdata, void *dst, const void *src, size_t nbytes, in cgd_cipher_bf_cbc() argument
[all …]
/netbsd/src/bin/sh/
Dmemalloc.c61 ckmalloc(size_t nbytes) in ckmalloc() argument
65 p = malloc(nbytes); in ckmalloc()
77 ckrealloc(pointer p, int nbytes) in ckrealloc() argument
79 p = realloc(p, nbytes); in ckrealloc()
126 stalloc(int nbytes) in stalloc() argument
130 nbytes = SHELL_ALIGN(nbytes); in stalloc()
131 if (nbytes > stacknleft) { in stalloc()
135 blocksize = nbytes; in stalloc()
148 stacknxt += nbytes; in stalloc()
149 stacknleft -= nbytes; in stalloc()
/netbsd/src/external/mit/expat/dist/xmlwf/
Dreadfilemap.c90 size_t nbytes; in filemap() local
116 nbytes = sb.st_size; in filemap()
118 if (nbytes == 0) { in filemap()
124 p = malloc(nbytes); in filemap()
130 n = EXPAT_read(fd, p, (EXPAT_read_req_t)nbytes); in filemap()
137 if (n != (EXPAT_read_count_t)nbytes) { in filemap()
143 processor(p, nbytes, name, arg); in filemap()
Dunixfilemap.c64 size_t nbytes; in filemap() local
88 nbytes = sb.st_size; in filemap()
90 if (nbytes == 0) { in filemap()
96 p = (void *)mmap((void *)0, (size_t)nbytes, PROT_READ, MAP_FILE | MAP_PRIVATE, in filemap()
103 processor(p, nbytes, name, arg); in filemap()
104 munmap((void *)p, nbytes); in filemap()
/netbsd/src/lib/libcrypt/
Dhmac.c142 b2x(char *buf, int bufsz, unsigned char *data, int nbytes) in b2x() argument
146 if (bufsz <= (nbytes * 2)) in b2x()
149 for (i = 0; i < nbytes; i++) { in b2x()
158 x2b(unsigned char *buf, int bufsz, char *data, int nbytes) in x2b() argument
163 if (nbytes < 0) in x2b()
164 nbytes = strlen(data); in x2b()
165 nbytes /= 2; in x2b()
166 if (bufsz <= nbytes) in x2b()
168 for (i = 0; i < nbytes; i++) { in x2b()
/netbsd/src/sys/dev/acpi/
Dapei_erst.c154 apei_pmemmove(uint64_t pdst, uint64_t psrc, uint64_t nbytes) in apei_pmemmove() argument
160 nbytes, psrc, pdst); in apei_pmemmove()
170 } else if (pdst < psrc && psrc < pdst + nbytes) { in apei_pmemmove()
178 vdst = AcpiOsMapMemory(pdst, nbytes + (psrc - pdst)); in apei_pmemmove()
180 memmove(vdst, vsrc, nbytes); in apei_pmemmove()
181 AcpiOsUnmapMemory(vdst, nbytes + (psrc - pdst)); in apei_pmemmove()
182 } else if (psrc < pdst && pdst < psrc + nbytes) { in apei_pmemmove()
190 vsrc = AcpiOsMapMemory(psrc, nbytes + (pdst - psrc)); in apei_pmemmove()
192 memmove(vdst, vsrc, nbytes); in apei_pmemmove()
193 AcpiOsUnmapMemory(vsrc, nbytes + (pdst - psrc)); in apei_pmemmove()
[all …]

12345678910>>...18