Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 830) sorted by relevance

12345678910>>...34

/hal_espressif-latest/components/wpa_supplicant/src/wps/
Dwps_attr_parse.c21 u8 id, u8 len, const u8 *pos) in wps_set_vendor_ext_wfa_subelem() argument
24 id, len); in wps_set_vendor_ext_wfa_subelem()
27 if (len != 1) { in wps_set_vendor_ext_wfa_subelem()
29 "%u", len); in wps_set_vendor_ext_wfa_subelem()
36 attr->authorized_macs_len = len; in wps_set_vendor_ext_wfa_subelem()
39 if (len != 1) { in wps_set_vendor_ext_wfa_subelem()
41 "Shareable length %u", len); in wps_set_vendor_ext_wfa_subelem()
47 if (len != 1) { in wps_set_vendor_ext_wfa_subelem()
49 "length %u", len); in wps_set_vendor_ext_wfa_subelem()
55 if (len != 1) { in wps_set_vendor_ext_wfa_subelem()
[all …]
/hal_espressif-latest/components/hal/
Decc_hal.c45 void ecc_hal_write_mul_param(const uint8_t *k, const uint8_t *px, const uint8_t *py, uint16_t len) in ecc_hal_write_mul_param() argument
47 ecc_curve_t curve = len == 32 ? ECC_CURVE_SECP256R1 : ECC_CURVE_SECP192R1; in ecc_hal_write_mul_param()
52 ecc_ll_write_param(ECC_PARAM_K, k, len); in ecc_hal_write_mul_param()
53 ecc_ll_write_param(ECC_PARAM_PX, px, len); in ecc_hal_write_mul_param()
54 ecc_ll_write_param(ECC_PARAM_PY, py, len); in ecc_hal_write_mul_param()
57 void ecc_hal_write_verify_param(const uint8_t *px, const uint8_t *py, uint16_t len) in ecc_hal_write_verify_param() argument
59 ecc_curve_t curve = len == 32 ? ECC_CURVE_SECP256R1 : ECC_CURVE_SECP192R1; in ecc_hal_write_verify_param()
64 ecc_ll_write_param(ECC_PARAM_PX, px, len); in ecc_hal_write_verify_param()
65 ecc_ll_write_param(ECC_PARAM_PY, py, len); in ecc_hal_write_verify_param()
68 int ecc_hal_read_mul_result(uint8_t *rx, uint8_t *ry, uint16_t len) in ecc_hal_read_mul_result() argument
[all …]
Decdsa_hal.c35 uint8_t *s_out, uint16_t len) in ecdsa_hal_gen_signature_inner() argument
43 ecdsa_ll_write_param(ECDSA_PARAM_Z, hash, len); in ecdsa_hal_gen_signature_inner()
51 ecdsa_ll_read_param(ECDSA_PARAM_R, r_out, len); in ecdsa_hal_gen_signature_inner()
52 ecdsa_ll_read_param(ECDSA_PARAM_S, s_out, len); in ecdsa_hal_gen_signature_inner()
63 uint8_t *s_out, uint16_t len) in ecdsa_hal_gen_signature_with_countermeasure() argument
77 …_gen_signature_inner(tmp_hash + ((6 * i) % 32), (uint8_t *) tmp_r_out, (uint8_t *) tmp_s_out, len); in ecdsa_hal_gen_signature_with_countermeasure()
81 ecdsa_hal_gen_signature_inner(hash, r_out, s_out, len); in ecdsa_hal_gen_signature_with_countermeasure()
85 …al_gen_signature_inner(tmp_hash + ((6 * i) % 32), (uint8_t *)tmp_r_out, (uint8_t *)tmp_s_out, len); in ecdsa_hal_gen_signature_with_countermeasure()
94 uint8_t *r_out, uint8_t *s_out, uint16_t len) in ecdsa_hal_gen_signature() argument
96 if (len != ECDSA_HAL_P192_COMPONENT_LEN && len != ECDSA_HAL_P256_COMPONENT_LEN) { in ecdsa_hal_gen_signature()
[all …]
/hal_espressif-latest/components/bt/porting/transport/driver/common/
Dhci_driver_h4.c47 uint16_t len; member
54 rxs->len = 0; in hci_h4_frame_start()
77 hci_h4_ib_consume(struct hci_h4_input_buffer *ib, uint16_t len) in hci_h4_ib_consume() argument
79 assert(ib->len >= len); in hci_h4_ib_consume()
81 ib->buf += len; in hci_h4_ib_consume()
82 ib->len -= len; in hci_h4_ib_consume()
84 return len; in hci_h4_ib_consume()
91 uint16_t len; in hci_h4_ib_pull_min_len() local
93 len = min(ib->len, rxs->min_len - rxs->len); in hci_h4_ib_pull_min_len()
94 memcpy(&rxs->hdr[rxs->len], ib->buf, len); in hci_h4_ib_pull_min_len()
[all …]
/hal_espressif-latest/components/wpa_supplicant/src/utils/
Dcommon.c82 int hexstr2bin(const char *hex, u8 *buf, size_t len) in hexstr2bin() argument
89 for (i = 0; i < len; i++) { in hexstr2bin()
109 void inc_byte_array(u8 *counter, size_t len) in inc_byte_array() argument
111 int pos = len - 1; in inc_byte_array()
121 void buf_shift_right(u8 *buf, size_t len, size_t bits) in buf_shift_right() argument
124 for (i = len - 1; i > 0; i--) in buf_shift_right()
147 void printf_encode(char *txt, size_t maxlen, const u8 *data, size_t len) in printf_encode() argument
152 for (i = 0; i < len; i++) { in printf_encode()
199 size_t len = 0; in printf_decode() local
203 if (len + 1 >= maxlen) in printf_decode()
[all …]
Dwpa_debug.c14 _wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len, in _wpa_snprintf_hex() argument
31 for (i = 0; i < len; i++) { in _wpa_snprintf_hex()
43 int wpa_snprintf_hex_uppercase(char *buf, size_t buf_size, const u8 *data, size_t len) in wpa_snprintf_hex_uppercase() argument
45 return _wpa_snprintf_hex(buf, buf_size, data, len, 1, 0); in wpa_snprintf_hex_uppercase()
48 int wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len) in wpa_snprintf_hex() argument
50 return _wpa_snprintf_hex(buf, buf_size, data, len, 0, 0); in wpa_snprintf_hex()
54 void wpa_dump_mem(char* desc, uint8_t *addr, uint16_t len) in wpa_dump_mem() argument
60 for (i = 0; i < len / 16; i++) { in wpa_dump_mem()
64 if (len % 16) { in wpa_dump_mem()
65 int bytes_printed = (len / 16) * 16; in wpa_dump_mem()
[all …]
Dbase64.c21 static char * base64_gen_encode(const unsigned char *src, size_t len, in base64_gen_encode() argument
29 if (len >= SIZE_MAX / 4) in base64_gen_encode()
31 olen = len * 4 / 3 + 4; /* 3-byte blocks to 4-byte */ in base64_gen_encode()
35 if (olen < len) in base64_gen_encode()
41 end = src + len; in base64_gen_encode()
84 static unsigned char * base64_gen_decode(const char *src, size_t len, in base64_gen_decode() argument
98 for (i = 0; i < len; i++) { in base64_gen_decode()
113 for (i = 0; i < len + extra_pad; i++) { in base64_gen_decode()
116 if (i >= len) in base64_gen_decode()
165 char * base64_encode(const void *src, size_t len, size_t *out_len) in base64_encode() argument
[all …]
Dwpabuf.c37 static void wpabuf_overflow(const struct wpabuf *buf, size_t len) in wpabuf_overflow() argument
48 (unsigned long) len); in wpabuf_overflow()
117 struct wpabuf * wpabuf_alloc(size_t len) in wpabuf_alloc() argument
121 sizeof(struct wpabuf) + len); in wpabuf_alloc()
128 struct wpabuf *buf = (struct wpabuf *)os_zalloc(sizeof(struct wpabuf) + len); in wpabuf_alloc()
133 buf->size = len; in wpabuf_alloc()
138 struct wpabuf * wpabuf_alloc_ext_data(u8 *data, size_t len) in wpabuf_alloc_ext_data() argument
154 buf->size = len; in wpabuf_alloc_ext_data()
155 buf->used = len; in wpabuf_alloc_ext_data()
163 struct wpabuf * wpabuf_alloc_copy(const void *data, size_t len) in wpabuf_alloc_copy() argument
[all …]
/hal_espressif-latest/components/wpa_supplicant/src/tls/
Dasn1.c17 .len = 6
22 .len = 9
27 .len = 6
32 .len = 7
37 .len = 5
42 .len = 5
47 .len = 10
52 .len = 10
57 .len = 10
62 .len = 9
[all …]
/hal_espressif-latest/components/bt/porting/ext/tinycrypt/src/
Dctr_prng.c53 static void arrInc(uint8_t arr[], unsigned int len) in arrInc() argument
57 for (i = len; i > 0U; i--) { in arrInc()
79 unsigned int len = 0U; in tc_ctr_prng_update() local
82 while (len < sizeof temp) { in tc_ctr_prng_update()
83 unsigned int blocklen = sizeof(temp) - len; in tc_ctr_prng_update()
96 memcpy(&(temp[len]), output_block, blocklen); in tc_ctr_prng_update()
98 len += blocklen; in tc_ctr_prng_update()
131 unsigned int len = pLen; in tc_ctr_prng_init() local
132 if (len > sizeof personalization_buf) { in tc_ctr_prng_init()
133 len = sizeof personalization_buf; in tc_ctr_prng_init()
[all …]
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_common/tinycrypt/src/
Dctr_prng.c53 static void arrInc(uint8_t arr[], unsigned int len) in arrInc() argument
57 for (i = len; i > 0U; i--) { in arrInc()
79 unsigned int len = 0U; in tc_ctr_prng_update() local
82 while (len < sizeof temp) { in tc_ctr_prng_update()
83 unsigned int blocklen = sizeof(temp) - len; in tc_ctr_prng_update()
96 memcpy(&(temp[len]), output_block, blocklen); in tc_ctr_prng_update()
98 len += blocklen; in tc_ctr_prng_update()
131 unsigned int len = pLen; in tc_ctr_prng_init() local
132 if (len > sizeof personalization_buf) { in tc_ctr_prng_init()
133 len = sizeof personalization_buf; in tc_ctr_prng_init()
[all …]
/hal_espressif-latest/components/esp_hw_support/include/
Desp_crc.h25 static inline uint32_t esp_crc32_le(uint32_t crc, uint8_t const *buf, uint32_t len) in esp_crc32_le() argument
27 return esp_rom_crc32_le(crc, buf, len); in esp_crc32_le()
38 static inline uint32_t esp_crc32_be(uint32_t crc, uint8_t const *buf, uint32_t len) in esp_crc32_be() argument
40 return esp_rom_crc32_be(crc, buf, len); in esp_crc32_be()
51 static inline uint16_t esp_crc16_le(uint16_t crc, uint8_t const *buf, uint32_t len) in esp_crc16_le() argument
53 return esp_rom_crc16_le(crc, buf, len); in esp_crc16_le()
64 static inline uint16_t esp_crc16_be(uint16_t crc, uint8_t const *buf, uint32_t len) in esp_crc16_be() argument
66 return esp_rom_crc16_be(crc, buf, len); in esp_crc16_be()
77 static inline uint8_t esp_crc8_le(uint8_t crc, uint8_t const *buf, uint32_t len) in esp_crc8_le() argument
79 return esp_rom_crc8_le(crc, buf, len); in esp_crc8_le()
[all …]
/hal_espressif-latest/components/bt/host/bluedroid/stack/avrc/
Davrc_bld_tg.c46 UINT16 len = 0; in avrc_bld_get_capability_rsp() local
63 BE_STREAM_TO_UINT16(len, p_data); in avrc_bld_get_capability_rsp()
67 if (len == 0) { in avrc_bld_get_capability_rsp()
70 len = 2; /* move past the capability_id and count */ in avrc_bld_get_capability_rsp()
72 p_data = p_start + p_pkt->len; in avrc_bld_get_capability_rsp()
81 len += p_rsp->count * 3; in avrc_bld_get_capability_rsp()
91 len += (*p_count); in avrc_bld_get_capability_rsp()
93 UINT16_TO_BE_STREAM(p_len, len); in avrc_bld_get_capability_rsp()
94 p_pkt->len = (p_data - p_start); in avrc_bld_get_capability_rsp()
114 UINT16 len = 0; in avrc_bld_list_app_settings_attr_rsp() local
[all …]
/hal_espressif-latest/components/wpa_supplicant/src/crypto/
Dcrypto_internal.c143 void crypto_hash_update(struct crypto_hash *ctx, const u8 *data, size_t len) in crypto_hash_update() argument
151 MD5Update(&ctx->u.md5, data, len); in crypto_hash_update()
155 SHA1Update(&ctx->u.sha1, data, len); in crypto_hash_update()
160 sha256_process(&ctx->u.sha256, data, len); in crypto_hash_update()
165 sha384_process(&ctx->u.sha384, data, len); in crypto_hash_update()
170 sha512_process(&ctx->u.sha512, data, len); in crypto_hash_update()
179 int crypto_hash_finish(struct crypto_hash *ctx, u8 *mac, size_t *len) in crypto_hash_finish() argument
187 if (mac == NULL || len == NULL) { in crypto_hash_finish()
194 if (*len < 16) { in crypto_hash_finish()
195 *len = 16; in crypto_hash_finish()
[all …]
/hal_espressif-latest/components/wpa_supplicant/src/eap_peer/
Deap_fast_common.c19 void eap_fast_put_tlv_hdr(struct wpabuf *buf, u16 type, u16 len) in eap_fast_put_tlv_hdr() argument
23 hdr.len = host_to_be16(len); in eap_fast_put_tlv_hdr()
29 u16 len) in eap_fast_put_tlv() argument
31 eap_fast_put_tlv_hdr(buf, type, len); in eap_fast_put_tlv()
32 wpabuf_put_data(buf, data, len); in eap_fast_put_tlv()
96 u8 * eap_fast_derive_key(void *ssl_ctx, struct tls_connection *conn, size_t len) in eap_fast_derive_key() argument
100 out = os_malloc(len); in eap_fast_derive_key()
104 if (tls_connection_get_eap_fast_key(ssl_ctx, conn, out, len)) { in eap_fast_derive_key()
149 int tlv_type, u8 *pos, size_t len) in eap_fast_parse_tlv() argument
154 pos, len); in eap_fast_parse_tlv()
[all …]
Deap_peap_common.c28 size_t len[5]; in peap_prfplus() local
31 len[0] = 0; in peap_prfplus()
33 len[1] = label_len; in peap_prfplus()
35 len[2] = seed_len; in peap_prfplus()
50 len[3] = 1; in peap_prfplus()
52 len[4] = 2; in peap_prfplus()
66 len[3] = 1; in peap_prfplus()
68 len[4] = 1; in peap_prfplus()
75 if (hmac_sha1_vector(key, key_len, 5, addr, len, hash) < 0) in peap_prfplus()
84 len[0] = SHA1_MAC_LEN; in peap_prfplus()
/hal_espressif-latest/components/bt/host/bluedroid/stack/gatt/
Datt_protocol.c59 p_buf->len = GATT_HDR_SIZE; /* opcode + 2 bytes mtu */ in attp_build_mtu_cmd()
81 p_buf->len = GATT_OP_CODE_SIZE; in attp_build_exec_write_cmd()
88 p_buf->len += 1; in attp_build_exec_write_cmd()
120 p_buf->len = GATT_HDR_SIZE + 1 + 1; in attp_build_err_cmd()
138 const UINT8 payload_size = 1 + 2 + 2 + ((uuid.len == LEN_UUID_16) ? LEN_UUID_16 : LEN_UUID_128); in attp_build_browse_cmd()
144 p_buf->len = GATT_OP_CODE_SIZE + 4; in attp_build_browse_cmd()
149 p_buf->len += gatt_build_uuid_to_stream(&p, uuid); in attp_build_browse_cmd()
167 UINT16 len = p_value_type->value_len; in attp_build_read_by_type_value_cmd() local
173 p_buf->len = 5; /* opcode + s_handle + e_handle */ in attp_build_read_by_type_value_cmd()
179 p_buf->len += gatt_build_uuid_to_stream(&p, p_value_type->uuid); in attp_build_read_by_type_value_cmd()
[all …]
Dgatt_cl.c94 cl_req.browse.uuid.len = 2; in gatt_act_discovery()
99 cl_req.find_type_value.uuid.len = 2; in gatt_act_discovery()
103 cl_req.find_type_value.value_len = p_clcb->uuid.len; in gatt_act_discovery()
105 if (p_clcb->uuid.len == LEN_UUID_32) { in gatt_act_discovery()
109 memcpy (cl_req.find_type_value.value, &p_clcb->uuid.uu, p_clcb->uuid.len); in gatt_act_discovery()
154 msg.browse.uuid.len = LEN_UUID_16; in gatt_act_read()
241 p_attr->len, in gatt_act_write()
247 if (p_attr->len <= (p_tcb->payload_size - GATT_HDR_SIZE)) { in gatt_act_write()
254 p_attr->len, in gatt_act_write()
323 p_rsp_value->len != p_clcb->counter || in gatt_check_write_long_terminate()
[all …]
Dgatt_sr.c47 tGATT_STATUS gatt_send_packet (tGATT_TCB *p_tcb, UINT8 *p_data, UINT16 len) in gatt_send_packet() argument
54 if (len > p_tcb->payload_size){ in gatt_send_packet()
64 p_msg->len = len; in gatt_send_packet()
66 memcpy(p_m, p_data, len); in gatt_send_packet()
163 UINT16 ii, total_len, len; in process_read_multi_rsp() local
190 len = sizeof(BT_HDR) + L2CAP_MIN_OFFSET + mtu; in process_read_multi_rsp()
191 if ((p_buf = (BT_HDR *)osi_calloc(len)) == NULL) { in process_read_multi_rsp()
201 p_buf->len = 1; in process_read_multi_rsp()
224 total_len = (p_buf->len + p_rsp->attr_value.len); in process_read_multi_rsp()
228 len = p_rsp->attr_value.len - (total_len - mtu); in process_read_multi_rsp()
[all …]
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_models/client/
Dlighting_client.c178 size_t len = 0U; in light_status() local
180 BT_DBG("len %d, bytes %s", buf->len, bt_hex(buf->data, buf->len)); in light_status()
185 if (buf->len != 2 && buf->len != 5) { in light_status()
186 BT_ERR("Invalid Light Lightness Status length %d", buf->len); in light_status()
195 if (buf->len) { in light_status()
201 len = sizeof(struct bt_mesh_light_lightness_status); in light_status()
206 if (buf->len != 2 && buf->len != 5) { in light_status()
207 BT_ERR("Invalid Light Lightness Linear Status length %d", buf->len); in light_status()
216 if (buf->len) { in light_status()
222 len = sizeof(struct bt_mesh_light_lightness_linear_status); in light_status()
[all …]
/hal_espressif-latest/components/bt/host/nimble/esp-hci/src/
Desp_nimble_hci.c66 void esp_vhci_host_send_packet_wrapper(uint8_t *data, uint16_t len) in esp_vhci_host_send_packet_wrapper() argument
69 bt_hci_log_record_hci_data(data[0], &data[1], len - 1); in esp_vhci_host_send_packet_wrapper()
71 esp_vhci_host_send_packet(data, len); in esp_vhci_host_send_packet_wrapper()
76 uint16_t len; in ble_hci_trans_hs_cmd_tx() local
81 len = BLE_HCI_CMD_HDR_LEN + cmd[3] + 1; in ble_hci_trans_hs_cmd_tx()
87 esp_vhci_host_send_packet_wrapper(cmd, len); in ble_hci_trans_hs_cmd_tx()
106 uint16_t len = 0; in ble_hci_trans_hs_acl_tx() local
114 len++; in ble_hci_trans_hs_acl_tx()
121 len += OS_MBUF_PKTLEN(om); in ble_hci_trans_hs_acl_tx()
124 esp_vhci_host_send_packet_wrapper(data, len); in ble_hci_trans_hs_acl_tx()
[all …]
/hal_espressif-latest/components/esp_rom/linux/
Desp_rom_crc.c166 uint32_t esp_rom_crc32_le(uint32_t crc, uint8_t const * buf,uint32_t len) in esp_rom_crc32_le() argument
170 for(i=0;i<len;i++){ in esp_rom_crc32_le()
176 uint32_t esp_rom_crc32_be(uint32_t crc, uint8_t const * buf,uint32_t len) in esp_rom_crc32_be() argument
180 for(i=0;i<len;i++){ in esp_rom_crc32_be()
186 uint16_t esp_rom_crc16_le(uint16_t crc, uint8_t const * buf, uint32_t len) in esp_rom_crc16_le() argument
190 for(i = 0; i < len; i++) in esp_rom_crc16_le()
197 uint16_t esp_rom_crc16_be(uint16_t crc, uint8_t const * buf,uint32_t len) in esp_rom_crc16_be() argument
201 for(i=0;i<len;i++){ in esp_rom_crc16_be()
207 uint8_t esp_rom_crc8_le(uint8_t crc, uint8_t const * buf, uint32_t len) in esp_rom_crc8_le() argument
211 for(i = 0; i < len; i++) in esp_rom_crc8_le()
[all …]
/hal_espressif-latest/components/esp_rom/patches/
Desp_rom_crc.c92 uint8_t esp_rom_crc8_be(uint8_t crc, uint8_t const *buf, uint32_t len) in esp_rom_crc8_be() argument
96 for (i = 0; i < len; i++) { in esp_rom_crc8_be()
102 uint16_t esp_rom_crc16_be(uint16_t crc, uint8_t const *buf, uint32_t len) in esp_rom_crc16_be() argument
106 for (i = 0; i < len; i++) { in esp_rom_crc16_be()
112 uint32_t esp_rom_crc32_be(uint32_t crc, uint8_t const *buf, uint32_t len) in esp_rom_crc32_be() argument
116 for (i = 0; i < len; i++) { in esp_rom_crc32_be()
200 uint8_t esp_rom_crc8_le(uint8_t crc, uint8_t const *buf, uint32_t len) in esp_rom_crc8_le() argument
204 for (i = 0; i < len; i++) { in esp_rom_crc8_le()
210 uint16_t esp_rom_crc16_le(uint16_t crc, uint8_t const *buf, uint32_t len) in esp_rom_crc16_le() argument
214 for (i = 0; i < len; i++) { in esp_rom_crc16_le()
[all …]
/hal_espressif-latest/components/bt/host/bluedroid/hci/
Dpacket_fragmenter.c91 …if((packet->len > max_packet_size) && (packet->layer_specific == 0) && (event == MSG_STACK_TO_HC_H… in fragment_and_dispatch()
98 remaining_length = packet->len; in fragment_and_dispatch()
104 packet->len = max_packet_size; in fragment_and_dispatch()
108 packet->len = remaining_length; in fragment_and_dispatch()
150 assert(acl_length == packet->len - HCI_ACL_PREAMBLE_SIZE); in reassemble_and_dispatch()
165 if (full_length <= packet->len) { in reassemble_and_dispatch()
166 if (full_length < packet->len) { in reassemble_and_dispatch()
167 …s found l2cap full length %d less than the hci length %d.\n", __func__, l2cap_length, packet->len); in reassemble_and_dispatch()
181 partial_packet->len = full_length; in reassemble_and_dispatch()
182 partial_packet->offset = packet->len; in reassemble_and_dispatch()
[all …]
/hal_espressif-latest/tools/esptool_py/flasher_stub/
Dstub_commands.c16 static esp_rom_spiflash_result_t SPIRead4B(int spi_num, uint32_t flash_addr, uint8_t* buf, int len) in SPIRead4B() argument
21 while (len > 0) { in SPIRead4B()
23 if (len > 16 ) { //16 = read_sub_len in SPIRead4B()
26 rd_length = len; in SPIRead4B()
37 len -= rd_length; in SPIRead4B()
45 int handle_flash_erase(uint32_t addr, uint32_t len) { in handle_flash_erase() argument
47 if (len % FLASH_SECTOR_SIZE != 0) return 0x33; in handle_flash_erase()
50 while (len > 0 && (addr % FLASH_BLOCK_SIZE != 0)) { in handle_flash_erase()
60 len -= FLASH_SECTOR_SIZE; in handle_flash_erase()
64 while (len > FLASH_BLOCK_SIZE) { in handle_flash_erase()
[all …]

12345678910>>...34