Home
last modified time | relevance | path

Searched full:buffer_size (Results 1 – 25 of 131) sorted by relevance

123456

/freebsd/contrib/libcbor/src/cbor/
H A Dencoding.c12 size_t buffer_size) { in cbor_encode_uint8() argument
13 return _cbor_encode_uint8(value, buffer, buffer_size, 0x00); in cbor_encode_uint8()
17 size_t buffer_size) { in cbor_encode_uint16() argument
18 return _cbor_encode_uint16(value, buffer, buffer_size, 0x00); in cbor_encode_uint16()
22 size_t buffer_size) { in cbor_encode_uint32() argument
23 return _cbor_encode_uint32(value, buffer, buffer_size, 0x00); in cbor_encode_uint32()
27 size_t buffer_size) { in cbor_encode_uint64() argument
28 return _cbor_encode_uint64(value, buffer, buffer_size, 0x00); in cbor_encode_uint64()
32 size_t buffer_size) { in cbor_encode_uint() argument
33 return _cbor_encode_uint(value, buffer, buffer_size, 0x00); in cbor_encode_uint()
[all …]
H A Dserialization.c21 size_t buffer_size) { in cbor_serialize() argument
25 return cbor_serialize_uint(item, buffer, buffer_size); in cbor_serialize()
27 return cbor_serialize_negint(item, buffer, buffer_size); in cbor_serialize()
29 return cbor_serialize_bytestring(item, buffer, buffer_size); in cbor_serialize()
31 return cbor_serialize_string(item, buffer, buffer_size); in cbor_serialize()
33 return cbor_serialize_array(item, buffer, buffer_size); in cbor_serialize()
35 return cbor_serialize_map(item, buffer, buffer_size); in cbor_serialize()
37 return cbor_serialize_tag(item, buffer, buffer_size); in cbor_serialize()
39 return cbor_serialize_float_ctrl(item, buffer, buffer_size); in cbor_serialize()
155 size_t *buffer_size) { in cbor_serialize_alloc() argument
[all …]
H A Dserialization.h28 * @param buffer_size Size of the \p buffer
33 size_t buffer_size);
49 * Since libcbor v0.10, the return value is always the same as `buffer_size` (if
60 * @param[out] buffer_size Size of the \p buffer, or 0 on memory allocation
67 size_t *buffer_size);
73 * @param buffer_size Size of the \p buffer
75 * @return 0 if the \p buffer_size doesn't fit the result
79 size_t buffer_size);
85 * @param buffer_size Size of the \p buffer
87 * @return 0 if the \p buffer_size doesn't fit the result
[all …]
/freebsd/sys/dev/sfxge/common/
H A Defx_lic.c47 __in_bcount(buffer_size)
49 __in size_t buffer_size,
55 __in_bcount(buffer_size)
57 __in size_t buffer_size,
64 __in_bcount(buffer_size)
66 __in size_t buffer_size,
80 __in_bcount(buffer_size)
82 __in size_t buffer_size,
93 __in_bcount(buffer_size)
95 __in size_t buffer_size,
[all …]
H A Def10_image.c330 __in uint32_t buffer_size, in efx_check_signed_image_header() argument
344 cursor.length = buffer_size; in efx_check_signed_image_header()
413 if ((valp + val_size) > ((uint8_t *)bufferp + buffer_size)) { in efx_check_signed_image_header()
458 __in uint32_t buffer_size) in efx_check_unsigned_image() argument
469 if (buffer_size < (EFX_FIELD_OFFSET(efx_image_header_t, eih_size) + in efx_check_unsigned_image()
491 if (buffer_size < (header->eih_size + header->eih_code_size + in efx_check_unsigned_image()
528 __in uint32_t buffer_size, in efx_check_reflash_image() argument
544 if (bufferp == NULL || buffer_size == 0) { in efx_check_reflash_image()
553 rc = efx_check_signed_image_header(bufferp, buffer_size, in efx_check_reflash_image()
565 image_size = buffer_size; in efx_check_reflash_image()
[all …]
H A Def10_impl.h507 __in_bcount(buffer_size)
509 __in size_t buffer_size);
513 __out_bcount(buffer_size)
515 __in size_t buffer_size);
520 __out_bcount(buffer_size)
522 __in size_t buffer_size);
526 __in_bcount(buffer_size)
528 __in size_t buffer_size,
533 __in_bcount(buffer_size)
535 __in size_t buffer_size,
[all …]
/freebsd/lib/libc/net/
H A Dnscache.c60 size_t buffer_size, size; in __nss_common_cache_read() local
103 buffer_size = NSS_CACHE_BUFFER_INITIAL_SIZE; in __nss_common_cache_read()
115 &buffer_size); in __nss_common_cache_read()
117 if (res == -2 && buffer_size < NSS_CACHE_BUFFER_SIZE_LIMIT) { in __nss_common_cache_read()
118 buffer = (char *)realloc(buffer, buffer_size); in __nss_common_cache_read()
119 memset(buffer, 0, buffer_size); in __nss_common_cache_read()
124 if (buffer_size == 0) { in __nss_common_cache_read()
133 res = cache_info->unmarshal_func(buffer, buffer_size, retval, in __nss_common_cache_read()
164 size_t buffer_size; in __nss_common_cache_write() local
186 buffer_size = NSS_CACHE_BUFFER_INITIAL_SIZE; in __nss_common_cache_write()
[all …]
H A Dgetnetnamadr.c60 net_id_func(char *buffer, size_t *buffer_size, va_list ap, void *cache_mdata) in NETDB_THREAD_ALLOC()
77 if (desired_size > *buffer_size) { in NETDB_THREAD_ALLOC()
93 if (desired_size > *buffer_size) { in NETDB_THREAD_ALLOC()
112 *buffer_size = desired_size; in NETDB_THREAD_ALLOC()
118 net_marshal_func(char *buffer, size_t *buffer_size, void *retval, va_list ap, in net_marshal_func() argument
167 if (*buffer_size < desired_size) { in net_marshal_func()
169 *buffer_size = desired_size; in net_marshal_func()
175 *buffer_size = desired_size; in net_marshal_func()
207 net_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, in net_unmarshal_func() argument
242 buffer_size - sizeof(struct netent) - sizeof(char *)) { in net_unmarshal_func()
[all …]
H A Dgetprotoent.c84 __proto_id_func(char *buffer, size_t *buffer_size, va_list ap, in __proto_id_func() argument
101 if (desired_size > *buffer_size) { in __proto_id_func()
115 if (desired_size > *buffer_size) { in __proto_id_func()
132 *buffer_size = desired_size; in __proto_id_func()
138 __proto_marshal_func(char *buffer, size_t *buffer_size, void *retval, in __proto_marshal_func() argument
185 if (*buffer_size < desired_size) { in __proto_marshal_func()
187 *buffer_size = desired_size; in __proto_marshal_func()
193 *buffer_size = desired_size; in __proto_marshal_func()
225 __proto_unmarshal_func(char *buffer, size_t buffer_size, void *retval, in __proto_unmarshal_func() argument
258 buffer_size - sizeof(struct protoent) - sizeof(char *)) { in __proto_unmarshal_func()
[all …]
/freebsd/contrib/libcbor/src/cbor/internal/
H A Dencoders.c12 size_t buffer_size, uint8_t offset) { in _cbor_encode_uint8() argument
14 if (buffer_size >= 1) { in _cbor_encode_uint8()
19 if (buffer_size >= 2) { in _cbor_encode_uint8()
29 size_t buffer_size, uint8_t offset) { in _cbor_encode_uint16() argument
30 if (buffer_size >= 3) { in _cbor_encode_uint16()
46 size_t buffer_size, uint8_t offset) { in _cbor_encode_uint32() argument
47 if (buffer_size >= 5) { in _cbor_encode_uint32()
65 size_t buffer_size, uint8_t offset) { in _cbor_encode_uint64() argument
66 if (buffer_size >= 9) { in _cbor_encode_uint64()
88 size_t buffer_size, uint8_t offset) { in _cbor_encode_uint() argument
[all …]
H A Dencoders.h19 size_t buffer_size, uint8_t offset);
23 size_t buffer_size, uint8_t offset);
27 size_t buffer_size, uint8_t offset);
31 size_t buffer_size, uint8_t offset);
35 size_t buffer_size, uint8_t offset);
/freebsd/crypto/openssl/test/
H A Dafalgtest.c23 #define BUFFER_SIZE 17 macro
32 unsigned char ebuf[BUFFER_SIZE + 32]; in test_afalg_aes_cbc()
33 unsigned char dbuf[BUFFER_SIZE + 32]; in test_afalg_aes_cbc()
43 static const unsigned char in[BUFFER_SIZE] = in test_afalg_aes_cbc()
46 static const unsigned char encresult_128[BUFFER_SIZE] = in test_afalg_aes_cbc()
49 static const unsigned char encresult_192[BUFFER_SIZE] = in test_afalg_aes_cbc()
52 static const unsigned char encresult_256[BUFFER_SIZE] = in test_afalg_aes_cbc()
86 || !TEST_true(EVP_CipherUpdate(ctx, ebuf, &encl, in, BUFFER_SIZE)) in test_afalg_aes_cbc()
91 if (!TEST_mem_eq(enc_result, BUFFER_SIZE, ebuf, BUFFER_SIZE)) in test_afalg_aes_cbc()
101 if (!TEST_int_eq(decl, BUFFER_SIZE) in test_afalg_aes_cbc()
[all …]
/freebsd/usr.sbin/nscd/agents/
H A Dgroup.c46 group_marshal_func(struct group *grp, char *buffer, size_t *buffer_size) in group_marshal_func() argument
70 if ((desired_size > *buffer_size) || (buffer == NULL)) { in group_marshal_func()
71 *buffer_size = desired_size; in group_marshal_func()
79 *buffer_size = desired_size; in group_marshal_func()
119 size_t *buffer_size) in group_lookup_func() argument
130 assert(buffer_size != NULL); in group_lookup_func()
174 group_marshal_func(result, NULL, buffer_size); in group_lookup_func()
175 *buffer = malloc(*buffer_size); in group_lookup_func()
177 group_marshal_func(result, *buffer, buffer_size); in group_lookup_func()
195 group_mp_lookup_func(char **buffer, size_t *buffer_size, void *mdata) in group_mp_lookup_func() argument
[all …]
H A Dpasswd.c46 passwd_marshal_func(struct passwd *pwd, char *buffer, size_t *buffer_size) in passwd_marshal_func() argument
66 if ((*buffer_size < desired_size) || (buffer == NULL)) { in passwd_marshal_func()
67 *buffer_size = desired_size; in passwd_marshal_func()
75 *buffer_size = desired_size; in passwd_marshal_func()
128 size_t *buffer_size) in passwd_lookup_func() argument
139 assert(buffer_size != NULL); in passwd_lookup_func()
182 passwd_marshal_func(result, NULL, buffer_size); in passwd_lookup_func()
183 *buffer = malloc(*buffer_size); in passwd_lookup_func()
185 passwd_marshal_func(result, *buffer, buffer_size); in passwd_lookup_func()
203 passwd_mp_lookup_func(char **buffer, size_t *buffer_size, void *mdata) in passwd_mp_lookup_func() argument
[all …]
H A Dservices.c46 services_marshal_func(struct servent *serv, char *buffer, size_t *buffer_size) in services_marshal_func() argument
73 if ((*buffer_size < desired_size) || (buffer == NULL)) { in services_marshal_func()
74 *buffer_size = desired_size; in services_marshal_func()
82 *buffer_size = desired_size; in services_marshal_func()
122 size_t *buffer_size) in services_lookup_func() argument
135 assert(buffer_size != NULL); in services_lookup_func()
195 services_marshal_func(result, NULL, buffer_size); in services_lookup_func()
196 *buffer = malloc(*buffer_size); in services_lookup_func()
198 services_marshal_func(result, *buffer, buffer_size); in services_lookup_func()
216 services_mp_lookup_func(char **buffer, size_t *buffer_size, void *mdata) in services_mp_lookup_func() argument
[all …]
/freebsd/contrib/netbsd-tests/kernel/
H A Dt_pty.c47 static size_t buffer_size = 4096; variable
61 if ((dbuf = calloc(1, buffer_size)) == NULL) in run()
62 err(EXIT_FAILURE, "malloc(%zu)", buffer_size); in run()
73 for (i = 0; i < buffer_size; i++) in run()
85 buffer_size); in run()
86 if ((size = write(pty, dbuf, buffer_size)) == -1) { in run()
226 " bytes\n", buffer_size); in child_spawn()
227 if ((size = read(tty, dbuf, buffer_size)) in child_spawn()
234 (size_t)size < buffer_size) in child_spawn()
254 if (total != buffer_size * packets) in child_spawn()
[all …]
/freebsd/contrib/libcbor/examples/
H A Dstreaming_array.c17 #define BUFFER_SIZE 8 macro
18 unsigned char buffer[BUFFER_SIZE];
38 flush(cbor_encode_indef_array_start(buffer, BUFFER_SIZE)); in main()
41 flush(cbor_encode_uint32(i, buffer, BUFFER_SIZE)); in main()
44 flush(cbor_encode_break(buffer, BUFFER_SIZE)); in main()
H A Dcreate_items.c26 size_t buffer_size; in main() local
27 cbor_serialize_alloc(root, &buffer, &buffer_size); in main()
29 fwrite(buffer, 1, buffer_size, stdout); in main()
/freebsd/tools/tools/ioat/
H A Dioatcontrol.c78 t->buffer_size = 4 * 1024; in main_raw()
87 t->buffer_size = atoi(argv[2]); in main_raw()
88 if (t->buffer_size == 0) { in main_raw()
180 t.buffer_size = 256 * 1024; in main()
189 t.buffer_size = 8 * 1024; in main()
211 t.buffer_size = atoi(argv[2]); in main()
212 if (t.buffer_size == 0) { in main()
269 bytes = (uintmax_t)t->buffer_size * t->status[IOAT_TEST_OK]; in prettyprint()
/freebsd/sys/dev/liquidio/base/
H A Dlio_console.c641 console->buffer_size = lio_read_device_mem32(oct, coreaddr); in lio_add_console()
694 console->buffer_size = 0; in lio_remove_consoles()
703 lio_console_free_bytes(uint32_t buffer_size, uint32_t wr_idx, uint32_t rd_idx) in lio_console_free_bytes() argument
706 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in lio_console_free_bytes()
709 return (((buffer_size - 1) - (wr_idx - rd_idx)) % buffer_size); in lio_console_free_bytes()
713 lio_console_avail_bytes(uint32_t buffer_size, uint32_t wr_idx, uint32_t rd_idx) in lio_console_avail_bytes() argument
716 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in lio_console_avail_bytes()
719 return (buffer_size - 1 - in lio_console_avail_bytes()
720 lio_console_free_bytes(buffer_size, wr_idx, rd_idx)); in lio_console_avail_bytes()
748 bytes_to_read = lio_console_avail_bytes(console->buffer_size, in lio_console_read()
[all …]
H A Dlio_droq.c141 count += droq->buffer_size; in lio_droq_compute_max_packet_bufs()
182 buf = lio_recv_buffer_alloc(droq->buffer_size); in lio_droq_setup_ring_buffers()
196 droq->buffer_size); in lio_droq_setup_ring_buffers()
287 droq->buffer_size = c_buf_size; in lio_init_droq()
393 recv_pkt->buffer_size[i] = (bytes_left >= droq->buffer_size) ? in lio_create_recv_info()
394 droq->buffer_size : bytes_left; in lio_create_recv_info()
400 bytes_left -= droq->buffer_size; in lio_create_recv_info()
474 buf = lio_recv_buffer_alloc(droq->buffer_size); in lio_droq_refill()
496 droq->buffer_size); in lio_droq_refill()
531 cnt = lio_droq_get_bufcount(droq->buffer_size, (uint32_t)info->length); in lio_droq_dispatch_pkt()
[all …]
/freebsd/tools/test/stress2/misc/
H A Dvm_fault.sh36 #define BUFFER_SIZE 10*1000*1024 // 10 MB
37 static char gBuffer[BUFFER_SIZE];
41 for (int i=0; i<BUFFER_SIZE; i++)
50 for (int i=0; i<BUFFER_SIZE; i++)
/freebsd/sys/contrib/xz-embedded/userspace/
H A Dbuftest.c15 #define BUFFER_SIZE (1024 * 1024) macro
17 static uint8_t in[BUFFER_SIZE];
18 static uint8_t out[BUFFER_SIZE];
/freebsd/contrib/opencsd/decoder/source/c_api/
H A Docsd_c_api.cpp323 …r(const ocsd_trace_protocol_t pkt_protocol, const void *p_pkt, char *buffer, const int buffer_size) in ocsd_pkt_str() argument
326 if((buffer == NULL) || (buffer_size < 2)) in ocsd_pkt_str()
352 err = ocsd_cust_protocol_to_str(pkt_protocol, p_pkt, buffer, buffer_size); in ocsd_pkt_str()
360 strncpy(buffer,pktStr.c_str(),buffer_size-1); in ocsd_pkt_str()
361 buffer[buffer_size-1] = 0; in ocsd_pkt_str()
366 …_err_t ocsd_gen_elem_str(const ocsd_generic_trace_elem *p_pkt, char *buffer, const int buffer_size) in ocsd_gen_elem_str() argument
369 if((buffer == NULL) || (buffer_size < 2)) in ocsd_gen_elem_str()
375 strncpy(buffer,str.c_str(),buffer_size -1); in ocsd_gen_elem_str()
376 buffer[buffer_size-1] = 0; in ocsd_gen_elem_str()
489 OCSD_C_API void ocsd_err_str(const ocsd_err_t err, char *buffer, const int buffer_size) in ocsd_err_str() argument
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_printf.cpp249 int buffer_size, in SharedPrintfCodeNoBuffer() argument
264 buffer_size = v.capacity(); in SharedPrintfCodeNoBuffer()
265 v.resize(buffer_size); in SharedPrintfCodeNoBuffer()
275 needed_length += internal_snprintf(buffer, buffer_size, in SharedPrintfCodeNoBuffer()
277 if (needed_length >= buffer_size) in SharedPrintfCodeNoBuffer()
281 buffer + needed_length, buffer_size - needed_length, "==%d==", pid); in SharedPrintfCodeNoBuffer()
282 if (needed_length >= buffer_size) in SharedPrintfCodeNoBuffer()
286 buffer_size - needed_length, format, args); in SharedPrintfCodeNoBuffer()
287 if (needed_length >= buffer_size) in SharedPrintfCodeNoBuffer()

123456