Lines Matching refs:attr

105 		struct wps_parse_attr attr;
108 if (wps_parse_msg(cfg->assoc_wps_ie, &attr) < 0) {
111 } else if (attr.request_type == NULL) {
117 *attr.request_type);
118 data->request_type = *attr.request_type;
237 struct wps_parse_attr attr;
240 * In theory, this could also verify that attr.sel_reg_config_methods
246 if (wps_parse_msg(msg, &attr) < 0 ||
247 !attr.selected_registrar || *attr.selected_registrar == 0 ||
248 !attr.dev_password_id ||
249 WPA_GET_BE16(attr.dev_password_id) != DEV_PW_PUSHBUTTON)
253 if (!attr.sel_reg_config_methods ||
254 !(WPA_GET_BE16(attr.sel_reg_config_methods) &
263 static int is_selected_pin_registrar(struct wps_parse_attr *attr)
266 * In theory, this could also verify that attr.sel_reg_config_methods
273 if (!attr->selected_registrar || *attr->selected_registrar == 0)
276 if (attr->dev_password_id != NULL &&
277 WPA_GET_BE16(attr->dev_password_id) == DEV_PW_PUSHBUTTON)
281 if (!attr->sel_reg_config_methods ||
282 !(WPA_GET_BE16(attr->sel_reg_config_methods) &
298 struct wps_parse_attr attr;
300 if (wps_parse_msg(msg, &attr) < 0)
303 return is_selected_pin_registrar(&attr);
318 struct wps_parse_attr attr;
323 if (wps_parse_msg(msg, &attr) < 0)
326 if (!attr.version2 && ver1_compat) {
331 return is_selected_pin_registrar(&attr);
334 if (!attr.authorized_macs)
337 pos = attr.authorized_macs;
338 for (i = 0; i < attr.authorized_macs_len / ETH_ALEN; i++) {
360 struct wps_parse_attr attr;
363 if (wps_a == NULL || wps_parse_msg(wps_a, &attr) < 0)
365 sel_a = attr.selected_registrar && *attr.selected_registrar != 0;
367 if (wps_b == NULL || wps_parse_msg(wps_b, &attr) < 0)
369 sel_b = attr.selected_registrar && *attr.selected_registrar != 0;
390 struct wps_parse_attr attr;
392 if (wps_parse_msg(msg, &attr) < 0)
394 return attr.uuid_e;
403 struct wps_parse_attr attr;
405 if (msg == NULL || wps_parse_msg(msg, &attr) < 0)
407 return attr.version2 != NULL;
549 struct wps_parse_attr attr;
553 if (wps_parse_msg(data, &attr) < 0)
556 if (attr.wps_state) {
557 if (*attr.wps_state == WPS_STATE_NOT_CONFIGURED)
560 else if (*attr.wps_state == WPS_STATE_CONFIGURED)
570 if (attr.ap_setup_locked && *attr.ap_setup_locked) {
578 if (attr.selected_registrar && *attr.selected_registrar) {
586 if (attr.dev_password_id) {
589 WPA_GET_BE16(attr.dev_password_id));
595 if (attr.sel_reg_config_methods) {
599 WPA_GET_BE16(attr.sel_reg_config_methods));
605 if (attr.primary_dev_type) {
609 wps_dev_type_bin2str(attr.primary_dev_type,
617 if (attr.dev_name) {
618 char *str = os_malloc(attr.dev_name_len + 1);
622 for (i = 0; i < attr.dev_name_len; i++) {
623 if (attr.dev_name[i] == 0 ||
624 is_ctrl_char(attr.dev_name[i]))
627 str[i] = attr.dev_name[i];
637 if (attr.config_methods) {
640 WPA_GET_BE16(attr.config_methods));