Lines Matching refs:attr

662 	struct wps_parse_attr attr;
668 if (wps_parse_msg(&msg, &attr) < 0 ||
669 wps_process_cred(&attr, &wps->cred))
723 struct wps_parse_attr *attr,
731 if (wps_process_ap_settings(attr, &cred) < 0)
764 struct wps_parse_attr *attr)
775 if (wps_process_registrar_nonce(wps, attr->registrar_nonce) ||
776 wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
777 wps_process_uuid_r(wps, attr->uuid_r)) {
791 if (wps_process_pubkey(wps, attr->public_key, attr->public_key_len) ||
792 wps_process_authenticator(wps, attr->authenticator, msg) ||
793 wps_process_device_attrs(&wps->peer_dev, attr)) {
804 struct wps_parse_attr *attr)
816 attr->manufacturer, attr->manufacturer_len);
818 attr->model_name, attr->model_name_len);
820 attr->model_number, attr->model_number_len);
822 attr->serial_number, attr->serial_number_len);
824 attr->dev_name, attr->dev_name_len);
830 if (attr->config_methods)
832 WPA_GET_BE16(attr->config_methods);
833 m2d->manufacturer = attr->manufacturer;
834 m2d->manufacturer_len = attr->manufacturer_len;
835 m2d->model_name = attr->model_name;
836 m2d->model_name_len = attr->model_name_len;
837 m2d->model_number = attr->model_number;
838 m2d->model_number_len = attr->model_number_len;
839 m2d->serial_number = attr->serial_number;
840 m2d->serial_number_len = attr->serial_number_len;
841 m2d->dev_name = attr->dev_name;
842 m2d->dev_name_len = attr->dev_name_len;
843 m2d->primary_dev_type = attr->primary_dev_type;
844 if (attr->config_error)
846 WPA_GET_BE16(attr->config_error);
847 if (attr->dev_password_id)
849 WPA_GET_BE16(attr->dev_password_id);
860 struct wps_parse_attr *attr)
874 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
875 wps_process_authenticator(wps, attr->authenticator, msg) ||
876 wps_process_r_hash1(wps, attr->r_hash1) ||
877 wps_process_r_hash2(wps, attr->r_hash2)) {
882 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
883 attr->encr_settings_len);
909 struct wps_parse_attr *attr)
923 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
924 wps_process_authenticator(wps, attr->authenticator, msg)) {
929 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
930 attr->encr_settings_len);
956 struct wps_parse_attr *attr)
970 if (wps_process_enrollee_nonce(wps, attr->enrollee_nonce) ||
971 wps_process_authenticator(wps, attr->authenticator, msg)) {
976 decrypted = wps_decrypt_encr_settings(wps, attr->encr_settings,
977 attr->encr_settings_len);
1006 struct wps_parse_attr attr;
1011 if (wps_parse_msg(msg, &attr) < 0)
1014 if (!wps_version_supported(attr.version)) {
1016 attr.version ? *attr.version : 0);
1020 if (attr.enrollee_nonce == NULL ||
1021 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN != 0)) {
1026 if (attr.msg_type == NULL) {
1031 switch (*attr.msg_type) {
1033 ret = wps_process_m2(wps, msg, &attr);
1036 ret = wps_process_m2d(wps, &attr);
1039 ret = wps_process_m4(wps, msg, &attr);
1044 ret = wps_process_m6(wps, msg, &attr);
1049 ret = wps_process_m8(wps, msg, &attr);
1055 *attr.msg_type);
1066 if (ret == WPS_CONTINUE && *attr.msg_type != WPS_M2D) {
1080 struct wps_parse_attr attr;
1084 if (wps_parse_msg(msg, &attr) < 0)
1087 if (!wps_version_supported(attr.version)) {
1089 attr.version ? *attr.version : 0);
1093 if (attr.msg_type == NULL) {
1098 if (*attr.msg_type != WPS_WSC_ACK) {
1100 *attr.msg_type);
1104 if (attr.registrar_nonce == NULL ||
1105 os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN != 0))
1111 if (attr.enrollee_nonce == NULL ||
1112 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN != 0)) {
1132 struct wps_parse_attr attr;
1136 if (wps_parse_msg(msg, &attr) < 0)
1139 if (!wps_version_supported(attr.version)) {
1141 attr.version ? *attr.version : 0);
1145 if (attr.msg_type == NULL) {
1150 if (*attr.msg_type != WPS_WSC_NACK) {
1152 *attr.msg_type);
1156 if (attr.registrar_nonce == NULL ||
1157 os_memcmp(wps->nonce_r, attr.registrar_nonce, WPS_NONCE_LEN != 0))
1161 attr.registrar_nonce, WPS_NONCE_LEN);
1167 if (attr.enrollee_nonce == NULL ||
1168 os_memcmp(wps->nonce_e, attr.enrollee_nonce, WPS_NONCE_LEN != 0)) {
1171 attr.enrollee_nonce, WPS_NONCE_LEN);
1177 if (attr.config_error == NULL) {
1184 "Configuration Error %d", WPA_GET_BE16(attr.config_error));
1219 struct wps_parse_attr attr;
1220 if (wps_parse_msg(msg, &attr) == 0 && attr.msg_type) {
1221 if (*attr.msg_type == WPS_WSC_ACK)
1223 else if (*attr.msg_type == WPS_WSC_NACK)