eapol/eapol_framework/eapol_common/include/eapol_core.h
changeset 49 43351a4f2da3
parent 26 9abfd4f00d37
equal deleted inserted replaced
47:712b4ffd76bb 49:43351a4f2da3
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 47 %
    19 * %version: 49 %
    20 */
    20 */
    21 
    21 
    22 #if !defined(_EAPOL_CORE_H_)
    22 #if !defined(_EAPOL_CORE_H_)
    23 #define _EAPOL_CORE_H_
    23 #define _EAPOL_CORE_H_
    24 
    24 
    25 #include "eap_tools.h"
    25 #include "eap_tools.h"
    26 #include "eap_am_export.h"
    26 #include "eap_am_export.h"
       
    27 // Start: added by script change_export_macros.sh.
       
    28 #if defined(EAP_NO_EXPORT_EAPOL_CORE_H)
       
    29 	#define EAP_CLASS_VISIBILITY_EAPOL_CORE_H EAP_NONSHARABLE 
       
    30 	#define EAP_FUNC_VISIBILITY_EAPOL_CORE_H 
       
    31 	#define EAP_C_FUNC_VISIBILITY_EAPOL_CORE_H 
       
    32 	#define EAP_FUNC_EXPORT_EAPOL_CORE_H 
       
    33 	#define EAP_C_FUNC_EXPORT_EAPOL_CORE_H 
       
    34 #elif defined(EAP_EXPORT_EAPOL_CORE_H)
       
    35 	#define EAP_CLASS_VISIBILITY_EAPOL_CORE_H EAP_EXPORT 
       
    36 	#define EAP_FUNC_VISIBILITY_EAPOL_CORE_H EAP_FUNC_EXPORT 
       
    37 	#define EAP_C_FUNC_VISIBILITY_EAPOL_CORE_H EAP_C_FUNC_EXPORT 
       
    38 	#define EAP_FUNC_EXPORT_EAPOL_CORE_H EAP_FUNC_EXPORT 
       
    39 	#define EAP_C_FUNC_EXPORT_EAPOL_CORE_H EAP_C_FUNC_EXPORT 
       
    40 #else
       
    41 	#define EAP_CLASS_VISIBILITY_EAPOL_CORE_H EAP_IMPORT 
       
    42 	#define EAP_FUNC_VISIBILITY_EAPOL_CORE_H EAP_FUNC_IMPORT 
       
    43 	#define EAP_C_FUNC_VISIBILITY_EAPOL_CORE_H EAP_C_FUNC_IMPORT 
       
    44 	#define EAP_FUNC_EXPORT_EAPOL_CORE_H 
       
    45 	#define EAP_C_FUNC_EXPORT_EAPOL_CORE_H 
       
    46 #endif
       
    47 // End: added by script change_export_macros.sh.
    27 #include "abs_eap_session_core.h"
    48 #include "abs_eap_session_core.h"
    28 #include "eap_core.h"
    49 #include "eap_core.h"
    29 #include "abs_eapol_core.h"
    50 #include "abs_eapol_core.h"
    30 #include "eap_base_type.h"
    51 #include "eap_base_type.h"
    31 #include "eap_variable_data.h"
    52 #include "eap_variable_data.h"
    68 
    89 
    69 class eapol_RC4_key_header_c;
    90 class eapol_RC4_key_header_c;
    70 
    91 
    71 
    92 
    72 /// A eapol_core_c class implements the basic functionality of EAPOL.
    93 /// A eapol_core_c class implements the basic functionality of EAPOL.
    73 class EAP_EXPORT eapol_core_c
    94 class EAP_CLASS_VISIBILITY_EAPOL_CORE_H eapol_core_c
    74 : public abs_eap_session_core_c
    95 : public abs_eap_session_core_c
    75 , public abs_eap_base_timer_c
    96 , public abs_eap_base_timer_c
    76 , public abs_eap_stack_interface_c
    97 , public abs_eap_stack_interface_c
    77 , public abs_eapol_key_state_c
    98 , public abs_eapol_key_state_c
    78 , public abs_eapol_key_state_map_c
    99 , public abs_eapol_key_state_map_c
   133 
   154 
   134 	/// This flag will skip start of 4-Way Handshake with true value.
   155 	/// This flag will skip start of 4-Way Handshake with true value.
   135 	bool m_skip_start_4_way_handshake;
   156 	bool m_skip_start_4_way_handshake;
   136 
   157 
   137 
   158 
   138 	EAP_FUNC_IMPORT eap_status_e indicate_eapol_key_state_started_eap_authentication(
   159 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e indicate_eapol_key_state_started_eap_authentication(
   139 		const eap_am_network_id_c * const send_network_id);
   160 		const eap_am_network_id_c * const send_network_id);
   140 
   161 
   141 	EAP_FUNC_IMPORT eap_status_e init_eapol_key_pmksa_caching_timeout(
   162 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e init_eapol_key_pmksa_caching_timeout(
   142 		const eap_am_network_id_c * const send_network_id);
   163 		const eap_am_network_id_c * const send_network_id);
   143 
   164 
   144 	EAP_FUNC_IMPORT eap_status_e remove_eapol_key_state(
   165 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e remove_eapol_key_state(
   145 		const eap_am_network_id_c * const send_network_id,
   166 		const eap_am_network_id_c * const send_network_id,
   146 		const bool force_remove);
   167 		const bool force_remove);
   147 
   168 
   148 	eap_status_e copy_eapol_key_state(
   169 	eap_status_e copy_eapol_key_state(
   149 		const eap_am_network_id_c * const old_receive_network_id, ///< source includes remote address, destination includes local address.
   170 		const eap_am_network_id_c * const old_receive_network_id, ///< source includes remote address, destination includes local address.
   165 	//--------------------------------------------------
   186 	//--------------------------------------------------
   166 
   187 
   167 	/**
   188 	/**
   168 	 * The destructor deletes the m_eap_core object.
   189 	 * The destructor deletes the m_eap_core object.
   169 	 */
   190 	 */
   170 	EAP_FUNC_IMPORT virtual ~eapol_core_c();
   191 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H virtual ~eapol_core_c();
   171 
   192 
   172 	/**
   193 	/**
   173 	 * The constructor creates the eap_core object and initializes the m_eap_core
   194 	 * The constructor creates the eap_core object and initializes the m_eap_core
   174 	 * to point the eap_core object.
   195 	 * to point the eap_core object.
   175 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
   196 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
   176 	 * @param partner is back pointer to object which created this object.
   197 	 * @param partner is back pointer to object which created this object.
   177 	 * @param is_client_when_true indicates whether the network entity should act
   198 	 * @param is_client_when_true indicates whether the network entity should act
   178 	 * as a client (true) or server (false), in terms of EAP-protocol whether
   199 	 * as a client (true) or server (false), in terms of EAP-protocol whether
   179 	 * this network entity is EAP-supplicant (true) or EAP-authenticator (false).
   200 	 * this network entity is EAP-supplicant (true) or EAP-authenticator (false).
   180 	 */
   201 	 */
   181 	EAP_FUNC_IMPORT eapol_core_c(
   202 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eapol_core_c(
   182 		abs_eap_am_tools_c * const tools,
   203 		abs_eap_am_tools_c * const tools,
   183 		abs_eapol_core_c * const partner,
   204 		abs_eapol_core_c * const partner,
   184 		const bool is_client_when_true);
   205 		const bool is_client_when_true);
   185 
   206 
   186 	/**
   207 	/**
   187 	 * This function removes all authentication sessions.
   208 	 * This function removes all authentication sessions.
   188 	 * If this succeeds this function must return eap_status_ok.
   209 	 * If this succeeds this function must return eap_status_ok.
   189 	 * If this fails this function must return corresponding error status.
   210 	 * If this fails this function must return corresponding error status.
   190 	 * @return This function returns the status of operation.
   211 	 * @return This function returns the status of operation.
   191 	 */
   212 	 */
   192 	EAP_FUNC_IMPORT eap_status_e cancel_all_authentication_sessions();
   213 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e cancel_all_authentication_sessions();
   193 
   214 
   194 	// This is documented in abs_eap_stack_interface_c::packet_process().
   215 	// This is documented in abs_eap_stack_interface_c::packet_process().
   195 	EAP_FUNC_IMPORT eap_status_e packet_process(
   216 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e packet_process(
   196 		const eap_am_network_id_c * const receive_network_id,
   217 		const eap_am_network_id_c * const receive_network_id,
   197 		eap_general_header_base_c * const packet_data,
   218 		eap_general_header_base_c * const packet_data,
   198 		const u32_t packet_length); 
   219 		const u32_t packet_length); 
   199 
   220 
   200 	/**
   221 	/**
   205 	 * EAP-packet in correct offset.
   226 	 * EAP-packet in correct offset.
   206 	 * @param header_offset is offset of the EAP-header within the sent_packet.
   227 	 * @param header_offset is offset of the EAP-header within the sent_packet.
   207 	 * @param data_length is length in bytes of the EAP-packet.
   228 	 * @param data_length is length in bytes of the EAP-packet.
   208 	 * @param buffer_length is length in bytes of the whole packet buffer.
   229 	 * @param buffer_length is length in bytes of the whole packet buffer.
   209 	 */
   230 	 */
   210 	EAP_FUNC_IMPORT eap_status_e packet_send(
   231 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e packet_send(
   211 		const eap_am_network_id_c * const send_network_id,
   232 		const eap_am_network_id_c * const send_network_id,
   212 		eap_buf_chain_wr_c * const sent_packet,
   233 		eap_buf_chain_wr_c * const sent_packet,
   213 		const u32_t header_offset,
   234 		const u32_t header_offset,
   214 		const u32_t data_length,
   235 		const u32_t data_length,
   215 		const u32_t buffer_length); 
   236 		const u32_t buffer_length); 
   221 	 * @param trailer_length is pointer to the variable to store length
   242 	 * @param trailer_length is pointer to the variable to store length
   222 	 * of trailer needed by lower levels.
   243 	 * of trailer needed by lower levels.
   223 	 * @return Function returns the offset of EAP-header.
   244 	 * @return Function returns the offset of EAP-header.
   224 	 * @see abs_eap_core_c::get_header_offset().
   245 	 * @see abs_eap_core_c::get_header_offset().
   225 	 */
   246 	 */
   226 	EAP_FUNC_IMPORT u32_t get_header_offset(
   247 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H u32_t get_header_offset(
   227 		u32_t * const MTU,
   248 		u32_t * const MTU,
   228 		u32_t * const trailer_length);
   249 		u32_t * const trailer_length);
   229 
   250 
   230 	/**
   251 	/**
   231 	 * The adaptation module calls the eap_acknowledge() function after
   252 	 * The adaptation module calls the eap_acknowledge() function after
   234 	 * @param connection_handle separates the context of the acknowledged session.
   255 	 * @param connection_handle separates the context of the acknowledged session.
   235 	 * Mostly there is only one session in the client.
   256 	 * Mostly there is only one session in the client.
   236 	 * The server does not need eap_acknowledge() function because
   257 	 * The server does not need eap_acknowledge() function because
   237 	 * server (EAP-authenticator) sends the EAP-success message.
   258 	 * server (EAP-authenticator) sends the EAP-success message.
   238 	 */
   259 	 */
   239 	EAP_FUNC_IMPORT eap_status_e eap_acknowledge(
   260 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e eap_acknowledge(
   240 		const eap_am_network_id_c * const receive_network_id); 
   261 		const eap_am_network_id_c * const receive_network_id); 
   241 
   262 
   242 	/**
   263 	/**
   243 	 * The load_module() function function indicates the lower level to
   264 	 * The load_module() function function indicates the lower level to
   244 	 * load new module of EAP-type.
   265 	 * load new module of EAP-type.
   245 	 * @see abs_eap_core_c::load_module().
   266 	 * @see abs_eap_core_c::load_module().
   246 	 */
   267 	 */
   247 	EAP_FUNC_IMPORT eap_status_e load_module(
   268 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e load_module(
   248 		const eap_type_value_e type,
   269 		const eap_type_value_e type,
   249 		const eap_type_value_e /* tunneling_type */,
   270 		const eap_type_value_e /* tunneling_type */,
   250 		abs_eap_base_type_c * const partner,
   271 		abs_eap_base_type_c * const partner,
   251 		eap_base_type_c ** const eap_type,
   272 		eap_base_type_c ** const eap_type,
   252 		const bool is_client_when_true,
   273 		const bool is_client_when_true,
   254 
   275 
   255 	/**
   276 	/**
   256 	 * The unload_module() function unloads the module of a EAP-type. 
   277 	 * The unload_module() function unloads the module of a EAP-type. 
   257 	 * @see abs_eap_core_c::unload_module().
   278 	 * @see abs_eap_core_c::unload_module().
   258 	 */
   279 	 */
   259 	EAP_FUNC_IMPORT eap_status_e unload_module(
   280 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e unload_module(
   260 		const eap_type_value_e type); 
   281 		const eap_type_value_e type); 
   261 
   282 
   262 	/**
   283 	/**
   263 	 * This function checks whether PMKSA is cached to each eap_am_network_id_c object.
   284 	 * This function checks whether PMKSA is cached to each eap_am_network_id_c object.
   264 	 * Function removes eap_am_network_id_c object from bssid_sta_receive_network_ids if there are
   285 	 * Function removes eap_am_network_id_c object from bssid_sta_receive_network_ids if there are
   265 	 * no cached PMKSA for removes eap_am_network_id_c object.
   286 	 * no cached PMKSA for removes eap_am_network_id_c object.
   266 	 * All eap_am_network_id_c objects that exist in bssid_sta_receive_network_ids
   287 	 * All eap_am_network_id_c objects that exist in bssid_sta_receive_network_ids
   267 	 * after function returns have PMKSA cached and read_reassociation_parameters() can be called
   288 	 * after function returns have PMKSA cached and read_reassociation_parameters() can be called
   268 	 * with those eap_am_network_id_c objects.
   289 	 * with those eap_am_network_id_c objects.
   269 	 */
   290 	 */
   270 	EAP_FUNC_IMPORT eap_status_e check_pmksa_cache(
   291 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e check_pmksa_cache(
   271 		eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids,
   292 		eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids,
   272 		const eapol_key_authentication_type_e selected_eapol_key_authentication_type,
   293 		const eapol_key_authentication_type_e selected_eapol_key_authentication_type,
   273 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite,
   294 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite,
   274 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e group_key_cipher_suite);
   295 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e group_key_cipher_suite);
   275 
   296 
   277 	 * This function removes PMKSA from cache.
   298 	 * This function removes PMKSA from cache.
   278 	 * @param receive_network_id carries the MAC addresses.
   299 	 * @param receive_network_id carries the MAC addresses.
   279 	 * MAC address of Authenticator should be in source address.
   300 	 * MAC address of Authenticator should be in source address.
   280 	 * MAC address of Supplicant should be in destination address.
   301 	 * MAC address of Supplicant should be in destination address.
   281 	 */
   302 	 */
   282 	EAP_FUNC_IMPORT eap_status_e remove_pmksa_from_cache(
   303 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e remove_pmksa_from_cache(
   283 		const eap_am_network_id_c * const receive_network_id);
   304 		const eap_am_network_id_c * const receive_network_id);
   284 
   305 
   285 	/**
   306 	/**
   286 	 * This function starts the EAP-authentication.
   307 	 * This function starts the EAP-authentication.
   287 	 * The first parameter includes the network addresses of the protocol
   308 	 * The first parameter includes the network addresses of the protocol
   293 	 * is client (true) or server (false).
   314 	 * is client (true) or server (false).
   294 	 * The adaptation module calls the restart_authentication() function
   315 	 * The adaptation module calls the restart_authentication() function
   295 	 * when EAP-authentication is needed with another peer.
   316 	 * when EAP-authentication is needed with another peer.
   296 	 * @see abs_eap_core_c::restart_authentication().
   317 	 * @see abs_eap_core_c::restart_authentication().
   297 	 */
   318 	 */
   298 	EAP_FUNC_IMPORT eap_status_e restart_authentication(
   319 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e restart_authentication(
   299 		const eap_am_network_id_c * const receive_network_id,
   320 		const eap_am_network_id_c * const receive_network_id,
   300 		const bool is_client_when_true,
   321 		const bool is_client_when_true,
   301 		const bool force_clean_restart,
   322 		const bool force_clean_restart,
   302 		const bool from_timer = false);
   323 		const bool from_timer = false);
   303 
   324 
   309 	 * eapol_ethernet_type_e::eapol_ethernet_type_preauthentication.
   330 	 * eapol_ethernet_type_e::eapol_ethernet_type_preauthentication.
   310 	 * Value eapol_ethernet_type_e::eapol_ethernet_type_preauthentication is used 802.11i preauthentication.
   331 	 * Value eapol_ethernet_type_e::eapol_ethernet_type_preauthentication is used 802.11i preauthentication.
   311 	 * The adaptation module calls the start_preauthentication() function
   332 	 * The adaptation module calls the start_preauthentication() function
   312 	 * when preauthentication is needed with another AP.
   333 	 * when preauthentication is needed with another AP.
   313 	 */
   334 	 */
   314 	EAP_FUNC_IMPORT eap_status_e start_preauthentication(
   335 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e start_preauthentication(
   315 		const eap_am_network_id_c * const receive_network_id,
   336 		const eap_am_network_id_c * const receive_network_id,
   316 		const eapol_key_authentication_type_e authentication_type);
   337 		const eapol_key_authentication_type_e authentication_type);
   317 
   338 
   318 	EAP_FUNC_IMPORT eap_status_e read_reassociation_parameters(
   339 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e read_reassociation_parameters(
   319 		const eap_am_network_id_c * const old_receive_network_id, ///< source includes remote address, destination includes local address.
   340 		const eap_am_network_id_c * const old_receive_network_id, ///< source includes remote address, destination includes local address.
   320 		const eap_am_network_id_c * const new_receive_network_id, ///< source includes remote address, destination includes local address.
   341 		const eap_am_network_id_c * const new_receive_network_id, ///< source includes remote address, destination includes local address.
   321 		const eapol_key_authentication_type_e authentication_type,
   342 		const eapol_key_authentication_type_e authentication_type,
   322 		eap_variable_data_c * const PMKID,
   343 		eap_variable_data_c * const PMKID,
   323 		const eap_variable_data_c * const received_WPA_ie,
   344 		const eap_variable_data_c * const received_WPA_ie,
   324 		const eap_variable_data_c * const sent_WPA_ie);
   345 		const eap_variable_data_c * const sent_WPA_ie);
   325 
   346 
   326 	EAP_FUNC_IMPORT eap_status_e start_reassociation(
   347 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e start_reassociation(
   327 		const eap_am_network_id_c * const receive_network_id,
   348 		const eap_am_network_id_c * const receive_network_id,
   328 		const eapol_key_authentication_type_e authentication_type,
   349 		const eapol_key_authentication_type_e authentication_type,
   329 		const eap_variable_data_c * const PMKID);
   350 		const eap_variable_data_c * const PMKID);
   330 
   351 
   331 	EAP_FUNC_IMPORT eap_status_e complete_reassociation(
   352 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e complete_reassociation(
   332 		const eapol_wlan_authentication_state_e reassociation_result,
   353 		const eapol_wlan_authentication_state_e reassociation_result,
   333 		const eap_am_network_id_c * const receive_network_id,
   354 		const eap_am_network_id_c * const receive_network_id,
   334 		const eapol_key_authentication_type_e authentication_type,
   355 		const eapol_key_authentication_type_e authentication_type,
   335 		const eap_variable_data_c * const received_WPA_IE, // WLM must give only the WPA IE to EAPOL
   356 		const eap_variable_data_c * const received_WPA_IE, // WLM must give only the WPA IE to EAPOL
   336 		const eap_variable_data_c * const sent_WPA_IE,
   357 		const eap_variable_data_c * const sent_WPA_IE,
   337 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite,
   358 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite,
   338 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e group_key_cipher_suite);
   359 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e group_key_cipher_suite);
   339 
   360 
   340 	EAP_FUNC_IMPORT eap_status_e start_WPXM_reassociation(
   361 	eap_status_e start_WPXM_reassociation(
   341 		const eap_am_network_id_c * const receive_network_id,
   362 		const eap_am_network_id_c * const receive_network_id,
   342 		const eapol_key_authentication_type_e authentication_type,
   363 		const eapol_key_authentication_type_e authentication_type,
   343 		eap_variable_data_c * const send_reassociation_request_ie);
   364 		eap_variable_data_c * const send_reassociation_request_ie);
   344 
   365 
   345 	EAP_FUNC_IMPORT eap_status_e complete_WPXM_reassociation(
   366 	eap_status_e complete_WPXM_reassociation(
   346 		const eapol_wlan_authentication_state_e reassociation_result,
   367 		const eapol_wlan_authentication_state_e reassociation_result,
   347 		const eap_am_network_id_c * const receive_network_id,
   368 		const eap_am_network_id_c * const receive_network_id,
   348 		const eapol_key_authentication_type_e authentication_type,
   369 		const eapol_key_authentication_type_e authentication_type,
   349 		const eap_variable_data_c * const received_reassociation_ie);
   370 		const eap_variable_data_c * const received_reassociation_ie);
   350 
   371 
   351 	/**
   372 	/**
   352 	 * he adaptation module calls the send_logoff() function to send a EAPOL-Logoff message.
   373 	 * he adaptation module calls the send_logoff() function to send a EAPOL-Logoff message.
   353 	 */
   374 	 */
   354 	EAP_FUNC_IMPORT eap_status_e send_logoff(
   375 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e send_logoff(
   355 		const eap_am_network_id_c * const receive_network_id);
   376 		const eap_am_network_id_c * const receive_network_id);
   356 
   377 
   357 	/**
   378 	/**
   358 	 * Note this function is just an example. Parameters will change later.
   379 	 * Note this function is just an example. Parameters will change later.
   359 	 * The packet_data_crypto_keys() function gives the generated keys to lower level.
   380 	 * The packet_data_crypto_keys() function gives the generated keys to lower level.
   360 	 * After EAP-authentication has generated the keys it calls this function
   381 	 * After EAP-authentication has generated the keys it calls this function
   361 	 * to offer the keys to lower level.
   382 	 * to offer the keys to lower level.
   362 	 * @see abs_eap_base_type_c::packet_data_crypto_keys().
   383 	 * @see abs_eap_base_type_c::packet_data_crypto_keys().
   363 	 */
   384 	 */
   364 	EAP_FUNC_IMPORT eap_status_e packet_data_crypto_keys(
   385 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e packet_data_crypto_keys(
   365 		const eap_am_network_id_c * const send_network_id,
   386 		const eap_am_network_id_c * const send_network_id,
   366 		const eap_master_session_key_c * const master_session_key
   387 		const eap_master_session_key_c * const master_session_key
   367 		);
   388 		);
   368 
   389 
   369 	// See abs_eapol_key_state_c::packet_data_session_key().
   390 	// See abs_eapol_key_state_c::packet_data_session_key().
   370 	EAP_FUNC_IMPORT eap_status_e packet_data_session_key(
   391 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e packet_data_session_key(
   371 		const eap_am_network_id_c * const send_network_id,
   392 		const eap_am_network_id_c * const send_network_id,
   372 		const eapol_session_key_c * const key);
   393 		const eapol_session_key_c * const key);
   373 
   394 
   374 	// This is documented in abs_eap_stack_interface_c::configure().
   395 	// This is documented in abs_eap_stack_interface_c::configure().
   375 	EAP_FUNC_IMPORT eap_status_e configure();
   396 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e configure();
   376 
   397 
   377 	// This is documented in abs_eap_stack_interface_c::shutdown().
   398 	// This is documented in abs_eap_stack_interface_c::shutdown().
   378 	EAP_FUNC_IMPORT eap_status_e shutdown();
   399 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e shutdown();
   379 
   400 
   380 	/**
   401 	/**
   381 	 * The read_configure() function reads the configuration data identified
   402 	 * The read_configure() function reads the configuration data identified
   382 	 * by the field string of field_length bytes length. Adaptation module must direct
   403 	 * by the field string of field_length bytes length. Adaptation module must direct
   383 	 * the query to some persistent store.
   404 	 * the query to some persistent store.
   384 	 * @see abs_eap_base_type_c::read_configure().
   405 	 * @see abs_eap_base_type_c::read_configure().
   385 	 */
   406 	 */
   386 	EAP_FUNC_IMPORT eap_status_e read_configure(
   407 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e read_configure(
   387 		const eap_configuration_field_c * const field,
   408 		const eap_configuration_field_c * const field,
   388 		eap_variable_data_c * const data);
   409 		eap_variable_data_c * const data);
   389 
   410 
   390 	/**
   411 	/**
   391 	 * The write_configure() function writes the configuration data identified
   412 	 * The write_configure() function writes the configuration data identified
   392 	 * by the field string of field_length bytes length. Adaptation module must direct
   413 	 * by the field string of field_length bytes length. Adaptation module must direct
   393 	 * the action to some persistent store.
   414 	 * the action to some persistent store.
   394 	 * @see abs_eap_base_type_c::write_configure().
   415 	 * @see abs_eap_base_type_c::write_configure().
   395 	 */
   416 	 */
   396 	EAP_FUNC_IMPORT eap_status_e write_configure(
   417 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e write_configure(
   397 		const eap_configuration_field_c * const field,
   418 		const eap_configuration_field_c * const field,
   398 		eap_variable_data_c * const data);
   419 		eap_variable_data_c * const data);
   399 
   420 
   400 	// This is documented in abs_eap_stack_interface_c::set_is_valid().
   421 	// This is documented in abs_eap_stack_interface_c::set_is_valid().
   401 	EAP_FUNC_IMPORT void set_is_valid();
   422 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H void set_is_valid();
   402 
   423 
   403 	// This is documented in abs_eap_stack_interface_c::get_is_valid().
   424 	// This is documented in abs_eap_stack_interface_c::get_is_valid().
   404 	EAP_FUNC_IMPORT bool get_is_valid();
   425 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H bool get_is_valid();
   405 
   426 
   406 	// See abs_eap_base_type_c::state_notification().
   427 	// See abs_eap_base_type_c::state_notification().
   407 	EAP_FUNC_IMPORT void state_notification(
   428 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H void state_notification(
   408 		const abs_eap_state_notification_c * const state);
   429 		const abs_eap_state_notification_c * const state);
   409 
   430 
   410 	// See abs_eap_base_timer_c::timer_expired().
   431 	// See abs_eap_base_timer_c::timer_expired().
   411 	EAP_FUNC_IMPORT eap_status_e timer_expired(
   432 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e timer_expired(
   412 		const u32_t id, void *data);
   433 		const u32_t id, void *data);
   413 
   434 
   414 	// See abs_eap_base_timer_c::timer_delete_data().
   435 	// See abs_eap_base_timer_c::timer_delete_data().
   415 	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
   436 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e timer_delete_data(
   416 		const u32_t id, void *data);
   437 		const u32_t id, void *data);
   417 
   438 
   418 	/**
   439 	/**
   419 	 * This function tells lower layer to remove EAP session object asyncronously.
   440 	 * This function tells lower layer to remove EAP session object asyncronously.
   420 	 * @param send_network_id is pointer to network id that identifies the removed EAP session.
   441 	 * @param send_network_id is pointer to network id that identifies the removed EAP session.
   421 	 */
   442 	 */
   422 	EAP_FUNC_IMPORT eap_status_e asynchronous_init_remove_eap_session(
   443 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e asynchronous_init_remove_eap_session(
   423 		const eap_am_network_id_c * const send_network_id);
   444 		const eap_am_network_id_c * const send_network_id);
   424 
   445 
   425 	/**
   446 	/**
   426 	 * The upper layer calls the asynchronous_start_authentication() function
   447 	 * The upper layer calls the asynchronous_start_authentication() function
   427 	 * when EAP-authentication is needed with another peer.
   448 	 * when EAP-authentication is needed with another peer.
   428 	 * @see abs_eap_core_c::asynchronous_start_authentication().
   449 	 * @see abs_eap_core_c::asynchronous_start_authentication().
   429 	 */
   450 	 */
   430 	EAP_FUNC_IMPORT eap_status_e asynchronous_start_authentication(
   451 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e asynchronous_start_authentication(
   431 		const eap_am_network_id_c * const /* receive_network_id */,
   452 		const eap_am_network_id_c * const /* receive_network_id */,
   432 		const bool /* is_client_when_true */);
   453 		const bool /* is_client_when_true */);
   433 
   454 
   434 	//
   455 	//
   435 	EAP_FUNC_IMPORT eap_status_e set_timer(
   456 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e set_timer(
   436 		abs_eap_base_timer_c * const p_initializer, 
   457 		abs_eap_base_timer_c * const p_initializer, 
   437 		const u32_t p_id, 
   458 		const u32_t p_id, 
   438 		void * const p_data,
   459 		void * const p_data,
   439 		const u32_t p_time_ms);
   460 		const u32_t p_time_ms);
   440 
   461 
   441 	EAP_FUNC_IMPORT eap_status_e cancel_timer(
   462 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e cancel_timer(
   442 		abs_eap_base_timer_c * const p_initializer, 
   463 		abs_eap_base_timer_c * const p_initializer, 
   443 		const u32_t p_id);
   464 		const u32_t p_id);
   444 
   465 
   445 	//
   466 	//
   446 	EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
   467 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
   447 
   468 
   448 	// See abs_eap_core_c::get_eap_type_list().
   469 	// See abs_eap_core_c::get_eap_type_list().
   449 	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
   470 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e get_eap_type_list(
   450 		eap_array_c<eap_type_value_e> * const eap_type_list);
   471 		eap_array_c<eap_type_value_e> * const eap_type_list);
   451 
   472 
   452 	// See abs_eapol_key_state_c::get_and_increment_global_key_counter().
   473 	// See abs_eapol_key_state_c::get_and_increment_global_key_counter().
   453 	EAP_FUNC_IMPORT eap_status_e get_and_increment_global_key_counter(
   474 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e get_and_increment_global_key_counter(
   454 		eap_variable_data_c * const key_counter);
   475 		eap_variable_data_c * const key_counter);
   455 
   476 
   456 
   477 
   457 	/**
   478 	/**
   458 	 * Function creates a state for later use. This is for optimazing 4-Way Handshake.
   479 	 * Function creates a state for later use. This is for optimazing 4-Way Handshake.
   459 	 * @param receive_network_id carries the MAC addresses.
   480 	 * @param receive_network_id carries the MAC addresses.
   460 	 * MAC address of Authenticator should be in source address. MAC address of 
   481 	 * MAC address of Authenticator should be in source address. MAC address of 
   461 	 * Supplicant should be in destination address.
   482 	 * Supplicant should be in destination address.
   462 	 * @param authentication_type is the selected authentication type.
   483 	 * @param authentication_type is the selected authentication type.
   463 	 */
   484 	 */
   464 	EAP_FUNC_IMPORT eap_status_e create_state(
   485 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e create_state(
   465 		const eap_am_network_id_c * const receive_network_id,
   486 		const eap_am_network_id_c * const receive_network_id,
   466 		const eapol_key_authentication_type_e authentication_type
   487 		const eapol_key_authentication_type_e authentication_type
   467 		);
   488 		);
   468 
   489 
   469 	/**
   490 	/**
   474 	 * @param authenticator_RSNA_IE is RSN IE of authenticator. Authenticator sends this in Beacon or Probe message.
   495 	 * @param authenticator_RSNA_IE is RSN IE of authenticator. Authenticator sends this in Beacon or Probe message.
   475 	 * @param supplicant_RSNA_IE is RSN IE of supplicant. Supplicant sends this in (re)association request message.
   496 	 * @param supplicant_RSNA_IE is RSN IE of supplicant. Supplicant sends this in (re)association request message.
   476 	 * @param eapol_pairwise_cipher is the selected pairwise cipher.
   497 	 * @param eapol_pairwise_cipher is the selected pairwise cipher.
   477 	 * @param eapol_group_cipher is the selected group cipher.
   498 	 * @param eapol_group_cipher is the selected group cipher.
   478 	 */
   499 	 */
   479 	EAP_FUNC_IMPORT eap_status_e association(
   500 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e association(
   480 		const eap_am_network_id_c * const receive_network_id,
   501 		const eap_am_network_id_c * const receive_network_id,
   481 		const eapol_key_authentication_type_e authentication_type,
   502 		const eapol_key_authentication_type_e authentication_type,
   482 		const eap_variable_data_c * const authenticator_RSNA_IE,
   503 		const eap_variable_data_c * const authenticator_RSNA_IE,
   483 		const eap_variable_data_c * const supplicant_RSNA_IE,
   504 		const eap_variable_data_c * const supplicant_RSNA_IE,
   484 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_pairwise_cipher,
   505 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_pairwise_cipher,
   488 	/**
   509 	/**
   489 	 * This function need to be called when client STA disassociates from AP.
   510 	 * This function need to be called when client STA disassociates from AP.
   490 	 * @param receive_network_id carries the MAC addresses.
   511 	 * @param receive_network_id carries the MAC addresses.
   491 	 * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   512 	 * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   492 	 */
   513 	 */
   493 	EAP_FUNC_IMPORT eap_status_e disassociation(
   514 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e disassociation(
   494 		const bool complete_to_lower_layer,
   515 		const bool complete_to_lower_layer,
   495 		const eap_am_network_id_c * const receive_network_id);
   516 		const eap_am_network_id_c * const receive_network_id);
   496 
   517 
   497 	EAP_FUNC_IMPORT eap_status_e asynchronous_init_remove_eapol_key_state(
   518 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e asynchronous_init_remove_eapol_key_state(
   498 		const eap_am_network_id_c * const send_netword_id);
   519 		const eap_am_network_id_c * const send_netword_id);
   499 
   520 
   500 	EAP_FUNC_IMPORT static eap_status_e shutdown_operation(
   521 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H static eap_status_e shutdown_operation(
   501 		eapol_key_state_c * const handler,
   522 		eapol_key_state_c * const handler,
   502 		abs_eap_am_tools_c * const m_am_tools);
   523 		abs_eap_am_tools_c * const m_am_tools);
   503 
   524 
   504 	EAP_FUNC_IMPORT static eap_status_e cancel_authentication_session(
   525 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H static eap_status_e cancel_authentication_session(
   505 		eapol_key_state_c * const handler,
   526 		eapol_key_state_c * const handler,
   506 		abs_eap_am_tools_c * const m_am_tools);
   527 		abs_eap_am_tools_c * const m_am_tools);
   507 
   528 
   508 	/// @see abs_eap_core_c::add_rogue_ap().
   529 	/// @see abs_eap_core_c::add_rogue_ap().
   509 	EAP_FUNC_IMPORT eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
   530 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
   510 
   531 
   511 	EAP_FUNC_IMPORT eap_status_e tkip_mic_failure(
   532 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e tkip_mic_failure(
   512 		const eap_am_network_id_c * const receive_network_id,
   533 		const eap_am_network_id_c * const receive_network_id,
   513 		const bool fatal_failure_when_true,
   534 		const bool fatal_failure_when_true,
   514 		const eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type);
   535 		const eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type);
   515 
   536 
   516 	// This is documented in abs_eap_core_c::set_session_timeout().
   537 	// This is documented in abs_eap_core_c::set_session_timeout().
   517 	EAP_FUNC_IMPORT eap_status_e set_session_timeout(
   538 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e set_session_timeout(
   518 		const u32_t session_timeout_ms);
   539 		const u32_t session_timeout_ms);
   519 
   540 
   520 #if defined(USE_EAP_SIMPLE_CONFIG)
   541 #if defined(USE_EAP_SIMPLE_CONFIG)
   521 
   542 
   522 	EAP_FUNC_IMPORT eap_status_e save_simple_config_session(
   543 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e save_simple_config_session(
   523 		const simple_config_state_e state,
   544 		const simple_config_state_e state,
   524 		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
   545 		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
   525 		const eap_variable_data_c * const new_password,
   546 		const eap_variable_data_c * const new_password,
   526 		const simple_config_Device_Password_ID_e Device_Password_ID,
   547 		const simple_config_Device_Password_ID_e Device_Password_ID,
   527 		const simple_config_payloads_c * const other_configuration);
   548 		const simple_config_payloads_c * const other_configuration);
   528 
   549 
   529 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
   550 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
   530 
   551 
   531 	EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
   552 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e set_eap_database_reference_values(
   532 		const eap_variable_data_c * const reference);
   553 		const eap_variable_data_c * const reference);
   533 
   554 
   534 	EAP_FUNC_IMPORT eap_status_e get_802_11_authentication_mode(
   555 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e get_802_11_authentication_mode(
   535 		const eap_am_network_id_c * const receive_network_id,
   556 		const eap_am_network_id_c * const receive_network_id,
   536 		const eapol_key_authentication_type_e authentication_type,
   557 		const eapol_key_authentication_type_e authentication_type,
   537 		const eap_variable_data_c * const SSID,
   558 		const eap_variable_data_c * const SSID,
   538 		const eap_variable_data_c * const preshared_key);
   559 		const eap_variable_data_c * const preshared_key);
   539 
   560 
   540 	EAP_FUNC_IMPORT eap_status_e complete_get_802_11_authentication_mode(
   561 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e complete_get_802_11_authentication_mode(
   541 		const eap_status_e completion_status,
   562 		const eap_status_e completion_status,
   542 		const eap_am_network_id_c * const receive_network_id,
   563 		const eap_am_network_id_c * const receive_network_id,
   543 		const eapol_key_802_11_authentication_mode_e mode);
   564 		const eapol_key_802_11_authentication_mode_e mode);
   544 
   565 
   545 	EAP_FUNC_IMPORT eap_status_e complete_remove_eap_session(
   566 	EAP_FUNC_VISIBILITY_EAPOL_CORE_H eap_status_e complete_remove_eap_session(
   546 		const bool complete_to_lower_layer,
   567 		const bool complete_to_lower_layer,
   547 		const eap_am_network_id_c * const receive_network_id);
   568 		const eap_am_network_id_c * const receive_network_id);
   548 
   569 
   549 private:
   570 private:
   550 
   571