Lines Matching full:attr

105 		struct wps_parse_attr attr;  in wps_init()  local
108 if (wps_parse_msg(cfg->assoc_wps_ie, &attr) < 0) { in wps_init()
111 } else if (attr.request_type == NULL) { in wps_init()
117 *attr.request_type); in wps_init()
118 data->request_type = *attr.request_type; in wps_init()
238 struct wps_parse_attr attr; in wps_is_selected_pbc_registrar() local
241 * In theory, this could also verify that attr.sel_reg_config_methods in wps_is_selected_pbc_registrar()
247 if (wps_parse_msg(msg, &attr) < 0 || in wps_is_selected_pbc_registrar()
248 !attr.selected_registrar || *attr.selected_registrar == 0 || in wps_is_selected_pbc_registrar()
249 !attr.dev_password_id || in wps_is_selected_pbc_registrar()
250 WPA_GET_BE16(attr.dev_password_id) != DEV_PW_PUSHBUTTON) in wps_is_selected_pbc_registrar()
254 if (!attr.sel_reg_config_methods || in wps_is_selected_pbc_registrar()
255 !(WPA_GET_BE16(attr.sel_reg_config_methods) & in wps_is_selected_pbc_registrar()
264 static int is_selected_pin_registrar(struct wps_parse_attr *attr) in is_selected_pin_registrar() argument
267 * In theory, this could also verify that attr.sel_reg_config_methods in is_selected_pin_registrar()
274 if (!attr->selected_registrar || *attr->selected_registrar == 0) in is_selected_pin_registrar()
277 if (attr->dev_password_id != NULL && in is_selected_pin_registrar()
278 WPA_GET_BE16(attr->dev_password_id) == DEV_PW_PUSHBUTTON) in is_selected_pin_registrar()
282 if (!attr->sel_reg_config_methods || in is_selected_pin_registrar()
283 !(WPA_GET_BE16(attr->sel_reg_config_methods) & in is_selected_pin_registrar()
299 struct wps_parse_attr attr; in wps_is_selected_pin_registrar() local
301 if (wps_parse_msg(msg, &attr) < 0) in wps_is_selected_pin_registrar()
304 return is_selected_pin_registrar(&attr); in wps_is_selected_pin_registrar()
319 struct wps_parse_attr attr; in wps_is_addr_authorized() local
324 if (wps_parse_msg(msg, &attr) < 0) in wps_is_addr_authorized()
327 if (!attr.version2 && ver1_compat) { in wps_is_addr_authorized()
332 return is_selected_pin_registrar(&attr); in wps_is_addr_authorized()
335 if (!attr.authorized_macs) in wps_is_addr_authorized()
338 pos = attr.authorized_macs; in wps_is_addr_authorized()
339 for (i = 0; i < attr.authorized_macs_len / ETH_ALEN; i++) { in wps_is_addr_authorized()
361 struct wps_parse_attr attr; in wps_ap_priority_compar() local
364 if (wps_a == NULL || wps_parse_msg(wps_a, &attr) < 0) in wps_ap_priority_compar()
366 sel_a = attr.selected_registrar && *attr.selected_registrar != 0; in wps_ap_priority_compar()
368 if (wps_b == NULL || wps_parse_msg(wps_b, &attr) < 0) in wps_ap_priority_compar()
370 sel_b = attr.selected_registrar && *attr.selected_registrar != 0; in wps_ap_priority_compar()
391 struct wps_parse_attr attr; in wps_get_uuid_e() local
393 if (wps_parse_msg(msg, &attr) < 0) in wps_get_uuid_e()
395 return attr.uuid_e; in wps_get_uuid_e()
404 struct wps_parse_attr attr; in wps_is_20() local
406 if (msg == NULL || wps_parse_msg(msg, &attr) < 0) in wps_is_20()
408 return attr.version2 != NULL; in wps_is_20()
550 struct wps_parse_attr attr; in wps_attr_text() local
554 if (wps_parse_msg(data, &attr) < 0) in wps_attr_text()
557 if (attr.wps_state) { in wps_attr_text()
558 if (*attr.wps_state == WPS_STATE_NOT_CONFIGURED) in wps_attr_text()
561 else if (*attr.wps_state == WPS_STATE_CONFIGURED) in wps_attr_text()
571 if (attr.ap_setup_locked && *attr.ap_setup_locked) { in wps_attr_text()
579 if (attr.selected_registrar && *attr.selected_registrar) { in wps_attr_text()
587 if (attr.dev_password_id) { in wps_attr_text()
590 WPA_GET_BE16(attr.dev_password_id)); in wps_attr_text()
596 if (attr.sel_reg_config_methods) { in wps_attr_text()
600 WPA_GET_BE16(attr.sel_reg_config_methods)); in wps_attr_text()
606 if (attr.primary_dev_type) { in wps_attr_text()
610 wps_dev_type_bin2str(attr.primary_dev_type, in wps_attr_text()
618 if (attr.dev_name) { in wps_attr_text()
619 char *str = os_malloc(attr.dev_name_len + 1); in wps_attr_text()
623 for (i = 0; i < attr.dev_name_len; i++) { in wps_attr_text()
624 if (attr.dev_name[i] == 0 || in wps_attr_text()
625 is_ctrl_char(attr.dev_name[i])) in wps_attr_text()
628 str[i] = attr.dev_name[i]; in wps_attr_text()
638 if (attr.config_methods) { in wps_attr_text()
641 WPA_GET_BE16(attr.config_methods)); in wps_attr_text()