Lines Matching refs:attr
1092 struct wps_parse_attr attr;
1099 if (wps_parse_msg(wps_data, &attr) < 0)
1102 if (attr.config_methods == NULL) {
1108 if (attr.dev_password_id == NULL) {
1114 if (reg->enrollee_seen_cb && attr.uuid_e &&
1115 attr.primary_dev_type && attr.request_type && !p2p_wildcard) {
1117 if (attr.dev_name) {
1118 dev_name = os_zalloc(attr.dev_name_len + 1);
1120 os_memcpy(dev_name, attr.dev_name,
1121 attr.dev_name_len);
1124 reg->enrollee_seen_cb(reg->cb_ctx, addr, attr.uuid_e,
1125 attr.primary_dev_type,
1126 WPA_GET_BE16(attr.config_methods),
1127 WPA_GET_BE16(attr.dev_password_id),
1128 *attr.request_type, dev_name);
1132 if (WPA_GET_BE16(attr.dev_password_id) != DEV_PW_PUSHBUTTON)
1137 if (attr.uuid_e == NULL) {
1142 wpa_hexdump(MSG_DEBUG, "WPS: UUID-E from Probe Request", attr.uuid_e,
1147 os_memcmp(attr.uuid_e, reg->pbc_ignore_uuid, WPS_UUID_LEN) == 0) {
1162 wps_registrar_add_pbc_session(reg, addr, attr.uuid_e);
1163 if (wps_registrar_pbc_overlap(reg, addr, attr.uuid_e)) {
2498 struct wps_parse_attr *attr)
2508 if (wps_process_uuid_e(wps, attr->uuid_e) ||
2509 wps_process_mac_addr(wps, attr->mac_addr) ||
2510 wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
2511 wps_process_pubkey(wps, attr->public_key, attr->public_key_len) ||
2512 wps_process_auth_type_flags(wps, attr->auth_type_flags) ||
2513 wps_process_encr_type_flags(wps, attr->encr_type_flags) ||
2514 wps_process_conn_type_flags(wps, attr->conn_type_flags) ||
2515 wps_process_config_methods(wps, attr->config_methods) ||
2516 wps_process_wps_state(wps, attr->wps_state) ||
2517 wps_process_device_attrs(&wps->peer_dev, attr) ||
2518 wps_process_rf_bands(&wps->peer_dev, attr->rf_bands) ||
2519 wps_process_assoc_state(wps, attr->assoc_state) ||
2520 wps_process_dev_password_id(wps, attr->dev_password_id) ||
2521 wps_process_config_error(wps, attr->config_error) ||
2522 wps_process_os_version(&wps->peer_dev, attr->os_version))
2552 addr[0] = attr->public_key;
2553 sha256_vector(1, addr, &attr->public_key_len, hash);
2610 struct wps_parse_attr *attr)
2630 if (wps_process_registrar_nonce(wps, attr->registrar_nonce) ||
2631 wps_process_authenticator(wps, attr->authenticator, msg) ||
2632 wps_process_e_hash1(wps, attr->e_hash1) ||
2633 wps_process_e_hash2(wps, attr->e_hash2)) {
2645 struct wps_parse_attr *attr)
2668 if (wps_process_registrar_nonce(wps, attr->registrar_nonce) ||
2669 wps_process_authenticator(wps, attr->authenticator, msg)) {
2674 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
2675 attr->encr_settings_len);
2683 if (wps_validate_m5_encr(decrypted, attr->version2 != NULL) < 0) {
2741 struct wps_parse_attr *attr)
2749 if (wps_process_ap_settings(attr, &wps->cred) < 0)
2796 struct wps_parse_attr *attr)
2819 if (wps_process_registrar_nonce(wps, attr->registrar_nonce) ||
2820 wps_process_authenticator(wps, attr->authenticator, msg)) {
2825 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
2826 attr->encr_settings_len);
2835 attr->version2 != NULL) < 0) {
2862 struct wps_parse_attr attr;
2867 if (wps_parse_msg(msg, &attr) < 0)
2870 if (attr.msg_type == NULL) {
2876 if (*attr.msg_type != WPS_M1 &&
2877 (attr.registrar_nonce == NULL ||
2878 os_memcmp(wps->nonce_r, attr.registrar_nonce,
2884 switch (*attr.msg_type) {
2889 if (wps->wps->wps_upnp && attr.mac_addr) {
2895 wps->wps->wps_upnp, attr.mac_addr,
2899 ret = wps_process_m1(wps, &attr);
2904 ret = wps_process_m3(wps, msg, &attr);
2912 ret = wps_process_m5(wps, msg, &attr);
2920 ret = wps_process_m7(wps, msg, &attr);
2927 *attr.msg_type);
2945 struct wps_parse_attr attr;
2949 if (wps_parse_msg(msg, &attr) < 0)
2952 if (attr.msg_type == NULL) {
2957 if (*attr.msg_type != WPS_WSC_ACK) {
2959 *attr.msg_type);
2974 if (attr.registrar_nonce == NULL ||
2975 os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN) != 0)
2981 if (attr.enrollee_nonce == NULL ||
2982 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) {
3012 struct wps_parse_attr attr;
3021 if (wps_parse_msg(msg, &attr) < 0)
3024 if (attr.msg_type == NULL) {
3029 if (*attr.msg_type != WPS_WSC_NACK) {
3031 *attr.msg_type);
3043 if (attr.registrar_nonce == NULL ||
3044 os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN) != 0)
3050 if (attr.enrollee_nonce == NULL ||
3051 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) {
3056 if (attr.config_error == NULL) {
3062 config_error = WPA_GET_BE16(attr.config_error);
3094 struct wps_parse_attr attr;
3105 if (wps_parse_msg(msg, &attr) < 0)
3108 if (attr.msg_type == NULL) {
3113 if (*attr.msg_type != WPS_WSC_DONE) {
3115 *attr.msg_type);
3129 if (attr.registrar_nonce == NULL ||
3130 os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN) != 0)
3136 if (attr.enrollee_nonce == NULL ||
3137 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN) != 0) {
3221 struct wps_parse_attr attr;
3222 if (wps_parse_msg(msg, &attr) == 0 && attr.msg_type &&
3223 *attr.msg_type == WPS_M3)
3232 struct wps_parse_attr attr;
3234 if (wps_parse_msg(msg, &attr) < 0 || attr.msg_type == NULL)
3237 type = *attr.msg_type;