LCOV - code coverage report
Current view: top level - src/eap_common - eap_wsc_common.c (source / functions) Hit Total Coverage
Test: wpa_supplicant/hostapd combined for hwsim test run 1443382998 Lines: 7 9 77.8 %
Date: 2015-09-27 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /*
       2             :  * EAP-WSC common routines for Wi-Fi Protected Setup
       3             :  * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
       4             :  *
       5             :  * This software may be distributed under the terms of the BSD license.
       6             :  * See README for more details.
       7             :  */
       8             : 
       9             : #include "includes.h"
      10             : 
      11             : #include "common.h"
      12             : #include "eap_defs.h"
      13             : #include "eap_common.h"
      14             : #include "wps/wps.h"
      15             : #include "eap_wsc_common.h"
      16             : 
      17          89 : struct wpabuf * eap_wsc_build_frag_ack(u8 id, u8 code)
      18             : {
      19             :         struct wpabuf *msg;
      20             : 
      21          89 :         msg = eap_msg_alloc(EAP_VENDOR_WFA, EAP_VENDOR_TYPE_WSC, 2, code, id);
      22          89 :         if (msg == NULL) {
      23           0 :                 wpa_printf(MSG_ERROR, "EAP-WSC: Failed to allocate memory for "
      24             :                            "FRAG_ACK");
      25           0 :                 return NULL;
      26             :         }
      27             : 
      28          89 :         wpa_printf(MSG_DEBUG, "EAP-WSC: Send WSC/FRAG_ACK");
      29          89 :         wpabuf_put_u8(msg, WSC_FRAG_ACK); /* Op-Code */
      30          89 :         wpabuf_put_u8(msg, 0); /* Flags */
      31             : 
      32          89 :         return msg;
      33             : }

Generated by: LCOV version 1.10