| /lib/lwip/lwip/src/api/ |
| A D | netbuf.c | 68 if (buf != NULL) { in netbuf_new() 71 return buf; in netbuf_new() 83 if (buf != NULL) { in netbuf_delete() 86 buf->p = buf->ptr = NULL; in netbuf_delete() 116 buf->ptr = buf->p; in netbuf_alloc() 133 buf->p = buf->ptr = NULL; in netbuf_free() 135 buf->flags = 0; in netbuf_free() 163 buf->p->len = buf->p->tot_len = size; in netbuf_ref() 164 buf->ptr = buf->p; in netbuf_ref() 228 buf->ptr = buf->ptr->next; in netbuf_next() [all …]
|
| /lib/ |
| A D | circbuf.c | 16 buf->size = 0; in buf_init() 21 buf->top = buf->data; in buf_init() 22 buf->tail = buf->data; in buf_init() 23 buf->end = &(buf->data[size]); in buf_init() 47 p = buf->top; in buf_pop() 62 buf->top = p; in buf_pop() 77 p = buf->tail; in buf_push() 85 if (buf->size < buf->totalsize) { in buf_push() 88 buf->top++; in buf_push() 89 if (buf->top == buf->end) { in buf_push() [all …]
|
| A D | vsprintf.c | 85 return buf; in put_dec_trunc() 127 return buf; in put_dec_full() 137 buf = put_dec_full(buf, rem); in put_dec() 256 return buf; in number() 276 return buf; in string() 290 *buf = 0; in string16() 300 *buf = 0; in string16() 308 return buf; in string16() 327 return buf; in device_path_string() 545 str = buf; in vsnprintf_internal() [all …]
|
| A D | tpm-v1.c | 42 if (pack_byte_string(buf, sizeof(buf), "sw", in tpm1_startup() 144 if (pack_byte_string(buf, sizeof(buf), "sddd", in tpm1_nv_define_space() 173 if (pack_byte_string(buf, sizeof(buf), "sdd", in tpm1_nv_read_value() 210 if (pack_byte_string(buf, sizeof(buf), "sddds", in tpm1_nv_write_value() 238 if (pack_byte_string(buf, sizeof(buf), "sds", in tpm1_extend() 270 if (pack_byte_string(buf, sizeof(buf), "sd", in tpm1_pcr_read() 292 if (pack_byte_string(buf, sizeof(buf), "sw", in tpm1_tsc_physical_presence() 375 if (pack_byte_string(buf, sizeof(buf), "sb", in tpm1_physical_set_deactivated() 403 if (pack_byte_string(buf, sizeof(buf), "sdd", in tpm1_get_capability() 477 if (pack_byte_string(buf, sizeof(buf), "sd", in tpm1_get_permissions() [all …]
|
| A D | md5.c | 46 t = (__u32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | in byteReverse() 47 ((unsigned) buf[1] << 8 | buf[0]); in byteReverse() 49 buf += 4; in byteReverse() 100 buf += t; in MD5Update() 109 buf += 64; in MD5Update() 186 a = buf[0]; in MD5Transform() 187 b = buf[1]; in MD5Transform() 188 c = buf[2]; in MD5Transform() 189 d = buf[3]; in MD5Transform() 259 buf[0] += a; in MD5Transform() [all …]
|
| /lib/lwip/lwip/src/include/lwip/ |
| A D | netbuf.h | 90 #define netbuf_copy(buf,dataptr,len) netbuf_copy_partial(buf, dataptr, len, 0) argument 91 #define netbuf_take(buf, dataptr, len) pbuf_take((buf)->p, dataptr, len) argument 92 #define netbuf_len(buf) ((buf)->p->tot_len) argument 93 #define netbuf_fromaddr(buf) (&((buf)->addr)) argument 94 #define netbuf_set_fromaddr(buf, fromaddr) ip_addr_set(&((buf)->addr), fromaddr) argument 95 #define netbuf_fromport(buf) ((buf)->port) argument 97 #define netbuf_destaddr(buf) (&((buf)->toaddr)) argument 98 #define netbuf_set_destaddr(buf, destaddr) ip_addr_set(&((buf)->toaddr), destaddr) argument 100 #define netbuf_destport(buf) (((buf)->flags & NETBUF_FLAG_DESTADDR) ? (buf)->toport_chksum … argument 102 #define netbuf_destport(buf) ((buf)->toport_chksum) argument [all …]
|
| /lib/mbedtls/external/mbedtls/library/ |
| A D | x509write_crt.c | 166 unsigned char *c = buf + sizeof(buf); in mbedtls_x509write_crt_set_basic_constraints() 169 memset(buf, 0, sizeof(buf)); in mbedtls_x509write_crt_set_basic_constraints() 201 unsigned char *c = buf + sizeof(buf); in mbedtls_x509write_crt_set_key_identifier() 208 memset(buf, 0, sizeof(buf)); in mbedtls_x509write_crt_set_key_identifier() 219 buf + sizeof(buf) - len, in mbedtls_x509write_crt_set_key_identifier() 221 buf + sizeof(buf) - 20, in mbedtls_x509write_crt_set_key_identifier() 229 buf + sizeof(buf) - len, len, in mbedtls_x509write_crt_set_key_identifier() 230 buf + sizeof(buf) - 20); in mbedtls_x509write_crt_set_key_identifier() 236 c = buf + sizeof(buf) - 20; in mbedtls_x509write_crt_set_key_identifier() 326 unsigned char *c = buf + sizeof(buf); in mbedtls_x509write_crt_set_ext_key_usage() [all …]
|
| A D | x509write_csr.c | 85 unsigned char buf[4] = { 0 }; in mbedtls_x509write_csr_set_key_usage() local 89 c = buf + 4; in mbedtls_x509write_csr_set_key_usage() 109 unsigned char buf[4] = { 0 }; in mbedtls_x509write_csr_set_ns_cert_type() local 113 c = buf + 4; in mbedtls_x509write_csr_set_ns_cert_type() 151 c = buf + size; in x509write_csr_der_internal() 184 &c, buf, in x509write_csr_der_internal() 188 buf, (size_t) (c - buf))); in x509write_csr_der_internal() 251 memmove(buf, c, len); in x509write_csr_der_internal() 258 c2 = buf + size; in x509write_csr_der_internal() 268 memmove(c2, buf, len); in x509write_csr_der_internal() [all …]
|
| A D | pkwrite.c | 97 if (psa_export_public_key(pk->priv_id, buf, sizeof(buf), &len) != PSA_SUCCESS) { in pk_write_ec_pubkey() 102 memcpy(buf, pk->pub_raw, len); in pk_write_ec_pubkey() 110 memcpy(*p, buf, len); in pk_write_ec_pubkey() 125 if (psa_export_public_key(pk->priv_id, buf, sizeof(buf), &len) != PSA_SUCCESS) { in pk_write_ec_pubkey() 129 memcpy(*p, buf, len); in pk_write_ec_pubkey() 136 &len, buf, sizeof(buf))) != 0) { in pk_write_ec_pubkey() 146 memcpy(*p, buf, len); in pk_write_ec_pubkey() 309 if (*p - buf < 1) { in pk_write_ec_der() 450 c = buf + size; in mbedtls_pk_write_pubkey_der() 454 if (c - buf < 1) { in mbedtls_pk_write_pubkey_der() [all …]
|
| A D | entropy.c | 237 mbedtls_platform_zeroize(buf, sizeof(buf)); in entropy_gather_internal() 354 buf, MBEDTLS_ENTROPY_BLOCK_SIZE, buf)) != 0) { in mbedtls_entropy_func() 362 memcpy(output, buf, len); in mbedtls_entropy_func() 367 mbedtls_platform_zeroize(buf, sizeof(buf)); in mbedtls_entropy_func() 429 mbedtls_platform_zeroize(buf, sizeof(buf)); in mbedtls_entropy_write_seed_file() 468 mbedtls_platform_zeroize(buf, sizeof(buf)); in mbedtls_entropy_update_seed_file() 528 set &= buf[i]; in mbedtls_entropy_source_self_test_check_bits() 529 unset |= buf[i]; in mbedtls_entropy_source_self_test_check_bits() 624 if ((ret = mbedtls_entropy_update_manual(&ctx, buf, sizeof(buf))) != 0) { in mbedtls_entropy_self_test() 637 if ((ret = mbedtls_entropy_func(&ctx, buf, sizeof(buf))) != 0) { in mbedtls_entropy_self_test() [all …]
|
| A D | ssl_tls13_client.c | 446 (void) buf; in ssl_tls13_parse_hrr_key_share_ext() 987 MBEDTLS_PUT_UINT16_BE(p - buf - 4 + l_binders_len, buf, 2); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext() 988 MBEDTLS_PUT_UINT16_BE(p - buf - 6, buf, 4); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext() 993 MBEDTLS_SSL_DEBUG_BUF(3, "pre_shared_key identities", buf, p - buf); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext() 1045 MBEDTLS_PUT_UINT16_BE(p - buf - 2, buf, 0); in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext() 1047 MBEDTLS_SSL_DEBUG_BUF(3, "pre_shared_key binders", buf, p - buf); in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext() 1477 buf, (size_t) (end - buf))); in ssl_tls13_preprocess_server_hello() 1567 *buf = p; in ssl_tls13_check_server_hello_session_id_echo() 2003 ret = ssl_tls13_preprocess_server_hello(ssl, buf, buf + buf_len); in ssl_tls13_process_server_hello() 2530 ssl, buf, buf + buf_len)); in ssl_tls13_process_certificate_request() [all …]
|
| A D | pem.c | 171 des_iv, buf, buf); in pem_des_decrypt() 201 des3_iv, buf, buf); in pem_des3_decrypt() 233 aes_iv, buf, buf); in pem_aes_decrypt() 274 unsigned char *buf; in mbedtls_pem_read_buffer() local 424 mbedtls_zeroize_and_free(buf, len); in mbedtls_pem_read_buffer() 431 mbedtls_zeroize_and_free(buf, len); in mbedtls_pem_read_buffer() 471 mbedtls_zeroize_and_free(buf, len); in mbedtls_pem_read_buffer() 476 ctx->buf = buf; in mbedtls_pem_read_buffer() 484 if (ctx->buf != NULL) { in mbedtls_pem_free() 538 *olen = (size_t) (p - buf); in mbedtls_pem_write_buffer() [all …]
|
| A D | ecdh.c | 318 buf += grp_len; in ecdh_make_params_internal() 386 const unsigned char **buf, in mbedtls_ecdh_read_params() argument 391 if ((ret = mbedtls_ecp_tls_read_group_id(&grp_id, buf, (size_t) (end - *buf))) in mbedtls_ecdh_read_params() 401 return ecdh_read_params_internal(ctx, buf, end); in mbedtls_ecdh_read_params() 407 buf, end); in mbedtls_ecdh_read_params() 411 buf, end); in mbedtls_ecdh_read_params() 531 buf, blen); in ecdh_make_public_internal() 572 const unsigned char *p = buf; in ecdh_read_public_internal() 579 if ((size_t) (p - buf) != blen) { in ecdh_read_public_internal() 593 return ecdh_read_public_internal(ctx, buf, blen); in mbedtls_ecdh_read_public() [all …]
|
| /lib/mbedtls/external/mbedtls/programs/test/ |
| A D | benchmark.c | 624 memset(buf, 0xAA, sizeof(buf)); in main() 707 memset(buf, 0, sizeof(buf)); in main() 729 memset(buf, 0, sizeof(buf)); in main() 749 memset(buf, 0, sizeof(buf)); in main() 767 memset(buf, 0, sizeof(buf)); in main() 789 memset(buf, 0, sizeof(buf)); in main() 811 memset(buf, 0, sizeof(buf)); in main() 870 memset(buf, 0, sizeof(buf)); in main() 906 memset(buf, 0, sizeof(buf)); in main() 959 TIME_AND_TSC("ChaCha20", mbedtls_chacha20_crypt(buf, buf, 0U, BUFSIZE, buf, buf)); in main() [all …]
|
| A D | udp_proxy.c | 228 char *buf; in get_options() local 388 (unsigned) buf->len, buf->num_datagrams, in ctx_buffer_flush() 391 ret = mbedtls_net_send(buf->ctx, buf->data, buf->len); in ctx_buffer_flush() 430 if (sizeof(buf->data) - buf->len < len) { in ctx_buffer_append() 437 memcpy(buf->data + buf->len, data, len); in ctx_buffer_append() 439 buf->len += len; in ctx_buffer_append() 548 memcpy(buf, p->buf, p->len); in send_packet() 551 buf[11] ^= 1; in send_packet() 564 memcpy(buf, p->buf, p->len); in send_packet() 569 ++buf[13]; in send_packet() [all …]
|
| /lib/zlib/ |
| A D | adler32.c | 15 #define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} argument 16 #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); argument 17 #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); argument 18 #define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); argument 19 #define DO16(buf) DO8(buf,0); DO8(buf,8); argument 68 adler += buf[0]; in adler32() 78 if (buf == Z_NULL) in adler32() 84 adler += *buf++; in adler32() 99 buf += 16; in adler32() 109 DO16(buf); in adler32() [all …]
|
| /lib/mbedtls/external/mbedtls/3rdparty/everest/library/ |
| A D | x25519.c | 60 unsigned char *buf, size_t blen, in mbedtls_x25519_make_params() argument 75 *buf++ = MBEDTLS_ECP_TLS_NAMED_CURVE; in mbedtls_x25519_make_params() 76 *buf++ = MBEDTLS_ECP_TLS_CURVE25519 >> 8; in mbedtls_x25519_make_params() 77 *buf++ = MBEDTLS_ECP_TLS_CURVE25519 & 0xFF; in mbedtls_x25519_make_params() 78 *buf++ = MBEDTLS_X25519_KEY_SIZE_BYTES; in mbedtls_x25519_make_params() 93 if( end - *buf < MBEDTLS_X25519_KEY_SIZE_BYTES + 1 ) in mbedtls_x25519_read_params() 96 if( ( *(*buf)++ != MBEDTLS_X25519_KEY_SIZE_BYTES ) ) in mbedtls_x25519_read_params() 100 *buf += MBEDTLS_X25519_KEY_SIZE_BYTES; in mbedtls_x25519_read_params() 120 unsigned char *buf, size_t blen, in mbedtls_x25519_calc_secret() argument 162 *buf++ = MBEDTLS_X25519_KEY_SIZE_BYTES; in mbedtls_x25519_make_public() [all …]
|
| /lib/mbedtls/external/mbedtls/programs/pkey/ |
| A D | dh_client.c | 66 unsigned char buf[2048]; in main() local 139 memset(buf, 0, sizeof(buf)); in main() 146 n = buflen = (buf[0] << 8) | buf[1]; in main() 155 memset(buf, 0, sizeof(buf)); in main() 162 p = buf, end = buf + buflen; in main() 195 if ((ret = mbedtls_sha256(buf, (int) (p - 2 - buf), hash, 0)) != 0) { in main() 230 if ((ret = mbedtls_dhm_calc_secret(&dhm, buf, sizeof(buf), &n, in main() 237 mbedtls_printf("%02x", buf[n]); in main() 256 memset(buf, 0, sizeof(buf)); in main() 263 ret = mbedtls_aes_crypt_ecb(&aes, MBEDTLS_AES_DECRYPT, buf, buf); in main() [all …]
|
| A D | dh_server.c | 58 unsigned char buf[2048]; in main() local 177 memset(buf, 0, sizeof(buf)); in main() 196 if ((ret = mbedtls_sha256(buf, n, hash, 0)) != 0) { in main() 202 buf[n] = (unsigned char) (rsa_key_len >> 8); in main() 203 buf[n + 1] = (unsigned char) (rsa_key_len); in main() 228 memset(buf, 0, sizeof(buf)); in main() 247 if ((ret = mbedtls_dhm_calc_secret(&dhm, buf, sizeof(buf), &n, in main() 254 mbedtls_printf("%02x", buf[n]); in main() 268 ret = mbedtls_aes_setkey_enc(&aes, buf, 256); in main() 272 memcpy(buf, PLAINTEXT, 16); in main() [all …]
|
| /lib/efi_selftest/ |
| A D | efi_selftest_console.c | 28 u16 *pos = *buf; in mac() 43 *buf = pos; in mac() 58 u16 *pos = *buf; in printx() 70 *buf = pos; in printx() 105 u16 *pos = *buf; in uint2dec() 129 if (pos == *buf) in uint2dec() 132 *buf = pos; in uint2dec() 155 *buf = pos; in int2dec() 168 u16 buf[160]; in efi_st_printc() local 170 u16 *pos = buf; in efi_st_printc() [all …]
|
| /lib/mbedtls/external/mbedtls/programs/x509/ |
| A D | cert_write.c | 329 memset(buf, 0, sizeof(buf)); in main() 682 mbedtls_strerror(ret, buf, sizeof(buf)); in main() 720 mbedtls_strerror(ret, buf, sizeof(buf)); in main() 729 mbedtls_strerror(ret, buf, sizeof(buf)); in main() 751 mbedtls_strerror(ret, buf, sizeof(buf)); in main() 798 mbedtls_strerror(ret, buf, sizeof(buf)); in main() 829 mbedtls_strerror(ret, buf, sizeof(buf)); in main() 836 mbedtls_strerror(ret, buf, sizeof(buf)); in main() 850 mbedtls_strerror(ret, buf, sizeof(buf)); in main() 858 mbedtls_strerror(ret, buf, sizeof(buf)); in main() [all …]
|
| /lib/efi_loader/ |
| A D | efi_var_file.c | 64 struct efi_var_file *buf; in efi_var_to_file() local 92 free(buf); in efi_var_to_file() 105 if (buf->reserved || buf->magic != EFI_VAR_FILE_MAGIC || in efi_var_restore() 106 buf->crc32 != crc32(0, (u8 *)buf->var, in efi_var_restore() 112 last_var = (struct efi_var_entry *)((u8 *)buf + buf->length); in efi_var_restore() 113 for (var = buf->var; var < last_var; in efi_var_restore() 159 struct efi_var_file *buf; in efi_var_from_file() local 164 buf = calloc(1, EFI_VAR_BUF_SIZE); in efi_var_from_file() 165 if (!buf) { in efi_var_from_file() 179 if (buf->length != len || efi_var_restore(buf, false) != EFI_SUCCESS) in efi_var_from_file() [all …]
|
| /lib/mbedtls/external/mbedtls/programs/ssl/ |
| A D | ssl_mail_client.c | 153 unsigned char buf[1024]; in do_handshake() local 154 memset(buf, 0, 1024); in do_handshake() 199 mbedtls_x509_crt_info((char *) buf, sizeof(buf) - 1, " ", in do_handshake() 201 mbedtls_printf("%s\n", buf); in do_handshake() 211 mbedtls_printf("\n%s", buf); in write_ssl_data() 229 mbedtls_printf("\n%s", buf); in write_ssl_and_get_response() 282 mbedtls_printf("\n%s", buf); in write_and_get_response() 330 unsigned char buf[sizeof(base) + 2]; in main() local 332 unsigned char buf[1024]; in main() local 355 memset(&buf, 0, sizeof(buf)); in main() [all …]
|
| /lib/mbedtls/external/mbedtls/tests/suites/ |
| A D | test_suite_ssl_decrypt.function | 28 .buf = NULL, 69 rec.buf = buf; 70 memcpy(buf, rec_good.buf, rec.buf_len); 76 buf = NULL; 84 rec.buf = buf; 87 memcpy(buf, rec_good.buf, n); 91 buf = NULL; 108 rec.buf = NULL; 207 rec.buf = buf; 251 rec.buf = buf; [all …]
|
| /lib/lwip/lwip/test/unit/core/ |
| A D | test_def.c | 22 def_check_range_untouched(const char *buf, size_t len) in def_check_range_untouched() argument 27 fail_unless(buf[i] == (char)MAGIC_UNTOUCHED_BYTE); in def_check_range_untouched() 33 char buf[TEST_BUFSIZE]; in test_def_itoa() local 34 char *test_buf = &buf[GUARD_SIZE]; in test_def_itoa() 39 memset(buf, MAGIC_UNTOUCHED_BYTE, sizeof(buf)); in test_def_itoa() 41 def_check_range_untouched(buf, GUARD_SIZE); in test_def_itoa() 47 memset(buf, MAGIC_UNTOUCHED_BYTE, sizeof(buf)); in test_def_itoa() 49 def_check_range_untouched(buf, GUARD_SIZE); in test_def_itoa() 53 memset(buf, MAGIC_UNTOUCHED_BYTE, sizeof(buf)); in test_def_itoa() 55 def_check_range_untouched(buf, GUARD_SIZE); in test_def_itoa()
|