Home
last modified time | relevance | path

Searched refs:pos (Results 1 – 25 of 161) sorted by relevance

1234567

/hal_espressif-3.5.0/components/wpa_supplicant/src/rsn_supp/
Dwpa_ie.c50 u8 *pos; in wpa_gen_wpa_ie_wpa() local
61 pos = (u8 *) (hdr + 1); in wpa_gen_wpa_ie_wpa()
64 RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_CCMP); in wpa_gen_wpa_ie_wpa()
66 RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_TKIP); in wpa_gen_wpa_ie_wpa()
68 RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_WEP104); in wpa_gen_wpa_ie_wpa()
70 RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_WEP40); in wpa_gen_wpa_ie_wpa()
76 pos += WPA_SELECTOR_LEN; in wpa_gen_wpa_ie_wpa()
78 *pos++ = 1; in wpa_gen_wpa_ie_wpa()
79 *pos++ = 0; in wpa_gen_wpa_ie_wpa()
81 RSN_SELECTOR_PUT(pos, WPA_CIPHER_SUITE_CCMP); in wpa_gen_wpa_ie_wpa()
[all …]
Dpmksa_cache.c109 struct rsn_pmksa_cache_entry *entry, *pos, *prev; in pmksa_cache_add() local
141 pos = pmksa->pmksa; in pmksa_cache_add()
143 while (pos) { in pmksa_cache_add()
144 if (os_memcmp(aa, pos->aa, ETH_ALEN) == 0) { in pmksa_cache_add()
145 if (pos->pmk_len == pmk_len && in pmksa_cache_add()
146 os_memcmp_const(pos->pmk, pmk, pmk_len) == 0 && in pmksa_cache_add()
147 os_memcmp_const(pos->pmkid, entry->pmkid, in pmksa_cache_add()
152 return pos; in pmksa_cache_add()
155 pmksa->pmksa = pos->next; in pmksa_cache_add()
157 prev->next = pos->next; in pmksa_cache_add()
[all …]
/hal_espressif-3.5.0/components/wpa_supplicant/src/ap/
Dwpa_auth_ie.c27 u8 *pos, *count; in wpa_write_wpa_ie() local
34 pos = (u8 *) (hdr + 1); in wpa_write_wpa_ie()
42 RSN_SELECTOR_PUT(pos, suite); in wpa_write_wpa_ie()
43 pos += WPA_SELECTOR_LEN; in wpa_write_wpa_ie()
45 count = pos; in wpa_write_wpa_ie()
46 pos += 2; in wpa_write_wpa_ie()
48 num_suites = wpa_cipher_put_suites(pos, conf->wpa_pairwise); in wpa_write_wpa_ie()
54 pos += num_suites * WPA_SELECTOR_LEN; in wpa_write_wpa_ie()
58 count = pos; in wpa_write_wpa_ie()
59 pos += 2; in wpa_write_wpa_ie()
[all …]
/hal_espressif-3.5.0/components/wpa_supplicant/src/tls/
Dtlsv1_server_write.c46 u8 *pos, *rhdr, *hs_start, *hs_length; in tls_write_server_hello() local
50 pos = *msgpos; in tls_write_server_hello()
53 rhdr = pos; in tls_write_server_hello()
54 pos += TLS_RECORD_HEADER_LEN; in tls_write_server_hello()
78 hs_start = pos; in tls_write_server_hello()
80 *pos++ = TLS_HANDSHAKE_TYPE_SERVER_HELLO; in tls_write_server_hello()
82 hs_length = pos; in tls_write_server_hello()
83 pos += 3; in tls_write_server_hello()
86 WPA_PUT_BE16(pos, conn->rl.tls_version); in tls_write_server_hello()
87 pos += 2; in tls_write_server_hello()
[all …]
Dtlsv1_client_write.c48 u8 *hello, *end, *pos, *hs_length, *hs_start, *rhdr; in tls_send_client_hello() local
73 pos = rhdr + TLS_RECORD_HEADER_LEN; in tls_send_client_hello()
78 hs_start = pos; in tls_send_client_hello()
80 *pos++ = TLS_HANDSHAKE_TYPE_CLIENT_HELLO; in tls_send_client_hello()
82 hs_length = pos; in tls_send_client_hello()
83 pos += 3; in tls_send_client_hello()
86 WPA_PUT_BE16(pos, TLS_VERSION); in tls_send_client_hello()
87 pos += 2; in tls_send_client_hello()
89 os_memcpy(pos, conn->client_random, TLS_RANDOM_LEN); in tls_send_client_hello()
90 pos += TLS_RANDOM_LEN; in tls_send_client_hello()
[all …]
Dpkcs1.c21 u8 *pos; in pkcs1_generate_encryption_block() local
42 pos = out; in pkcs1_generate_encryption_block()
43 *pos++ = 0x00; in pkcs1_generate_encryption_block()
44 *pos++ = block_type; /* BT */ in pkcs1_generate_encryption_block()
48 os_memset(pos, 0x00, ps_len); in pkcs1_generate_encryption_block()
49 pos += ps_len; in pkcs1_generate_encryption_block()
52 os_memset(pos, 0xff, ps_len); in pkcs1_generate_encryption_block()
53 pos += ps_len; in pkcs1_generate_encryption_block()
56 if (os_get_random(pos, ps_len) < 0) { in pkcs1_generate_encryption_block()
62 if (*pos == 0x00) in pkcs1_generate_encryption_block()
[all …]
Dtlsv1_client_read.c34 const u8 *pos, *end; in tls_process_server_hello() local
47 pos = in_data; in tls_process_server_hello()
54 if (*pos != TLS_HANDSHAKE_TYPE_SERVER_HELLO) { in tls_process_server_hello()
56 "message %d (expected ServerHello)", *pos); in tls_process_server_hello()
62 pos++; in tls_process_server_hello()
64 len = WPA_GET_BE24(pos); in tls_process_server_hello()
65 pos += 3; in tls_process_server_hello()
73 wpa_hexdump(MSG_MSGDUMP, "TLSv1: ServerHello", pos, len); in tls_process_server_hello()
74 end = pos + len; in tls_process_server_hello()
77 if (end - pos < 2) in tls_process_server_hello()
[all …]
Dtlsv1_server_read.c34 const u8 *pos, *end, *c; in tls_process_client_hello() local
49 pos = in_data; in tls_process_client_hello()
56 if (*pos != TLS_HANDSHAKE_TYPE_CLIENT_HELLO) { in tls_process_client_hello()
58 "message %d (expected ClientHello)", *pos); in tls_process_client_hello()
64 pos++; in tls_process_client_hello()
66 len = WPA_GET_BE24(pos); in tls_process_client_hello()
67 pos += 3; in tls_process_client_hello()
75 wpa_hexdump(MSG_MSGDUMP, "TLSv1: ClientHello", pos, len); in tls_process_client_hello()
76 end = pos + len; in tls_process_client_hello()
79 if (end - pos < 2) in tls_process_client_hello()
[all …]
Dx509v3.c186 const u8 *pos, *end; in x509_parse_algorithm_identifier() local
203 pos = hdr.payload; in x509_parse_algorithm_identifier()
204 end = pos + hdr.length; in x509_parse_algorithm_identifier()
211 if (asn1_get_oid(pos, end - pos, &id->oid, &pos)) in x509_parse_algorithm_identifier()
225 const u8 *pos, *end; in x509_parse_public_key() local
234 pos = buf; in x509_parse_public_key()
237 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in x509_parse_public_key()
245 pos = hdr.payload; in x509_parse_public_key()
247 if (pos + hdr.length > end) in x509_parse_public_key()
249 end = pos + hdr.length; in x509_parse_public_key()
[all …]
Dtlsv1_cred.c104 const u8 *pos, *end; in tlsv1_add_cert() local
108 pos = search_tag(pem_cert_begin, buf, len); in tlsv1_add_cert()
109 if (!pos) { in tlsv1_add_cert()
118 while (pos) { in tlsv1_add_cert()
119 pos += os_strlen(pem_cert_begin); in tlsv1_add_cert()
120 end = search_tag(pem_cert_end, pos, buf + len - pos); in tlsv1_add_cert()
127 der = (unsigned char *)base64_decode((const char *)pos, end - pos, &der_len); in tlsv1_add_cert()
144 pos = search_tag(pem_cert_begin, end, buf + len - end); in tlsv1_add_cert()
224 const u8 *pos, *end; in tlsv1_set_key_pem() local
229 pos = search_tag(pem_key_begin, key, len); in tlsv1_set_key_pem()
[all …]
Drsa.c31 static const u8 * crypto_rsa_parse_integer(const u8 *pos, const u8 *end, in crypto_rsa_parse_integer() argument
36 if (pos == NULL) in crypto_rsa_parse_integer()
39 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in crypto_rsa_parse_integer()
66 const u8 *pos, *end; in crypto_rsa_import_public_key() local
95 pos = hdr.payload; in crypto_rsa_import_public_key()
96 end = pos + hdr.length; in crypto_rsa_import_public_key()
98 pos = crypto_rsa_parse_integer(pos, end, key->n); in crypto_rsa_import_public_key()
99 pos = crypto_rsa_parse_integer(pos, end, key->e); in crypto_rsa_import_public_key()
101 if (pos == NULL) in crypto_rsa_import_public_key()
104 if (pos != end) { in crypto_rsa_import_public_key()
[all …]
Dasn1.c16 const u8 *pos, *end; in asn1_get_next() local
20 pos = buf; in asn1_get_next()
23 hdr->identifier = *pos++; in asn1_get_next()
30 if (pos >= end) { in asn1_get_next()
35 tmp = *pos++; in asn1_get_next()
43 tmp = *pos++; in asn1_get_next()
57 if (pos >= end) { in asn1_get_next()
62 hdr->length = (hdr->length << 8) | *pos++; in asn1_get_next()
69 if (end < pos || hdr->length > (unsigned int) (end - pos)) { in asn1_get_next()
74 hdr->payload = pos; in asn1_get_next()
[all …]
/hal_espressif-3.5.0/components/wpa_supplicant/src/wps/
Dwps_attr_parse.c20 u8 id, u8 len, const u8 *pos) in wps_set_vendor_ext_wfa_subelem() argument
31 attr->version2 = pos; in wps_set_vendor_ext_wfa_subelem()
34 attr->authorized_macs = pos; in wps_set_vendor_ext_wfa_subelem()
43 attr->network_key_shareable = pos; in wps_set_vendor_ext_wfa_subelem()
51 attr->request_to_enroll = pos; in wps_set_vendor_ext_wfa_subelem()
59 attr->settings_delay_time = pos; in wps_set_vendor_ext_wfa_subelem()
71 static int wps_parse_vendor_ext_wfa(struct wps_parse_attr *attr, const u8 *pos, in wps_parse_vendor_ext_wfa() argument
74 const u8 *end = pos + len; in wps_parse_vendor_ext_wfa()
77 while (pos + 2 < end) { in wps_parse_vendor_ext_wfa()
78 id = *pos++; in wps_parse_vendor_ext_wfa()
[all …]
Dwps.c173 const u8 *pos; in wps_is_addr_authorized() local
204 pos = attr->authorized_macs; in wps_is_addr_authorized()
206 if (os_memcmp(pos, addr, ETH_ALEN) == 0) { in wps_is_addr_authorized()
210 if (os_memcmp(pos, bcast, ETH_ALEN) == 0) { in wps_is_addr_authorized()
214 pos += ETH_ALEN; in wps_is_addr_authorized()
471 char *pos = buf; in wps_attr_text() local
485 ret = snprintf(pos, end - pos, in wps_attr_text()
488 ret = snprintf(pos, end - pos, in wps_attr_text()
492 if (ret < 0 || ret >= end - pos) { in wps_attr_text()
493 ret = pos - buf; in wps_attr_text()
[all …]
/hal_espressif-3.5.0/components/wpa_supplicant/src/eap_peer/
Deap_fast_pac.c182 const char *pos; member
191 char *pos; in eap_fast_read_line() local
200 if (rc->pos >= rc->end) in eap_fast_read_line()
202 l_end = rc->pos; in eap_fast_read_line()
205 len = l_end - rc->pos; in eap_fast_read_line()
208 os_memcpy(rc->buf, rc->pos, len); in eap_fast_read_line()
210 rc->pos = l_end + 1; in eap_fast_read_line()
214 pos = rc->buf; in eap_fast_read_line()
215 while (*pos != '\0') { in eap_fast_read_line()
216 if (*pos == '\n' || *pos == '\r') { in eap_fast_read_line()
[all …]
/hal_espressif-3.5.0/components/wpa_supplicant/src/common/
Dieee802_11_common.c76 int ieee802_11_parse_candidate_list(const char *pos, u8 *nei_rep, in ieee802_11_parse_candidate_list() argument
87 while (pos) { in ieee802_11_parse_candidate_list()
92 pos = os_strstr(pos, " neighbor="); in ieee802_11_parse_candidate_list()
93 if (!pos) in ieee802_11_parse_candidate_list()
100 pos += 10; in ieee802_11_parse_candidate_list()
106 if (hwaddr_aton2(pos, nei_pos) < 0) { in ieee802_11_parse_candidate_list()
111 pos += 17; in ieee802_11_parse_candidate_list()
112 if (*pos != ',') { in ieee802_11_parse_candidate_list()
116 pos++; in ieee802_11_parse_candidate_list()
118 val = strtol(pos, &endptr, 0); in ieee802_11_parse_candidate_list()
[all …]
Dwpa_common.c163 const u8 *pos; in wpa_parse_wpa_ie_rsn() local
203 pos = (const u8 *) (hdr + 1); in wpa_parse_wpa_ie_rsn()
207 data->group_cipher = rsn_selector_to_bitfield(pos); in wpa_parse_wpa_ie_rsn()
208 pos += RSN_SELECTOR_LEN; in wpa_parse_wpa_ie_rsn()
220 count = WPA_GET_LE16(pos); in wpa_parse_wpa_ie_rsn()
221 pos += 2; in wpa_parse_wpa_ie_rsn()
231 data->pairwise_cipher |= rsn_selector_to_bitfield(pos); in wpa_parse_wpa_ie_rsn()
232 pos += RSN_SELECTOR_LEN; in wpa_parse_wpa_ie_rsn()
245 count = WPA_GET_LE16(pos); in wpa_parse_wpa_ie_rsn()
246 pos += 2; in wpa_parse_wpa_ie_rsn()
[all …]
/hal_espressif-3.5.0/components/jsmn/src/
Djsmn.c70 start = parser->pos; in jsmn_parse_primitive()
72 for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { in jsmn_parse_primitive()
73 switch (js[parser->pos]) { in jsmn_parse_primitive()
82 if (js[parser->pos] < 32 || js[parser->pos] >= 127) { in jsmn_parse_primitive()
83 parser->pos = start; in jsmn_parse_primitive()
89 parser->pos = start; in jsmn_parse_primitive()
95 parser->pos--; in jsmn_parse_primitive()
100 parser->pos = start; in jsmn_parse_primitive()
103 jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos); in jsmn_parse_primitive()
107 parser->pos--; in jsmn_parse_primitive()
[all …]
/hal_espressif-3.5.0/examples/bluetooth/bluedroid/ble/ble_eddystone/main/
Desp_eddystone_api.c86 uint8_t pos = 0; in esp_eddystone_uid_received() local
92 res->inform.uid.ranging_data = buf[pos++]; in esp_eddystone_uid_received()
94 res->inform.uid.namespace_id[i] = buf[pos++]; in esp_eddystone_uid_received()
97 res->inform.uid.instance_id[i] = buf[pos++]; in esp_eddystone_uid_received()
105 int pos = 0; in esp_eddystone_resolve_url_scheme() local
109 pos += sprintf(&url_buf[pos], "%s", eddystone_url_prefix[*p++]); in esp_eddystone_resolve_url_scheme()
113 pos += sprintf(&url_buf[pos], "%s", eddystone_url_encoding[*p]); in esp_eddystone_resolve_url_scheme()
115 pos += sprintf(&url_buf[pos], "%c", *p); in esp_eddystone_resolve_url_scheme()
133 uint8_t pos = 0; in esp_eddystone_url_received() local
138 res->inform.url.tx_power = buf[pos++]; in esp_eddystone_url_received()
[all …]
/hal_espressif-3.5.0/components/wpa_supplicant/src/utils/
Dcommon.c27 int pos = len - 1; in inc_byte_array() local
28 while (pos >= 0) { in inc_byte_array()
29 counter[pos]++; in inc_byte_array()
30 if (counter[pos] != 0) in inc_byte_array()
32 pos--; in inc_byte_array()
154 const char *pos = str; in printf_decode() local
158 while (*pos) { in printf_decode()
161 switch (*pos) { in printf_decode()
163 pos++; in printf_decode()
164 switch (*pos) { in printf_decode()
[all …]
Dbase64.c24 char *out, *pos; in base64_gen_encode() local
43 pos = out; in base64_gen_encode()
46 *pos++ = table[(in[0] >> 2) & 0x3f]; in base64_gen_encode()
47 *pos++ = table[(((in[0] & 0x03) << 4) | (in[1] >> 4)) & 0x3f]; in base64_gen_encode()
48 *pos++ = table[(((in[1] & 0x0f) << 2) | (in[2] >> 6)) & 0x3f]; in base64_gen_encode()
49 *pos++ = table[in[2] & 0x3f]; in base64_gen_encode()
53 *pos++ = '\n'; in base64_gen_encode()
59 *pos++ = table[(in[0] >> 2) & 0x3f]; in base64_gen_encode()
61 *pos++ = table[((in[0] & 0x03) << 4) & 0x3f]; in base64_gen_encode()
63 *pos++ = '='; in base64_gen_encode()
[all …]
Djson.c66 const char *pos = *json_pos; in json_parse_string() local
71 pos++; /* skip starting quote */ in json_parse_string()
73 max_len = end - pos + 1; in json_parse_string()
81 for (; pos < end; pos++) { in json_parse_string()
98 switch (*pos) { in json_parse_string()
102 *json_pos = pos; in json_parse_string()
105 pos++; in json_parse_string()
106 if (pos >= end) { in json_parse_string()
111 switch (*pos) { in json_parse_string()
115 *spos++ = *pos; in json_parse_string()
[all …]
Duuid.c16 const char *pos; in uuid_str2bin() local
19 pos = str; in uuid_str2bin()
22 if (hexstr2bin(pos, opos, 4)) in uuid_str2bin()
24 pos += 8; in uuid_str2bin()
27 if (*pos++ != '-' || hexstr2bin(pos, opos, 2)) in uuid_str2bin()
29 pos += 4; in uuid_str2bin()
32 if (*pos++ != '-' || hexstr2bin(pos, opos, 2)) in uuid_str2bin()
34 pos += 4; in uuid_str2bin()
37 if (*pos++ != '-' || hexstr2bin(pos, opos, 2)) in uuid_str2bin()
39 pos += 4; in uuid_str2bin()
[all …]
/hal_espressif-3.5.0/components/wpa_supplicant/src/crypto/
Dccmp.c24 u8 *pos; in ccmp_aad_nonce() local
51 pos = aad + 2; in ccmp_aad_nonce()
52 os_memcpy(pos, hdr->addr1, 3 * ETH_ALEN); in ccmp_aad_nonce()
53 pos += 3 * ETH_ALEN; in ccmp_aad_nonce()
56 WPA_PUT_LE16(pos, seq); in ccmp_aad_nonce()
57 pos += 2; in ccmp_aad_nonce()
59 os_memcpy(pos, hdr + 1, addr4 * ETH_ALEN + qos * 2); in ccmp_aad_nonce()
60 pos += addr4 * ETH_ALEN; in ccmp_aad_nonce()
62 pos[0] &= ~0x70; in ccmp_aad_nonce()
64 pos[0] &= ~0x80; in ccmp_aad_nonce()
[all …]
/hal_espressif-3.5.0/examples/wifi/roaming/main/
Droaming_example.c108 const uint8_t *pos = data, *end; in get_btm_neighbor_list() local
110 if (pos[0] != WLAN_EID_NEIGHBOR_REPORT || in get_btm_neighbor_list()
124 pos += 2; in get_btm_neighbor_list()
125 end = pos + nr_len; in get_btm_neighbor_list()
127 nr = pos; in get_btm_neighbor_list()
128 pos += NR_IE_MIN_LEN; in get_btm_neighbor_list()
132 while (end - pos > 2) { in get_btm_neighbor_list()
135 s_id = *pos++; in get_btm_neighbor_list()
136 s_len = *pos++; in get_btm_neighbor_list()
137 if (s_len > end - pos) { in get_btm_neighbor_list()
[all …]

1234567