Lines Matching refs:msg

272 void wps_fail_event(struct wps_context *wps, enum wps_msg_type msg,  in wps_fail_event()  argument
281 data.fail.msg = msg; in wps_fail_event()
437 struct wpabuf msg; in wps_oob_use_cred() local
445 wpabuf_set(&msg, attr->cred[i], attr->cred_len[i]); in wps_oob_use_cred()
446 if (wps_parse_msg(&msg, &cattr) < 0 || in wps_oob_use_cred()
577 struct wpabuf *msg; in wps_build_wsc_ack() local
581 msg = wpabuf_alloc(1000); in wps_build_wsc_ack()
582 if (msg == NULL) in wps_build_wsc_ack()
585 if (wps_build_version(msg) || in wps_build_wsc_ack()
586 wps_build_msg_type(msg, WPS_WSC_ACK) || in wps_build_wsc_ack()
587 wps_build_enrollee_nonce(wps, msg) || in wps_build_wsc_ack()
588 wps_build_registrar_nonce(wps, msg) || in wps_build_wsc_ack()
589 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_wsc_ack()
590 wpabuf_free(msg); in wps_build_wsc_ack()
594 return msg; in wps_build_wsc_ack()
600 struct wpabuf *msg; in wps_build_wsc_nack() local
604 msg = wpabuf_alloc(1000); in wps_build_wsc_nack()
605 if (msg == NULL) in wps_build_wsc_nack()
608 if (wps_build_version(msg) || in wps_build_wsc_nack()
609 wps_build_msg_type(msg, WPS_WSC_NACK) || in wps_build_wsc_nack()
610 wps_build_enrollee_nonce(wps, msg) || in wps_build_wsc_nack()
611 wps_build_registrar_nonce(wps, msg) || in wps_build_wsc_nack()
612 wps_build_config_error(msg, wps->config_error) || in wps_build_wsc_nack()
613 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_wsc_nack()
614 wpabuf_free(msg); in wps_build_wsc_nack()
618 return msg; in wps_build_wsc_nack()
706 struct wpabuf *msg; in wps_build_nfc_handover_req() local
721 msg = wpabuf_alloc(1000); in wps_build_nfc_handover_req()
722 if (msg == NULL) in wps_build_nfc_handover_req()
723 return msg; in wps_build_nfc_handover_req()
724 len = wpabuf_put(msg, 2); in wps_build_nfc_handover_req()
726 if (wps_build_oob_dev_pw(msg, DEV_PW_NFC_CONNECTION_HANDOVER, in wps_build_nfc_handover_req()
728 wps_build_uuid_e(msg, ctx->uuid) || in wps_build_nfc_handover_req()
729 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_nfc_handover_req()
730 wpabuf_free(msg); in wps_build_nfc_handover_req()
734 WPA_PUT_BE16(len, wpabuf_len(msg) - 2); in wps_build_nfc_handover_req()
736 return msg; in wps_build_nfc_handover_req()
740 static int wps_build_ssid(struct wpabuf *msg, struct wps_context *wps) in wps_build_ssid() argument
745 wpabuf_put_be16(msg, ATTR_SSID); in wps_build_ssid()
746 wpabuf_put_be16(msg, wps->ssid_len); in wps_build_ssid()
747 wpabuf_put_data(msg, wps->ssid, wps->ssid_len); in wps_build_ssid()
752 static int wps_build_ap_freq(struct wpabuf *msg, int freq) in wps_build_ap_freq() argument
775 if (wps_build_rf_bands_attr(msg, rf_band) || in wps_build_ap_freq()
776 wps_build_ap_channel(msg, ap_channel)) in wps_build_ap_freq()
787 struct wpabuf *msg; in wps_build_nfc_handover_sel() local
802 msg = wpabuf_alloc(1000); in wps_build_nfc_handover_sel()
803 if (msg == NULL) in wps_build_nfc_handover_sel()
804 return msg; in wps_build_nfc_handover_sel()
805 len = wpabuf_put(msg, 2); in wps_build_nfc_handover_sel()
807 if (wps_build_oob_dev_pw(msg, DEV_PW_NFC_CONNECTION_HANDOVER, in wps_build_nfc_handover_sel()
809 wps_build_ssid(msg, ctx) || in wps_build_nfc_handover_sel()
810 wps_build_ap_freq(msg, freq) || in wps_build_nfc_handover_sel()
811 (bssid && wps_build_mac_addr(msg, bssid)) || in wps_build_nfc_handover_sel()
812 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_nfc_handover_sel()
813 wpabuf_free(msg); in wps_build_nfc_handover_sel()
817 WPA_PUT_BE16(len, wpabuf_len(msg) - 2); in wps_build_nfc_handover_sel()
819 return msg; in wps_build_nfc_handover_sel()
826 struct wpabuf *msg; in wps_build_nfc_handover_req_p2p() local
839 msg = wpabuf_alloc(1000); in wps_build_nfc_handover_req_p2p()
840 if (msg == NULL) in wps_build_nfc_handover_req_p2p()
841 return msg; in wps_build_nfc_handover_req_p2p()
843 if (wps_build_manufacturer(&ctx->dev, msg) || in wps_build_nfc_handover_req_p2p()
844 wps_build_model_name(&ctx->dev, msg) || in wps_build_nfc_handover_req_p2p()
845 wps_build_model_number(&ctx->dev, msg) || in wps_build_nfc_handover_req_p2p()
846 wps_build_oob_dev_pw(msg, DEV_PW_NFC_CONNECTION_HANDOVER, in wps_build_nfc_handover_req_p2p()
848 wps_build_rf_bands(&ctx->dev, msg, 0) || in wps_build_nfc_handover_req_p2p()
849 wps_build_serial_number(&ctx->dev, msg) || in wps_build_nfc_handover_req_p2p()
850 wps_build_uuid_e(msg, ctx->uuid) || in wps_build_nfc_handover_req_p2p()
851 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_nfc_handover_req_p2p()
852 wpabuf_free(msg); in wps_build_nfc_handover_req_p2p()
856 return msg; in wps_build_nfc_handover_req_p2p()
865 struct wpabuf *msg; in wps_build_nfc_handover_sel_p2p() local
883 msg = wpabuf_alloc(1000); in wps_build_nfc_handover_sel_p2p()
884 if (msg == NULL) in wps_build_nfc_handover_sel_p2p()
885 return msg; in wps_build_nfc_handover_sel_p2p()
895 if (wps_build_manufacturer(&ctx->dev, msg) || in wps_build_nfc_handover_sel_p2p()
896 wps_build_model_name(&ctx->dev, msg) || in wps_build_nfc_handover_sel_p2p()
897 wps_build_model_number(&ctx->dev, msg) || in wps_build_nfc_handover_sel_p2p()
898 wps_build_oob_dev_pw(msg, nfc_dev_pw_id, nfc_dh_pubkey, in wps_build_nfc_handover_sel_p2p()
900 wps_build_rf_bands(&ctx->dev, msg, 0) || in wps_build_nfc_handover_sel_p2p()
901 wps_build_serial_number(&ctx->dev, msg) || in wps_build_nfc_handover_sel_p2p()
902 wps_build_uuid_e(msg, ctx->uuid) || in wps_build_nfc_handover_sel_p2p()
903 wps_build_wfa_ext(msg, 0, NULL, 0, 0)) { in wps_build_nfc_handover_sel_p2p()
904 wpabuf_free(msg); in wps_build_nfc_handover_sel_p2p()
908 return msg; in wps_build_nfc_handover_sel_p2p()