Home | History | Annotate | Download | only in wps

Lines Matching defs:pos

21 					  u8 id, u8 len, const u8 *pos)
32 attr->version2 = pos;
35 attr->authorized_macs = pos;
44 attr->network_key_shareable = pos;
52 attr->request_to_enroll = pos;
60 attr->settings_delay_time = pos;
68 attr->registrar_configuration_methods = pos;
80 static int wps_parse_vendor_ext_wfa(struct wps_parse_attr *attr, const u8 *pos,
83 const u8 *end = pos + len;
86 while (end - pos >= 2) {
87 id = *pos++;
88 elen = *pos++;
89 if (elen > end - pos)
91 if (wps_set_vendor_ext_wfa_subelem(attr, id, elen, pos) < 0)
93 pos += elen;
100 static int wps_parse_vendor_ext(struct wps_parse_attr *attr, const u8 *pos,
110 vendor_id = WPA_GET_BE24(pos);
113 return wps_parse_vendor_ext_wfa(attr, pos + 3, len - 3);
133 attr->vendor_ext[attr->num_vendor_ext] = pos;
142 const u8 *pos, u16 len)
151 attr->version = pos;
159 attr->msg_type = pos;
167 attr->enrollee_nonce = pos;
175 attr->registrar_nonce = pos;
183 attr->uuid_e = pos;
191 attr->uuid_r = pos;
199 attr->auth_type_flags = pos;
207 attr->encr_type_flags = pos;
215 attr->conn_type_flags = pos;
223 attr->config_methods = pos;
231 attr->sel_reg_config_methods = pos;
239 attr->primary_dev_type = pos;
247 attr->rf_bands = pos;
255 attr->assoc_state = pos;
263 attr->config_error = pos;
271 attr->dev_password_id = pos;
279 WPA_GET_BE16(pos + WPS_OOB_PUBKEY_HASH_LEN) !=
285 attr->oob_dev_password = pos;
294 attr->os_version = pos;
302 attr->wps_state = pos;
310 attr->authenticator = pos;
318 attr->r_hash1 = pos;
326 attr->r_hash2 = pos;
334 attr->e_hash1 = pos;
342 attr->e_hash2 = pos;
350 attr->r_snonce1 = pos;
358 attr->r_snonce2 = pos;
366 attr->e_snonce1 = pos;
374 attr->e_snonce2 = pos;
382 attr->key_wrap_auth = pos;
390 attr->auth_type = pos;
398 attr->encr_type = pos;
406 attr->network_idx = pos;
414 attr->network_key_idx = pos;
422 attr->mac_addr = pos;
430 attr->selected_registrar = pos;
438 attr->request_type = pos;
446 attr->response_type = pos;
449 attr->manufacturer = pos;
456 attr->model_name = pos;
463 attr->model_number = pos;
470 attr->serial_number = pos;
483 attr->dev_name = pos;
499 attr->public_key = pos;
503 attr->encr_settings = pos;
513 attr->cred[attr->num_cred] = pos;
523 attr->ssid = pos;
527 attr->network_key = pos;
536 attr->ap_setup_locked = pos;
550 attr->req_dev_type[attr->num_req_dev_type] = pos;
560 attr->sec_dev_type_list = pos;
564 if (wps_parse_vendor_ext(attr, pos, len) < 0)
573 attr->ap_channel = pos;
587 const u8 *pos, *end;
594 pos = wpabuf_head(msg);
595 end = pos + wpabuf_len(msg);
597 while (pos < end) {
598 if (end - pos < 4) {
601 (unsigned long) (end - pos));
605 type = WPA_GET_BE16(pos);
606 pos += 2;
607 len = WPA_GET_BE16(pos);
608 pos += 2;
611 if (len > end - pos) {
627 pos -= 3;
641 for (i = 0; i < end - pos; i++) {
642 if (pos[i])
645 if (i == end - pos) {
653 if (wps_set_attr(attr, type, pos, len) < 0)
659 pos += len;