Home
last modified time | relevance | path

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

12345678910>>...13

/hostap-3.6.0/wlantest/
Dwlantest_cli.c22 static int get_prev_arg_pos(const char *str, int pos) in get_prev_arg_pos() argument
24 while (pos > 0 && str[pos - 1] != ' ') in get_prev_arg_pos()
25 pos--; in get_prev_arg_pos()
26 while (pos > 0 && str[pos - 1] == ' ') in get_prev_arg_pos()
27 pos--; in get_prev_arg_pos()
28 while (pos > 0 && str[pos - 1] != ' ') in get_prev_arg_pos()
29 pos--; in get_prev_arg_pos()
30 return pos; in get_prev_arg_pos()
37 u8 *pos = buf; in attr_get() local
39 while (pos + 8 <= buf + buflen) { in attr_get()
[all …]
Dctrl.c24 u8 *pos = buf; in attr_get() local
26 while (pos + 8 <= buf + buflen) { in attr_get()
29 a = WPA_GET_BE32(pos); in attr_get()
30 pos += 4; in attr_get()
31 alen = WPA_GET_BE32(pos); in attr_get()
32 pos += 4; in attr_get()
33 if (pos + alen > buf + buflen) { in attr_get()
40 return pos; in attr_get()
42 pos += alen; in attr_get()
63 u8 *pos; in attr_get_int() local
[all …]
/hostap-3.6.0/hostapd/
Dconfig_file.c34 char buf[128], *pos, *pos2, *pos3; in hostapd_config_read_vlan_file() local
49 pos = buf; in hostapd_config_read_vlan_file()
50 while (*pos != '\0') { in hostapd_config_read_vlan_file()
51 if (*pos == '\n') { in hostapd_config_read_vlan_file()
52 *pos = '\0'; in hostapd_config_read_vlan_file()
55 pos++; in hostapd_config_read_vlan_file()
62 pos = buf + 1; in hostapd_config_read_vlan_file()
64 vlan_id = strtol(buf, &pos, 10); in hostapd_config_read_vlan_file()
65 if (buf == pos || vlan_id < 1 || in hostapd_config_read_vlan_file()
74 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_vlan_file()
[all …]
Dhlr_auc_gw.c229 char cmd[128], val[13], *pos; in db_update_milenage_sqn() local
234 pos = val; in db_update_milenage_sqn()
235 pos += wpa_snprintf_hex(pos, sizeof(val), m->sqn, 6); in db_update_milenage_sqn()
236 *pos = '\0'; in db_update_milenage_sqn()
278 char buf[200], *pos, *pos2; in read_gsm_triplets() local
299 pos = buf; in read_gsm_triplets()
300 while (*pos != '\0' && *pos != '\n') in read_gsm_triplets()
301 pos++; in read_gsm_triplets()
302 if (*pos == '\n') in read_gsm_triplets()
303 *pos = '\0'; in read_gsm_triplets()
[all …]
Dctrl_iface.c164 char *pos; in hostapd_ctrl_iface_wps_pin() local
174 pos = os_strchr(timeout_txt, ' '); in hostapd_ctrl_iface_wps_pin()
175 if (pos) { in hostapd_ctrl_iface_wps_pin()
176 *pos++ = '\0'; in hostapd_ctrl_iface_wps_pin()
177 if (hwaddr_aton(pos, addr_buf) == 0) in hostapd_ctrl_iface_wps_pin()
192 char *pos; in hostapd_ctrl_iface_wps_check_pin() local
197 for (pos = cmd, len = 0; *pos != '\0'; pos++) { in hostapd_ctrl_iface_wps_check_pin()
198 if (*pos < '0' || *pos > '9') in hostapd_ctrl_iface_wps_check_pin()
200 pin[len++] = *pos; in hostapd_ctrl_iface_wps_check_pin()
234 char *pos) in hostapd_ctrl_iface_wps_nfc_tag_read() argument
[all …]
/hostap-3.6.0/src/tls/
Dtlsv1_server_write.c45 u8 *pos, *rhdr, *hs_start, *hs_length, *ext_start; in tls_write_server_hello() local
49 pos = *msgpos; in tls_write_server_hello()
52 rhdr = pos; in tls_write_server_hello()
53 pos += TLS_RECORD_HEADER_LEN; in tls_write_server_hello()
80 hs_start = pos; in tls_write_server_hello()
82 *pos++ = TLS_HANDSHAKE_TYPE_SERVER_HELLO; in tls_write_server_hello()
84 hs_length = pos; in tls_write_server_hello()
85 pos += 3; in tls_write_server_hello()
88 WPA_PUT_BE16(pos, conn->rl.tls_version); in tls_write_server_hello()
89 pos += 2; in tls_write_server_hello()
[all …]
Dtlsv1_client_write.c47 u8 *hello, *end, *pos, *hs_length, *hs_start, *rhdr; in tls_send_client_hello() local
82 pos = rhdr + TLS_RECORD_HEADER_LEN; in tls_send_client_hello()
87 hs_start = pos; in tls_send_client_hello()
89 *pos++ = TLS_HANDSHAKE_TYPE_CLIENT_HELLO; in tls_send_client_hello()
91 hs_length = pos; in tls_send_client_hello()
92 pos += 3; in tls_send_client_hello()
95 WPA_PUT_BE16(pos, tls_version); in tls_send_client_hello()
96 pos += 2; in tls_send_client_hello()
98 os_memcpy(pos, conn->client_random, TLS_RANDOM_LEN); in tls_send_client_hello()
99 pos += TLS_RANDOM_LEN; in tls_send_client_hello()
[all …]
Dtlsv1_cred.c110 const u8 *pos, *end; in tlsv1_add_cert() local
114 pos = search_tag(pem_cert_begin, buf, len); in tlsv1_add_cert()
115 if (!pos) { in tlsv1_add_cert()
124 while (pos) { in tlsv1_add_cert()
125 pos += os_strlen(pem_cert_begin); in tlsv1_add_cert()
126 end = search_tag(pem_cert_end, pos, buf + len - pos); in tlsv1_add_cert()
133 der = base64_decode((const char *) pos, end - pos, &der_len); in tlsv1_add_cert()
150 pos = search_tag(pem_cert_begin, end, buf + len - end); in tlsv1_add_cert()
199 const char *pos = cert + 7; in tlsv1_set_ca_cert() local
200 if (os_strncmp(pos, "server/sha256/", 14) != 0) { in tlsv1_set_ca_cert()
[all …]
Dx509v3.c186 const u8 *pos, *end; in x509_parse_algorithm_identifier() local
202 pos = hdr.payload; in x509_parse_algorithm_identifier()
203 end = pos + hdr.length; in x509_parse_algorithm_identifier()
207 if (asn1_get_oid(pos, end - pos, &id->oid, &pos)) in x509_parse_algorithm_identifier()
221 const u8 *pos, *end; in x509_parse_public_key() local
230 pos = buf; in x509_parse_public_key()
233 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in x509_parse_public_key()
239 pos = hdr.payload; in x509_parse_public_key()
241 if (hdr.length > end - pos) in x509_parse_public_key()
243 end = pos + hdr.length; in x509_parse_public_key()
[all …]
Dtlsv1_client_read.c42 const u8 *pos, size_t len) in tls_process_server_hello_extensions() argument
44 const u8 *end = pos + len; in tls_process_server_hello_extensions()
47 pos, len); in tls_process_server_hello_extensions()
48 while (pos < end) { in tls_process_server_hello_extensions()
51 if (end - pos < 4) { in tls_process_server_hello_extensions()
56 ext = WPA_GET_BE16(pos); in tls_process_server_hello_extensions()
57 pos += 2; in tls_process_server_hello_extensions()
58 elen = WPA_GET_BE16(pos); in tls_process_server_hello_extensions()
59 pos += 2; in tls_process_server_hello_extensions()
61 if (elen > end - pos) { in tls_process_server_hello_extensions()
[all …]
Dtlsv1_server_read.c52 const u8 *pos, *end; in tls_process_status_request_item() local
55 pos = req; in tls_process_status_request_item()
72 if (end - pos < 1) in tls_process_status_request_item()
75 status_type = *pos++; in tls_process_status_request_item()
83 wpa_hexdump(MSG_DEBUG, "TLSv1: OCSPStatusRequest", pos, end - pos); in tls_process_status_request_item()
93 const u8 *pos, *end; in tls_process_status_request_v2() local
97 pos = ext; in tls_process_status_request_v2()
108 while (end - pos >= 2) { in tls_process_status_request_v2()
111 len = WPA_GET_BE16(pos); in tls_process_status_request_v2()
112 pos += 2; in tls_process_status_request_v2()
[all …]
Dtlsv1_client_ocsp.c117 const u8 *pos, *end; in tls_process_ocsp_single_response() local
145 pos = hdr.payload; in tls_process_ocsp_single_response()
157 if (x509_parse_algorithm_identifier(pos, end - pos, &alg, &pos)) in tls_process_ocsp_single_response()
161 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in tls_process_ocsp_single_response()
171 pos = hdr.payload + hdr.length; in tls_process_ocsp_single_response()
186 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in tls_process_ocsp_single_response()
195 pos = hdr.payload + hdr.length; in tls_process_ocsp_single_response()
208 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in tls_process_ocsp_single_response()
231 pos = end; in tls_process_ocsp_single_response()
241 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in tls_process_ocsp_single_response()
[all …]
/hostap-3.6.0/wpa_supplicant/
Dctrl_iface.c81 char *pos; in set_bssid_filter() local
85 pos = val; in set_bssid_filter()
86 while (pos) { in set_bssid_filter()
87 if (*pos == '\0') in set_bssid_filter()
89 if (hwaddr_aton(pos, addr)) { in set_bssid_filter()
102 pos = os_strchr(pos, ' '); in set_bssid_filter()
103 if (pos) in set_bssid_filter()
104 pos++; in set_bssid_filter()
118 char *pos; in set_disallow_aps() local
130 pos = val; in set_disallow_aps()
[all …]
/hostap-3.6.0/src/rsn_supp/
Dwpa_ie.c45 u8 *pos; in wpa_gen_wpa_ie_wpa() local
57 pos = (u8 *) (hdr + 1); in wpa_gen_wpa_ie_wpa()
65 RSN_SELECTOR_PUT(pos, suite); in wpa_gen_wpa_ie_wpa()
66 pos += WPA_SELECTOR_LEN; in wpa_gen_wpa_ie_wpa()
68 *pos++ = 1; in wpa_gen_wpa_ie_wpa()
69 *pos++ = 0; in wpa_gen_wpa_ie_wpa()
78 RSN_SELECTOR_PUT(pos, suite); in wpa_gen_wpa_ie_wpa()
79 pos += WPA_SELECTOR_LEN; in wpa_gen_wpa_ie_wpa()
81 *pos++ = 1; in wpa_gen_wpa_ie_wpa()
82 *pos++ = 0; in wpa_gen_wpa_ie_wpa()
[all …]
/hostap-3.6.0/src/ap/
Dfils_hlp.c23 const u16 *pos; in ip_checksum() local
25 for (pos = buf; len >= 2; len -= 2) in ip_checksum()
26 sum += ntohs(*pos++); in ip_checksum()
28 sum += ntohs(*pos << 8); in ip_checksum()
39 u8 *pos, *end; in fils_dhcp_request() local
53 pos = wpabuf_mhead(sta->hlp_dhcp_discover); in fils_dhcp_request()
54 end = pos + wpabuf_len(sta->hlp_dhcp_discover); in fils_dhcp_request()
55 dhcp = (struct dhcp_data *) pos; in fils_dhcp_request()
56 pos = (u8 *) (dhcp + 1); in fils_dhcp_request()
57 pos += 4; /* skip magic */ in fils_dhcp_request()
[all …]
Dieee802_11_shared.c26 u8 *pos = eid; in hostapd_eid_assoc_comeback_time() local
30 *pos++ = WLAN_EID_TIMEOUT_INTERVAL; in hostapd_eid_assoc_comeback_time()
31 *pos++ = 5; in hostapd_eid_assoc_comeback_time()
32 *pos++ = WLAN_TIMEOUT_ASSOC_COMEBACK; in hostapd_eid_assoc_comeback_time()
42 WPA_PUT_LE32(pos, timeout); in hostapd_eid_assoc_comeback_time()
43 pos += 4; in hostapd_eid_assoc_comeback_time()
45 return pos; in hostapd_eid_assoc_comeback_time()
342 static void hostapd_ext_capab_byte(struct hostapd_data *hapd, u8 *pos, int idx) in hostapd_ext_capab_byte() argument
344 *pos = 0x00; in hostapd_ext_capab_byte()
349 *pos |= 0x01; /* Bit 0 - Coexistence management */ in hostapd_ext_capab_byte()
[all …]
Dwpa_auth_ie.c31 u8 *pos, *count; in wpa_write_wpa_ie() local
38 pos = (u8 *) (hdr + 1); in wpa_write_wpa_ie()
46 RSN_SELECTOR_PUT(pos, suite); in wpa_write_wpa_ie()
47 pos += WPA_SELECTOR_LEN; in wpa_write_wpa_ie()
49 count = pos; in wpa_write_wpa_ie()
50 pos += 2; in wpa_write_wpa_ie()
52 num_suites = wpa_cipher_put_suites(pos, conf->wpa_pairwise); in wpa_write_wpa_ie()
58 pos += num_suites * WPA_SELECTOR_LEN; in wpa_write_wpa_ie()
62 count = pos; in wpa_write_wpa_ie()
63 pos += 2; in wpa_write_wpa_ie()
[all …]
Dmbo_ap.c37 char channels[200], *pos, *end; in mbo_ap_parse_non_pref_chan() local
63 pos = channels; in mbo_ap_parse_non_pref_chan()
64 end = pos + sizeof(channels); in mbo_ap_parse_non_pref_chan()
65 *pos = '\0'; in mbo_ap_parse_non_pref_chan()
67 ret = os_snprintf(pos, end - pos, "%s%u", in mbo_ap_parse_non_pref_chan()
69 if (os_snprintf_error(end - pos, ret)) { in mbo_ap_parse_non_pref_chan()
70 *pos = '\0'; in mbo_ap_parse_non_pref_chan()
73 pos += ret; in mbo_ap_parse_non_pref_chan()
86 const u8 *pos, *attr, *end; in mbo_ap_check_sta_assoc() local
92 pos = elems->mbo + 4; in mbo_ap_check_sta_assoc()
[all …]
/hostap-3.6.0/src/wps/
Dwps_attr_parse.c21 u8 id, u8 len, const u8 *pos) in wps_set_vendor_ext_wfa_subelem() argument
32 attr->version2 = pos; in wps_set_vendor_ext_wfa_subelem()
35 attr->authorized_macs = pos; in wps_set_vendor_ext_wfa_subelem()
44 attr->network_key_shareable = pos; in wps_set_vendor_ext_wfa_subelem()
52 attr->request_to_enroll = pos; in wps_set_vendor_ext_wfa_subelem()
60 attr->settings_delay_time = pos; in wps_set_vendor_ext_wfa_subelem()
68 attr->registrar_configuration_methods = pos; in wps_set_vendor_ext_wfa_subelem()
77 attr->multi_ap_ext = *pos; in wps_set_vendor_ext_wfa_subelem()
91 static int wps_parse_vendor_ext_wfa(struct wps_parse_attr *attr, const u8 *pos, in wps_parse_vendor_ext_wfa() argument
94 const u8 *end = pos + len; in wps_parse_vendor_ext_wfa()
[all …]
/hostap-3.6.0/src/eap_peer/
Deap_teap_pac.c181 const char *pos; member
190 char *pos; in eap_teap_read_line() local
200 if (rc->pos >= rc->end) in eap_teap_read_line()
202 l_end = rc->pos; in eap_teap_read_line()
205 len = l_end - rc->pos; in eap_teap_read_line()
208 os_memcpy(rc->buf, rc->pos, len); in eap_teap_read_line()
210 rc->pos = l_end + 1; in eap_teap_read_line()
214 pos = rc->buf; in eap_teap_read_line()
215 while (*pos != '\0') { in eap_teap_read_line()
216 if (*pos == '\n' || *pos == '\r') { in eap_teap_read_line()
[all …]
Deap_fast_pac.c181 const char *pos; member
190 char *pos; in eap_fast_read_line() local
199 if (rc->pos >= rc->end) in eap_fast_read_line()
201 l_end = rc->pos; in eap_fast_read_line()
204 len = l_end - rc->pos; in eap_fast_read_line()
207 os_memcpy(rc->buf, rc->pos, len); in eap_fast_read_line()
209 rc->pos = l_end + 1; in eap_fast_read_line()
213 pos = rc->buf; in eap_fast_read_line()
214 while (*pos != '\0') { in eap_fast_read_line()
215 if (*pos == '\n' || *pos == '\r') { in eap_fast_read_line()
[all …]
Deap_gpsk.c109 const char *pos; in eap_gpsk_init() local
111 pos = os_strstr(phase1, "cipher="); in eap_gpsk_init()
112 if (pos) { in eap_gpsk_init()
113 data->forced_cipher = atoi(pos + 7); in eap_gpsk_init()
144 const u8 *pos, const u8 *end) in eap_gpsk_process_id_server() argument
148 if (end - pos < 2) { in eap_gpsk_process_id_server()
152 alen = WPA_GET_BE16(pos); in eap_gpsk_process_id_server()
153 pos += 2; in eap_gpsk_process_id_server()
154 if (end - pos < alen) { in eap_gpsk_process_id_server()
159 data->id_server = os_memdup(pos, alen); in eap_gpsk_process_id_server()
[all …]
/hostap-3.6.0/src/common/
Dwpa_common.c597 u8 *data, *pos; in fils_pmk_to_ptk() local
623 pos = data; in fils_pmk_to_ptk()
624 os_memcpy(pos, spa, ETH_ALEN); in fils_pmk_to_ptk()
625 pos += ETH_ALEN; in fils_pmk_to_ptk()
626 os_memcpy(pos, aa, ETH_ALEN); in fils_pmk_to_ptk()
627 pos += ETH_ALEN; in fils_pmk_to_ptk()
628 os_memcpy(pos, snonce, FILS_NONCE_LEN); in fils_pmk_to_ptk()
629 pos += FILS_NONCE_LEN; in fils_pmk_to_ptk()
630 os_memcpy(pos, anonce, FILS_NONCE_LEN); in fils_pmk_to_ptk()
631 pos += FILS_NONCE_LEN; in fils_pmk_to_ptk()
[all …]
/hostap-3.6.0/src/eapol_auth/
Deapol_auth_dump.c124 char *pos, *end; in eapol_auth_dump_state() local
127 pos = buf; in eapol_auth_dump_state()
128 end = pos + buflen; in eapol_auth_dump_state()
130 ret = os_snprintf(pos, end - pos, "aWhile=%d\nquietWhile=%d\n" in eapol_auth_dump_state()
133 if (os_snprintf_error(end - pos, ret)) in eapol_auth_dump_state()
134 return pos - buf; in eapol_auth_dump_state()
135 pos += ret; in eapol_auth_dump_state()
138 ret = os_snprintf(pos, end - pos, in eapol_auth_dump_state()
176 if (os_snprintf_error(end - pos, ret)) in eapol_auth_dump_state()
177 return pos - buf; in eapol_auth_dump_state()
[all …]
/hostap-3.6.0/src/p2p/
Dp2p_sd.c21 const u8 *pos, *end; in wfd_wsd_supported() local
28 pos = wpabuf_head(wfd); in wfd_wsd_supported()
29 end = pos + wpabuf_len(wfd); in wfd_wsd_supported()
31 while (end - pos >= 3) { in wfd_wsd_supported()
32 subelem = *pos++; in wfd_wsd_supported()
33 len = WPA_GET_BE16(pos); in wfd_wsd_supported()
34 pos += 2; in wfd_wsd_supported()
35 if (len > end - pos) in wfd_wsd_supported()
39 u16 info = WPA_GET_BE16(pos); in wfd_wsd_supported()
43 pos += len; in wfd_wsd_supported()
[all …]

12345678910>>...13