Lines Matching refs:msg
278 void wps_fail_event(struct wps_context *wps, enum wps_msg_type msg, in wps_fail_event() argument
287 data.fail.msg = msg; in wps_fail_event()
453 struct wpabuf msg; in wps_oob_use_cred() local
461 wpabuf_set(&msg, attr->cred[i], attr->cred_len[i]); in wps_oob_use_cred()
462 if (wps_parse_msg(&msg, &cattr) < 0 || in wps_oob_use_cred()
593 struct wpabuf *msg; in wps_build_wsc_ack() local
597 msg = wpabuf_alloc(1000); in wps_build_wsc_ack()
598 if (msg == NULL) in wps_build_wsc_ack()
601 if (wps_build_version(msg) || in wps_build_wsc_ack()
602 wps_build_msg_type(msg, WPS_WSC_ACK) || in wps_build_wsc_ack()
603 wps_build_enrollee_nonce(wps, msg) || in wps_build_wsc_ack()
604 wps_build_registrar_nonce(wps, msg) || in wps_build_wsc_ack()
605 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_wsc_ack()
606 wpabuf_free(msg); in wps_build_wsc_ack()
610 return msg; in wps_build_wsc_ack()
616 struct wpabuf *msg; in wps_build_wsc_nack() local
620 msg = wpabuf_alloc(1000); in wps_build_wsc_nack()
621 if (msg == NULL) in wps_build_wsc_nack()
624 if (wps_build_version(msg) || in wps_build_wsc_nack()
625 wps_build_msg_type(msg, WPS_WSC_NACK) || in wps_build_wsc_nack()
626 wps_build_enrollee_nonce(wps, msg) || in wps_build_wsc_nack()
627 wps_build_registrar_nonce(wps, msg) || in wps_build_wsc_nack()
628 wps_build_config_error(msg, wps->config_error) || in wps_build_wsc_nack()
629 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_wsc_nack()
630 wpabuf_free(msg); in wps_build_wsc_nack()
634 return msg; in wps_build_wsc_nack()
722 struct wpabuf *msg; in wps_build_nfc_handover_req() local
737 msg = wpabuf_alloc(1000); in wps_build_nfc_handover_req()
738 if (msg == NULL) in wps_build_nfc_handover_req()
739 return msg; in wps_build_nfc_handover_req()
740 len = wpabuf_put(msg, 2); in wps_build_nfc_handover_req()
742 if (wps_build_oob_dev_pw(msg, DEV_PW_NFC_CONNECTION_HANDOVER, in wps_build_nfc_handover_req()
744 wps_build_uuid_e(msg, ctx->uuid) || in wps_build_nfc_handover_req()
745 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_nfc_handover_req()
746 wpabuf_free(msg); in wps_build_nfc_handover_req()
750 WPA_PUT_BE16(len, wpabuf_len(msg) - 2); in wps_build_nfc_handover_req()
752 return msg; in wps_build_nfc_handover_req()
756 static int wps_build_ssid(struct wpabuf *msg, struct wps_context *wps) in wps_build_ssid() argument
761 wpabuf_put_be16(msg, ATTR_SSID); in wps_build_ssid()
762 wpabuf_put_be16(msg, wps->ssid_len); in wps_build_ssid()
763 wpabuf_put_data(msg, wps->ssid, wps->ssid_len); in wps_build_ssid()
768 static int wps_build_ap_freq(struct wpabuf *msg, int freq) in wps_build_ap_freq() argument
791 if (wps_build_rf_bands_attr(msg, rf_band) || in wps_build_ap_freq()
792 wps_build_ap_channel(msg, ap_channel)) in wps_build_ap_freq()
803 struct wpabuf *msg; in wps_build_nfc_handover_sel() local
818 msg = wpabuf_alloc(1000); in wps_build_nfc_handover_sel()
819 if (msg == NULL) in wps_build_nfc_handover_sel()
820 return msg; in wps_build_nfc_handover_sel()
821 len = wpabuf_put(msg, 2); in wps_build_nfc_handover_sel()
823 if (wps_build_oob_dev_pw(msg, DEV_PW_NFC_CONNECTION_HANDOVER, in wps_build_nfc_handover_sel()
825 wps_build_ssid(msg, ctx) || in wps_build_nfc_handover_sel()
826 wps_build_ap_freq(msg, freq) || in wps_build_nfc_handover_sel()
827 (bssid && wps_build_mac_addr(msg, bssid)) || in wps_build_nfc_handover_sel()
828 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_nfc_handover_sel()
829 wpabuf_free(msg); in wps_build_nfc_handover_sel()
833 WPA_PUT_BE16(len, wpabuf_len(msg) - 2); in wps_build_nfc_handover_sel()
835 return msg; in wps_build_nfc_handover_sel()
842 struct wpabuf *msg; in wps_build_nfc_handover_req_p2p() local
855 msg = wpabuf_alloc(1000); in wps_build_nfc_handover_req_p2p()
856 if (msg == NULL) in wps_build_nfc_handover_req_p2p()
857 return msg; in wps_build_nfc_handover_req_p2p()
859 if (wps_build_manufacturer(&ctx->dev, msg) || in wps_build_nfc_handover_req_p2p()
860 wps_build_model_name(&ctx->dev, msg) || in wps_build_nfc_handover_req_p2p()
861 wps_build_model_number(&ctx->dev, msg) || in wps_build_nfc_handover_req_p2p()
862 wps_build_oob_dev_pw(msg, DEV_PW_NFC_CONNECTION_HANDOVER, in wps_build_nfc_handover_req_p2p()
864 wps_build_rf_bands(&ctx->dev, msg, 0) || in wps_build_nfc_handover_req_p2p()
865 wps_build_serial_number(&ctx->dev, msg) || in wps_build_nfc_handover_req_p2p()
866 wps_build_uuid_e(msg, ctx->uuid) || in wps_build_nfc_handover_req_p2p()
867 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_nfc_handover_req_p2p()
868 wpabuf_free(msg); in wps_build_nfc_handover_req_p2p()
872 return msg; in wps_build_nfc_handover_req_p2p()
881 struct wpabuf *msg; in wps_build_nfc_handover_sel_p2p() local
899 msg = wpabuf_alloc(1000); in wps_build_nfc_handover_sel_p2p()
900 if (msg == NULL) in wps_build_nfc_handover_sel_p2p()
901 return msg; in wps_build_nfc_handover_sel_p2p()
911 if (wps_build_manufacturer(&ctx->dev, msg) || in wps_build_nfc_handover_sel_p2p()
912 wps_build_model_name(&ctx->dev, msg) || in wps_build_nfc_handover_sel_p2p()
913 wps_build_model_number(&ctx->dev, msg) || in wps_build_nfc_handover_sel_p2p()
914 wps_build_oob_dev_pw(msg, nfc_dev_pw_id, nfc_dh_pubkey, in wps_build_nfc_handover_sel_p2p()
916 wps_build_rf_bands(&ctx->dev, msg, 0) || in wps_build_nfc_handover_sel_p2p()
917 wps_build_serial_number(&ctx->dev, msg) || in wps_build_nfc_handover_sel_p2p()
918 wps_build_uuid_e(msg, ctx->uuid) || in wps_build_nfc_handover_sel_p2p()
919 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_nfc_handover_sel_p2p()
920 wpabuf_free(msg); in wps_build_nfc_handover_sel_p2p()
924 return msg; in wps_build_nfc_handover_sel_p2p()