eapol/eapol_framework/eapol_common/include/eapol_message_wlan_authentication.h
branchRCL_3
changeset 18 bad0cc58d154
parent 2 1c7bc153c08e
child 19 c74b3d9f6b9e
equal deleted inserted replaced
17:30e048a7b597 18:bad0cc58d154
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 25.1.2 %
    19 * %version: 32 %
    20 */
    20 */
    21 
    21 
    22 #if !defined(EAPOL_MESSAGE_WLAN_AUTHENTICATION_H)
    22 #if !defined(EAPOL_MESSAGE_WLAN_AUTHENTICATION_H)
    23 #define EAPOL_MESSAGE_WLAN_AUTHENTICATION_H
    23 #define EAPOL_MESSAGE_WLAN_AUTHENTICATION_H
    24 
    24 
    25 
    25 
    26 #include "eapol_wlan_authentication.h"
    26 #include "eapol_wlan_authentication.h"
    27 #include "eapol_ethernet_header.h"
    27 #include "eapol_ethernet_header.h"
    28 #include "eap_file_config.h"
    28 #include "eap_file_config.h"
    29 //#include <eap_am_file_input_stdio.h>
    29 //#include <eap_am_file_input_stdio.h>
    30 #include "abs_eapol_wlan_database_reference_if.h"
    30 #include "abs_eap_database_reference_if.h"
    31 #include "abs_eapol_message_wlan_authentication.h"
    31 #include "abs_eapol_message_wlan_authentication.h"
    32 #include "eapol_handle_tlv_message_data.h"
    32 #include "eapol_handle_tlv_message_data.h"
    33 
    33 
    34 /** @file */
    34 /** @file */
    35 
    35 
    38 /// This class is the common part of EAPOL message interface.
    38 /// This class is the common part of EAPOL message interface.
    39 /// This class implements the message creation and parsing function.
    39 /// This class implements the message creation and parsing function.
    40 class eapol_message_wlan_authentication_c
    40 class eapol_message_wlan_authentication_c
    41 : public abs_eapol_wlan_authentication_c
    41 : public abs_eapol_wlan_authentication_c
    42 , public abs_eap_base_timer_c
    42 , public abs_eap_base_timer_c
    43 , public abs_eapol_wlan_database_reference_if_c
       
    44 {
    43 {
    45 
    44 
    46 private:
    45 private:
    47 
    46 
    48 	/// This is pointer to the tools class.
    47 	/// This is pointer to the tools class.
    60 	u32_t m_MTU;
    59 	u32_t m_MTU;
    61 	u32_t m_trailer_length;
    60 	u32_t m_trailer_length;
    62 
    61 
    63 	wlan_eap_if_send_status_e m_error_code;
    62 	wlan_eap_if_send_status_e m_error_code;
    64 
    63 
    65 	eapol_tlv_message_type_function_e m_error_function;
    64 	eap_tlv_message_type_function_e m_error_function;
    66 
    65 
    67 	bool m_use_asyncronous_test;
    66 	bool m_use_asyncronous_test;
    68 
    67 
    69 	bool m_is_valid;
    68 	bool m_is_valid;
    70 
    69 
   112 	EAP_FUNC_IMPORT eap_status_e update_wlan_database_reference_values(
   111 	EAP_FUNC_IMPORT eap_status_e update_wlan_database_reference_values(
   113 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   112 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   114 
   113 
   115 	EAP_FUNC_IMPORT eap_status_e send_error_message(
   114 	EAP_FUNC_IMPORT eap_status_e send_error_message(
   116 		const eap_status_e status,
   115 		const eap_status_e status,
   117 		const eapol_tlv_message_type_function_e function);
   116 		const eap_tlv_message_type_function_e function);
   118 
   117 
   119 	EAP_FUNC_IMPORT eap_status_e process_message_type_error(
   118 	EAP_FUNC_IMPORT eap_status_e process_message_type_error(
   120 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   119 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   121 
   120 
   122 	EAP_FUNC_IMPORT eap_status_e process_message(eapol_handle_tlv_message_data_c * const message);
   121 	EAP_FUNC_IMPORT eap_status_e process_message(eapol_handle_tlv_message_data_c * const message);
   125 
   124 
   126 	// ----------------------------------------------------------------------
   125 	// ----------------------------------------------------------------------
   127 
   126 
   128 public:
   127 public:
   129 
   128 
   130 	EAP_FUNC_IMPORT ~eapol_message_wlan_authentication_c();
   129 	EAP_FUNC_IMPORT virtual ~eapol_message_wlan_authentication_c();
   131 
   130 
   132 	EAP_FUNC_IMPORT eapol_message_wlan_authentication_c(
   131 	EAP_FUNC_IMPORT eapol_message_wlan_authentication_c(
   133 		abs_eap_am_tools_c * const tools,
   132 		abs_eap_am_tools_c * const tools,
   134 		abs_eapol_message_wlan_authentication_c * const partner);
   133 		abs_eapol_message_wlan_authentication_c * const partner);
   135 
   134 
   213 
   212 
   214 	// The previous functions are from abs_eapol_wlan_authentication_c.
   213 	// The previous functions are from abs_eapol_wlan_authentication_c.
   215 	// ----------------------------------------------------------------
   214 	// ----------------------------------------------------------------
   216 
   215 
   217 
   216 
   218 	// ----------------------------------------------------------------------
       
   219 	// The following function is from abs_eapol_wlan_database_reference_if_c.
       
   220 
       
   221 	// Look at abs_eapol_wlan_database_reference_if_c::get_wlan_database_reference_values().
       
   222 	EAP_FUNC_IMPORT eap_status_e get_wlan_database_reference_values(
       
   223 		eap_variable_data_c * const reference) const;
       
   224 
       
   225 	// The previous function is from abs_eapol_wlan_database_reference_if_c.
       
   226 	// ----------------------------------------------------------------------
       
   227 
       
   228 
       
   229 	/// Function receives the data message from lower layer.
   217 	/// Function receives the data message from lower layer.
   230 	/// Data is formatted to Attribute-Value Pairs.
   218 	/// Data is formatted to Attribute-Value Pairs.
   231 	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
   219 	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
   232 	EAP_FUNC_IMPORT wlan_eap_if_send_status_e process_data(const void * const data, const u32_t length);
   220 	EAP_FUNC_IMPORT wlan_eap_if_send_status_e process_data(const void * const data, const u32_t length);
   233 
   221 
   242 		const simple_config_Device_Password_ID_e Device_Password_ID,
   230 		const simple_config_Device_Password_ID_e Device_Password_ID,
   243 		const simple_config_payloads_c * const other_configuration);
   231 		const simple_config_payloads_c * const other_configuration);
   244 
   232 
   245 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
   233 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
   246 
   234 
       
   235 	EAP_FUNC_IMPORT eap_status_e complete_check_pmksa_cache(
       
   236 		EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids);
       
   237 
       
   238 	EAP_FUNC_IMPORT eap_status_e complete_disassociation(
       
   239 		const eap_am_network_id_c * const receive_network_id);
       
   240 
   247 	// ----------------------------------------------------------------------
   241 	// ----------------------------------------------------------------------
   248 };
   242 };
   249 
   243 
   250 #endif //#if !defined(EAPOL_MESSAGE_WLAN_AUTHENTICATION_H)
   244 #endif //#if !defined(EAPOL_MESSAGE_WLAN_AUTHENTICATION_H)
   251 
   245