eapol/eapol_framework/eapol_common/include/ethernet_core.h
changeset 33 938269283a16
parent 2 1c7bc153c08e
child 46 c74b3d9f6b9e
child 49 43351a4f2da3
equal deleted inserted replaced
22:093cf0757204 33:938269283a16
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 19.1.2 %
    19 * %version: 33 %
    20 */
    20 */
    21 
    21 
    22 #if !defined(_ETHERNET_CORE_H_)
    22 #if !defined(_ETHERNET_CORE_H_)
    23 #define _ETHERNET_CORE_H_
    23 #define _ETHERNET_CORE_H_
    24 
    24 
    30 #include "eap_base_type.h"
    30 #include "eap_base_type.h"
    31 #include "eap_variable_data.h"
    31 #include "eap_variable_data.h"
    32 #include "eap_core_map.h"
    32 #include "eap_core_map.h"
    33 #include "abs_eap_stack_interface.h"
    33 #include "abs_eap_stack_interface.h"
    34 #include "eapol_rsna_key_header.h"
    34 #include "eapol_rsna_key_header.h"
       
    35 #include "eap_database_reference_if.h"
    35 
    36 
    36 
    37 
    37 /// This class defines the ethernet protocol layer.
    38 /// This class defines the ethernet protocol layer.
    38 class EAP_EXPORT ethernet_core_c
    39 class EAP_EXPORT ethernet_core_c
    39 : public abs_eapol_core_c
    40 : public abs_eapol_core_c
    40 , public abs_eap_stack_interface_c
    41 , public abs_eap_stack_interface_c
       
    42 , public eap_database_reference_if_c
    41 {
    43 {
    42 private:
    44 private:
    43 	//--------------------------------------------------
    45 	//--------------------------------------------------
    44 
    46 
    45 	abs_ethernet_core_c *m_partner;
    47 	abs_ethernet_core_c *m_partner;
   245 
   247 
   246 	// See abs_eap_core_c::get_eap_type_list().
   248 	// See abs_eap_core_c::get_eap_type_list().
   247 	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
   249 	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
   248 		eap_array_c<eap_type_value_e> * const eap_type_list);
   250 		eap_array_c<eap_type_value_e> * const eap_type_list);
   249 
   251 
   250 #if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
       
   251 	/**
   252 	/**
   252 	 * Function creates a state for later use. This is for optimazing 4-Way Handshake.
   253 	 * Function creates a state for later use. This is for optimazing 4-Way Handshake.
   253 	 * @param receive_network_id carries the MAC addresses.
   254 	 * @param receive_network_id carries the MAC addresses.
   254 	 * MAC address of Authenticator should be in source address. MAC address of 
   255 	 * MAC address of Authenticator should be in source address. MAC address of 
   255 	 * Supplicant should be in destination address.
   256 	 * Supplicant should be in destination address.
   257 	 */
   258 	 */
   258 	EAP_FUNC_IMPORT eap_status_e create_state(
   259 	EAP_FUNC_IMPORT eap_status_e create_state(
   259 		const eap_am_network_id_c * const receive_network_id,
   260 		const eap_am_network_id_c * const receive_network_id,
   260 		const eapol_key_authentication_type_e authentication_type
   261 		const eapol_key_authentication_type_e authentication_type
   261 		);
   262 		);
   262 #endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
   263 
   263 
   264 
   264 
       
   265 #if defined(USE_EAPOL_KEY_STATE)
       
   266 	/**
   265 	/**
   267 	 * This function need to be called when client STA (re)associates to AP.
   266 	 * This function need to be called when client STA (re)associates to AP.
   268 	 * @param receive_network_id carries the MAC addresses.
   267 	 * @param receive_network_id carries the MAC addresses.
   269 	 * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   268 	 * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   270 	 * @param authenticator_RSNA_IE is RSN IE of authenticator. Authenticator sends this in Beacon or Probe message.
   269 	 * @param authenticator_RSNA_IE is RSN IE of authenticator. Authenticator sends this in Beacon or Probe message.
   278 		const eap_variable_data_c * const authenticator_RSNA_IE,
   277 		const eap_variable_data_c * const authenticator_RSNA_IE,
   279 		const eap_variable_data_c * const supplicant_RSNA_IE,
   278 		const eap_variable_data_c * const supplicant_RSNA_IE,
   280 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_pairwise_cipher,
   279 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_pairwise_cipher,
   281 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_group_cipher,
   280 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_group_cipher,
   282 		const eap_variable_data_c * const pre_shared_key);
   281 		const eap_variable_data_c * const pre_shared_key);
   283 #endif //#if defined(USE_EAPOL_KEY_STATE)
   282 
   284 
       
   285 #if defined(USE_EAPOL_KEY_STATE)
       
   286 	/**
   283 	/**
   287 	 * This function need to be called when client STA disassociates from AP.
   284 	 * This function need to be called when client STA disassociates from AP.
   288 	 * @param receive_network_id carries the MAC addresses.
   285 	 * @param receive_network_id carries the MAC addresses.
   289 	 * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   286 	 * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   290 	 */
   287 	 */
   291 	EAP_FUNC_IMPORT eap_status_e disassociation(
   288 	EAP_FUNC_IMPORT eap_status_e disassociation(
       
   289 		const bool complete_to_lower_layer,
   292 		const eap_am_network_id_c * const receive_network_id
   290 		const eap_am_network_id_c * const receive_network_id
   293 		);
   291 		);
   294 #endif //#if defined(USE_EAPOL_KEY_STATE)
       
   295 
   292 
   296 	/// @see abs_eap_core_c::add_rogue_ap().
   293 	/// @see abs_eap_core_c::add_rogue_ap().
   297 	EAP_FUNC_IMPORT eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
   294 	EAP_FUNC_IMPORT eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
   298 
   295 
   299 	EAP_FUNC_IMPORT eap_status_e tkip_mic_failure(
   296 	EAP_FUNC_IMPORT eap_status_e tkip_mic_failure(
   300 		const eap_am_network_id_c * const receive_network_id,
   297 		const eap_am_network_id_c * const receive_network_id,
   301 		const bool fatal_failure_when_true,
   298 		const bool fatal_failure_when_true,
   302 		const eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type);
   299 		const eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type);
   303 
   300 
       
   301 	EAP_FUNC_IMPORT eap_status_e complete_check_pmksa_cache(
       
   302 		EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids);
       
   303 
       
   304 #if defined(USE_EAP_SIMPLE_CONFIG)
       
   305 
       
   306 	EAP_FUNC_IMPORT eap_status_e save_simple_config_session(
       
   307 		const simple_config_state_e state,
       
   308 		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
       
   309 		const eap_variable_data_c * const new_password,
       
   310 		const simple_config_Device_Password_ID_e Device_Password_ID,
       
   311 		const simple_config_payloads_c * const other_configuration);
       
   312 
       
   313 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
       
   314 
       
   315 	EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
       
   316 		const eap_variable_data_c * const reference);
       
   317 
       
   318 	EAP_FUNC_IMPORT eap_status_e get_802_11_authentication_mode(
       
   319 		const eap_am_network_id_c * const receive_network_id,
       
   320 		const eapol_key_authentication_type_e authentication_type,
       
   321 		const eap_variable_data_c * const SSID,
       
   322 		const eap_variable_data_c * const preshared_key);
       
   323 
       
   324 	EAP_FUNC_IMPORT eap_status_e complete_get_802_11_authentication_mode(
       
   325 		const eap_status_e completion_status,
       
   326 		const eap_am_network_id_c * const receive_network_id,
       
   327 		const eapol_key_802_11_authentication_mode_e mode);
       
   328 
       
   329 	EAP_FUNC_IMPORT eap_status_e complete_disassociation(
       
   330 		const bool complete_to_lower_layer,
       
   331 		const eap_am_network_id_c * const receive_network_id);
       
   332 
   304 	//--------------------------------------------------
   333 	//--------------------------------------------------
   305 }; // class ethernet_core_c
   334 }; // class ethernet_core_c
   306 
   335 
   307 #endif //#if !defined(_ETHERNET_CORE_H_)
   336 #endif //#if !defined(_ETHERNET_CORE_H_)
   308 
   337