eap_wsc_common.c
Go to the documentation of this file.00001
00016 #include "includes.h"
00017
00018 #include "common.h"
00019 #include "eap_defs.h"
00020 #include "eap_common.h"
00021 #include "wps/wps.h"
00022 #include "eap_wsc_common.h"
00023
00024 struct wpabuf * eap_wsc_build_frag_ack(u8 id, u8 code)
00025 {
00026 struct wpabuf *msg;
00027
00028 msg = eap_msg_alloc(EAP_VENDOR_WFA, EAP_VENDOR_TYPE_WSC, 2, code, id);
00029 if (msg == NULL) {
00030 wpa_printf(MSG_ERROR, "EAP-WSC: Failed to allocate memory for "
00031 "FRAG_ACK");
00032 return NULL;
00033 }
00034
00035 wpa_printf(MSG_DEBUG, "EAP-WSC: Send WSC/FRAG_ACK");
00036 wpabuf_put_u8(msg, WSC_FRAG_ACK);
00037 wpabuf_put_u8(msg, 0);
00038
00039 return msg;
00040 }
00041