eapol/eapol_framework/eapol_common/include/eapol_message_wlan_authentication.h
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 32 %
    19 * %version: 25.1.2 %
    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_eap_database_reference_if.h"
    30 #include "abs_eapol_wlan_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
    43 {
    44 {
    44 
    45 
    45 private:
    46 private:
    46 
    47 
    47 	/// This is pointer to the tools class.
    48 	/// This is pointer to the tools class.
    59 	u32_t m_MTU;
    60 	u32_t m_MTU;
    60 	u32_t m_trailer_length;
    61 	u32_t m_trailer_length;
    61 
    62 
    62 	wlan_eap_if_send_status_e m_error_code;
    63 	wlan_eap_if_send_status_e m_error_code;
    63 
    64 
    64 	eap_tlv_message_type_function_e m_error_function;
    65 	eapol_tlv_message_type_function_e m_error_function;
    65 
    66 
    66 	bool m_use_asyncronous_test;
    67 	bool m_use_asyncronous_test;
    67 
    68 
    68 	bool m_is_valid;
    69 	bool m_is_valid;
    69 
    70 
   111 	EAP_FUNC_IMPORT eap_status_e update_wlan_database_reference_values(
   112 	EAP_FUNC_IMPORT eap_status_e update_wlan_database_reference_values(
   112 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   113 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   113 
   114 
   114 	EAP_FUNC_IMPORT eap_status_e send_error_message(
   115 	EAP_FUNC_IMPORT eap_status_e send_error_message(
   115 		const eap_status_e status,
   116 		const eap_status_e status,
   116 		const eap_tlv_message_type_function_e function);
   117 		const eapol_tlv_message_type_function_e function);
   117 
   118 
   118 	EAP_FUNC_IMPORT eap_status_e process_message_type_error(
   119 	EAP_FUNC_IMPORT eap_status_e process_message_type_error(
   119 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   120 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   120 
   121 
   121 	EAP_FUNC_IMPORT eap_status_e process_message(eapol_handle_tlv_message_data_c * const message);
   122 	EAP_FUNC_IMPORT eap_status_e process_message(eapol_handle_tlv_message_data_c * const message);
   124 
   125 
   125 	// ----------------------------------------------------------------------
   126 	// ----------------------------------------------------------------------
   126 
   127 
   127 public:
   128 public:
   128 
   129 
   129 	EAP_FUNC_IMPORT virtual ~eapol_message_wlan_authentication_c();
   130 	EAP_FUNC_IMPORT ~eapol_message_wlan_authentication_c();
   130 
   131 
   131 	EAP_FUNC_IMPORT eapol_message_wlan_authentication_c(
   132 	EAP_FUNC_IMPORT eapol_message_wlan_authentication_c(
   132 		abs_eap_am_tools_c * const tools,
   133 		abs_eap_am_tools_c * const tools,
   133 		abs_eapol_message_wlan_authentication_c * const partner);
   134 		abs_eapol_message_wlan_authentication_c * const partner);
   134 
   135 
   212 
   213 
   213 	// The previous functions are from abs_eapol_wlan_authentication_c.
   214 	// The previous functions are from abs_eapol_wlan_authentication_c.
   214 	// ----------------------------------------------------------------
   215 	// ----------------------------------------------------------------
   215 
   216 
   216 
   217 
       
   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 
   217 	/// Function receives the data message from lower layer.
   229 	/// Function receives the data message from lower layer.
   218 	/// Data is formatted to Attribute-Value Pairs.
   230 	/// Data is formatted to Attribute-Value Pairs.
   219 	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
   231 	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
   220 	EAP_FUNC_IMPORT wlan_eap_if_send_status_e process_data(const void * const data, const u32_t length);
   232 	EAP_FUNC_IMPORT wlan_eap_if_send_status_e process_data(const void * const data, const u32_t length);
   221 
   233 
   230 		const simple_config_Device_Password_ID_e Device_Password_ID,
   242 		const simple_config_Device_Password_ID_e Device_Password_ID,
   231 		const simple_config_payloads_c * const other_configuration);
   243 		const simple_config_payloads_c * const other_configuration);
   232 
   244 
   233 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
   245 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
   234 
   246 
   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 
       
   241 	// ----------------------------------------------------------------------
   247 	// ----------------------------------------------------------------------
   242 };
   248 };
   243 
   249 
   244 #endif //#if !defined(EAPOL_MESSAGE_WLAN_AUTHENTICATION_H)
   250 #endif //#if !defined(EAPOL_MESSAGE_WLAN_AUTHENTICATION_H)
   245 
   251