eapol/eapol_framework/eapol_common/include/eap_session_core.h
changeset 49 43351a4f2da3
parent 34 ad1f037f1ac2
equal deleted inserted replaced
47:712b4ffd76bb 49:43351a4f2da3
    22 #if !defined(_EAP_SESSION_CORE_H_)
    22 #if !defined(_EAP_SESSION_CORE_H_)
    23 #define _EAP_SESSION_CORE_H_
    23 #define _EAP_SESSION_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_EAP_SESSION_CORE_H)
       
    29 	#define EAP_CLASS_VISIBILITY_EAP_SESSION_CORE_H EAP_NONSHARABLE 
       
    30 	#define EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H 
       
    31 	#define EAP_C_FUNC_VISIBILITY_EAP_SESSION_CORE_H 
       
    32 	#define EAP_FUNC_EXPORT_EAP_SESSION_CORE_H 
       
    33 	#define EAP_C_FUNC_EXPORT_EAP_SESSION_CORE_H 
       
    34 #elif defined(EAP_EXPORT_EAP_SESSION_CORE_H)
       
    35 	#define EAP_CLASS_VISIBILITY_EAP_SESSION_CORE_H EAP_EXPORT 
       
    36 	#define EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H EAP_FUNC_EXPORT 
       
    37 	#define EAP_C_FUNC_VISIBILITY_EAP_SESSION_CORE_H EAP_C_FUNC_EXPORT 
       
    38 	#define EAP_FUNC_EXPORT_EAP_SESSION_CORE_H EAP_FUNC_EXPORT 
       
    39 	#define EAP_C_FUNC_EXPORT_EAP_SESSION_CORE_H EAP_C_FUNC_EXPORT 
       
    40 #else
       
    41 	#define EAP_CLASS_VISIBILITY_EAP_SESSION_CORE_H EAP_IMPORT 
       
    42 	#define EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H EAP_FUNC_IMPORT 
       
    43 	#define EAP_C_FUNC_VISIBILITY_EAP_SESSION_CORE_H EAP_C_FUNC_IMPORT 
       
    44 	#define EAP_FUNC_EXPORT_EAP_SESSION_CORE_H 
       
    45 	#define EAP_C_FUNC_EXPORT_EAP_SESSION_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_map.h"
    49 #include "eap_core_map.h"
    29 #include "abs_eap_stack_interface.h"
    50 #include "abs_eap_stack_interface.h"
    30 #include "eap_session_core_base.h"
    51 #include "eap_session_core_base.h"
    31 #include "eap_base_type.h"
    52 #include "eap_base_type.h"
    48 const u32_t EAP_SESSION_CORE_REMOVE_SESSION_TIMEOUT = 0u;
    69 const u32_t EAP_SESSION_CORE_REMOVE_SESSION_TIMEOUT = 0u;
    49 
    70 
    50 
    71 
    51 /// A eap_session_core_c class implements mapping of EAP authentication sessions.
    72 /// A eap_session_core_c class implements mapping of EAP authentication sessions.
    52 /// Network identity separates parallel EAP authentication sessions.
    73 /// Network identity separates parallel EAP authentication sessions.
    53 class EAP_EXPORT eap_session_core_c
    74 class EAP_CLASS_VISIBILITY_EAP_SESSION_CORE_H eap_session_core_c
    54 : public abs_eap_core_c
    75 : public abs_eap_core_c
    55 , public abs_eap_core_map_c
    76 , public abs_eap_core_map_c
    56 , public abs_eap_base_timer_c
    77 , public abs_eap_base_timer_c
    57 , public abs_eap_stack_interface_c
    78 , public abs_eap_stack_interface_c
    58 , public eap_session_core_base_c
    79 , public eap_session_core_base_c
    85 
   106 
    86 
   107 
    87 	/**
   108 	/**
    88 	 * Function creates a new session.
   109 	 * Function creates a new session.
    89 	 */
   110 	 */
    90 	EAP_FUNC_IMPORT eap_core_c * create_new_session(
   111 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_core_c * create_new_session(
    91 		const eap_am_network_id_c * const receive_network_id);
   112 		const eap_am_network_id_c * const receive_network_id);
    92 
   113 
    93 	EAP_FUNC_IMPORT eap_status_e reset_or_remove_session(
   114 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e reset_or_remove_session(
    94 		eap_core_c ** const session,
   115 		eap_core_c ** const session,
    95 		const eap_network_id_selector_c * const selector,
   116 		const eap_network_id_selector_c * const selector,
    96 		const bool reset_immediately);
   117 		const bool reset_immediately);
    97 
   118 
    98 
   119 
    99 	EAP_FUNC_IMPORT static eap_status_e shutdown_operation(
   120 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H static eap_status_e shutdown_operation(
   100 		eap_core_c * const core,
   121 		eap_core_c * const core,
   101 		abs_eap_am_tools_c * const m_am_tools);
   122 		abs_eap_am_tools_c * const m_am_tools);
   102 
   123 
   103 	//--------------------------------------------------
   124 	//--------------------------------------------------
   104 protected:
   125 protected:
   109 	//--------------------------------------------------
   130 	//--------------------------------------------------
   110 
   131 
   111 	/**
   132 	/**
   112 	 * The destructor of the eap_core class does nothing special.
   133 	 * The destructor of the eap_core class does nothing special.
   113 	 */
   134 	 */
   114 	EAP_FUNC_IMPORT virtual ~eap_session_core_c();
   135 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H virtual ~eap_session_core_c();
   115 
   136 
   116 	/**
   137 	/**
   117 	 * The constructor initializes member attributes using parameters passed to it.
   138 	 * The constructor initializes member attributes using parameters passed to it.
   118 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
   139 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
   119 	 * @param partner is back pointer to object which created this object.
   140 	 * @param partner is back pointer to object which created this object.
   120 	 * @param is_client_when_true indicates whether the network entity should act
   141 	 * @param is_client_when_true indicates whether the network entity should act
   121 	 * as a client (true) or server (false), in terms of EAP-protocol
   142 	 * as a client (true) or server (false), in terms of EAP-protocol
   122 	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
   143 	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
   123 	 */
   144 	 */
   124 	EAP_FUNC_IMPORT eap_session_core_c(
   145 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_session_core_c(
   125 		abs_eap_am_tools_c * const tools,
   146 		abs_eap_am_tools_c * const tools,
   126 		abs_eap_session_core_c * const partner,
   147 		abs_eap_session_core_c * const partner,
   127 		const bool is_client_when_true);
   148 		const bool is_client_when_true);
   128 
   149 
   129 	/**
   150 	/**
   131 	 * state was after the configure() function call.
   152 	 * state was after the configure() function call.
   132 	 * If object reset succeeds this function must return eap_status_ok.
   153 	 * If object reset succeeds this function must return eap_status_ok.
   133 	 * If object reset fails this function must return corresponding error status.
   154 	 * If object reset fails this function must return corresponding error status.
   134 	 * @return This function returns the status of reset operation.
   155 	 * @return This function returns the status of reset operation.
   135 	 */
   156 	 */
   136 	EAP_FUNC_IMPORT eap_status_e reset();
   157 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e reset();
   137 
   158 
   138 	/**
   159 	/**
   139 	 * This function cancels all EAP-sessions.
   160 	 * This function cancels all EAP-sessions.
   140 	 * If this succeeds this function must return eap_status_ok.
   161 	 * If this succeeds this function must return eap_status_ok.
   141 	 * If this fails this function must return corresponding error status.
   162 	 * If this fails this function must return corresponding error status.
   142 	 * @return This function returns the status of operation.
   163 	 * @return This function returns the status of operation.
   143 	 */
   164 	 */
   144 	EAP_FUNC_IMPORT eap_status_e cancel_all_eap_sessions();
   165 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e cancel_all_eap_sessions();
   145 
   166 
   146 	// This is documented in abs_eap_stack_interface_c::packet_process().
   167 	// This is documented in abs_eap_stack_interface_c::packet_process().
   147 	EAP_FUNC_IMPORT eap_status_e packet_process(
   168 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e packet_process(
   148 		const eap_am_network_id_c * const receive_network_id,
   169 		const eap_am_network_id_c * const receive_network_id,
   149 		eap_general_header_base_c * const packet_data,
   170 		eap_general_header_base_c * const packet_data,
   150 		const u32_t packet_length); 
   171 		const u32_t packet_length); 
   151 
   172 
   152 	/**
   173 	/**
   156 	 * EAP-packet in correct offset.
   177 	 * EAP-packet in correct offset.
   157 	 * @param header_offset is offset of the EAP-header within the sent_packet.
   178 	 * @param header_offset is offset of the EAP-header within the sent_packet.
   158 	 * @param data_length is length in bytes of the EAP-packet.
   179 	 * @param data_length is length in bytes of the EAP-packet.
   159 	 * @param buffer_length is length in bytes of the whole packet buffer.
   180 	 * @param buffer_length is length in bytes of the whole packet buffer.
   160 	 */
   181 	 */
   161 	EAP_FUNC_IMPORT eap_status_e packet_send(
   182 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e packet_send(
   162 		const eap_am_network_id_c * const send_network_id,
   183 		const eap_am_network_id_c * const send_network_id,
   163 		eap_buf_chain_wr_c * const sent_packet,
   184 		eap_buf_chain_wr_c * const sent_packet,
   164 		const u32_t header_offset,
   185 		const u32_t header_offset,
   165 		const u32_t data_length,
   186 		const u32_t data_length,
   166 		const u32_t buffer_length); 
   187 		const u32_t buffer_length); 
   167 
   188 
   168 	/**
   189 	/**
   169 	 * The get_partner() function returns pointer to partner class.
   190 	 * The get_partner() function returns pointer to partner class.
   170 	 */
   191 	 */
   171 	EAP_FUNC_IMPORT abs_eap_session_core_c * get_partner();
   192 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H abs_eap_session_core_c * get_partner();
   172 
   193 
   173 	/**
   194 	/**
   174 	 * The get_header_offset() function obtains the header offset of EAP-packet.
   195 	 * The get_header_offset() function obtains the header offset of EAP-packet.
   175 	 * @param MTU_length is pointer to variable to store the maximum transfer unit (MTU).
   196 	 * @param MTU_length is pointer to variable to store the maximum transfer unit (MTU).
   176 	 * MTU is the maximum EAP-packet length in bytes
   197 	 * MTU is the maximum EAP-packet length in bytes
   177 	 * @param trailer_length is pointer to the variable to store length
   198 	 * @param trailer_length is pointer to the variable to store length
   178 	 * of trailer needed by lower levels.
   199 	 * of trailer needed by lower levels.
   179 	 * @return Function returns the offset of EAP-header.
   200 	 * @return Function returns the offset of EAP-header.
   180 	 * @see abs_eap_base_type_c::get_header_offset().
   201 	 * @see abs_eap_base_type_c::get_header_offset().
   181 	 */
   202 	 */
   182 	EAP_FUNC_IMPORT u32_t get_header_offset(
   203 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H u32_t get_header_offset(
   183 		u32_t * const MTU,
   204 		u32_t * const MTU,
   184 		u32_t * const trailer_length);
   205 		u32_t * const trailer_length);
   185 
   206 
   186 	/**
   207 	/**
   187 	 * The unload_module() function initializes un-load of desired EAP-type.
   208 	 * The unload_module() function initializes un-load of desired EAP-type.
   188 	 * After the EAP-type is not needed this function should be called.
   209 	 * After the EAP-type is not needed this function should be called.
   189 	 */
   210 	 */
   190 	EAP_FUNC_IMPORT eap_status_e unload_module(
   211 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e unload_module(
   191 		const eap_type_value_e type); 
   212 		const eap_type_value_e type); 
   192 
   213 
   193 	/**
   214 	/**
   194 	 * The adaptation module calls the eap_acknowledge() function after
   215 	 * The adaptation module calls the eap_acknowledge() function after
   195 	 * any Network Protocol packet is received. This is used as a success indication.
   216 	 * any Network Protocol packet is received. This is used as a success indication.
   197 	 * @param connection_handle separates the context of the acknowledged session.
   218 	 * @param connection_handle separates the context of the acknowledged session.
   198 	 * Mostly there is only one session in the client.
   219 	 * Mostly there is only one session in the client.
   199 	 * The server does not need eap_acknowledge() function because
   220 	 * The server does not need eap_acknowledge() function because
   200 	 * server (EAP-authenticator) sends the EAP-success message.
   221 	 * server (EAP-authenticator) sends the EAP-success message.
   201 	 */
   222 	 */
   202 	EAP_FUNC_IMPORT eap_status_e eap_acknowledge(
   223 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e eap_acknowledge(
   203 		const eap_am_network_id_c * const receive_network_id); 
   224 		const eap_am_network_id_c * const receive_network_id); 
   204 
   225 
   205 	/**
   226 	/**
   206 	 * This function restarts authentication using current object.
   227 	 * This function restarts authentication using current object.
   207 	 * This is used for testing.
   228 	 * This is used for testing.
   208 	 */
   229 	 */
   209 	EAP_FUNC_IMPORT eap_status_e restart_authentication(
   230 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e restart_authentication(
   210 		const eap_am_network_id_c * const send_network_id,
   231 		const eap_am_network_id_c * const send_network_id,
   211 		const bool is_client_when_true);
   232 		const bool is_client_when_true);
   212 
   233 
   213 #if defined(USE_EAP_CORE_SERVER)
   234 #if defined(USE_EAP_CORE_SERVER)
   214 	/**
   235 	/**
   215 	 * The EAP Core calls the send_eap_identity_request() function
   236 	 * The EAP Core calls the send_eap_identity_request() function
   216 	 * when EAP-authentication is needed with another peer.
   237 	 * when EAP-authentication is needed with another peer.
   217 	 * @param network_id includes the addresses (network identity) and packet type.
   238 	 * @param network_id includes the addresses (network identity) and packet type.
   218 	 */
   239 	 */
   219 	EAP_FUNC_IMPORT eap_status_e send_eap_identity_request(
   240 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e send_eap_identity_request(
   220 		const eap_am_network_id_c * const network_id);
   241 		const eap_am_network_id_c * const network_id);
   221 #endif //#if defined(USE_EAP_CORE_SERVER)
   242 #endif //#if defined(USE_EAP_CORE_SERVER)
   222 
   243 
   223 	/**
   244 	/**
   224 	 * The EAP Core calls the send_eap_nak_response() function
   245 	 * The EAP Core calls the send_eap_nak_response() function
   225 	 * when EAP-authentication with requested EAP type is not possible.
   246 	 * when EAP-authentication with requested EAP type is not possible.
   226 	 * @param network_id includes the addresses (network identity) and packet type.
   247 	 * @param network_id includes the addresses (network identity) and packet type.
   227 	 * @param eap_identifier is the EAP-Identifier to be used with EAP-Nak message.
   248 	 * @param eap_identifier is the EAP-Identifier to be used with EAP-Nak message.
   228 	 * @param preferred_eap_type is the acceptable EAP-Type to be informed with an other peer.
   249 	 * @param preferred_eap_type is the acceptable EAP-Type to be informed with an other peer.
   229 	 */
   250 	 */
   230 	EAP_FUNC_IMPORT eap_status_e send_eap_nak_response(
   251 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e send_eap_nak_response(
   231 		const eap_am_network_id_c * const receive_network_id,
   252 		const eap_am_network_id_c * const receive_network_id,
   232 		const u8_t eap_identifier,
   253 		const u8_t eap_identifier,
   233 		const eap_type_value_e preferred_eap_type);
   254 		const eap_type_value_e preferred_eap_type);
   234 
   255 
   235 	/**
   256 	/**
   240 	 * @param authentication_key is pointer to the first byte of the authentication key.
   261 	 * @param authentication_key is pointer to the first byte of the authentication key.
   241 	 * @param auth_key_length is count of bytes in the authentication key.
   262 	 * @param auth_key_length is count of bytes in the authentication key.
   242 	 * @param encryption_key is pointer to the first byte of the encryption key.
   263 	 * @param encryption_key is pointer to the first byte of the encryption key.
   243 	 * @param encr_key_length is count of bytes in the encryption key.
   264 	 * @param encr_key_length is count of bytes in the encryption key.
   244 	 */
   265 	 */
   245 	EAP_FUNC_IMPORT eap_status_e packet_data_crypto_keys(
   266 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e packet_data_crypto_keys(
   246 		const eap_am_network_id_c * const send_network_id,
   267 		const eap_am_network_id_c * const send_network_id,
   247 		const eap_master_session_key_c * const master_session_key
   268 		const eap_master_session_key_c * const master_session_key
   248 		);
   269 		);
   249 
   270 
   250 	// This is documented in abs_eap_stack_interface_c::configure().
   271 	// This is documented in abs_eap_stack_interface_c::configure().
   251 	EAP_FUNC_IMPORT eap_status_e configure();
   272 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e configure();
   252 
   273 
   253 	// This is documented in abs_eap_stack_interface_c::shutdown().
   274 	// This is documented in abs_eap_stack_interface_c::shutdown().
   254 	EAP_FUNC_IMPORT eap_status_e shutdown();
   275 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e shutdown();
   255 
   276 
   256 	/**
   277 	/**
   257 	 * The read_configure() function reads the configuration data identified
   278 	 * The read_configure() function reads the configuration data identified
   258 	 * by the field string of field_length bytes length. Adaptation module must direct
   279 	 * by the field string of field_length bytes length. Adaptation module must direct
   259 	 * the query to some persistent store.
   280 	 * the query to some persistent store.
   260 	 * @param field is generic configure string idenfying the required configure data.
   281 	 * @param field is generic configure string idenfying the required configure data.
   261 	 * @param field_length is length of the field string.
   282 	 * @param field_length is length of the field string.
   262 	 * @param data is pointer to existing eap_variable_data object.
   283 	 * @param data is pointer to existing eap_variable_data object.
   263 	 */
   284 	 */
   264 	EAP_FUNC_IMPORT virtual eap_status_e read_configure(
   285 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H virtual eap_status_e read_configure(
   265 		const eap_configuration_field_c * const field,
   286 		const eap_configuration_field_c * const field,
   266 		eap_variable_data_c * const data);
   287 		eap_variable_data_c * const data);
   267 
   288 
   268 	/**
   289 	/**
   269 	 * The write_configure() function writes the configuration data identified
   290 	 * The write_configure() function writes the configuration data identified
   271 	 * the action to some persistent store.
   292 	 * the action to some persistent store.
   272 	 * @param field is generic configure string idenfying the required configure data.
   293 	 * @param field is generic configure string idenfying the required configure data.
   273 	 * @param field_length is length of the field string.
   294 	 * @param field_length is length of the field string.
   274 	 * @param data is pointer to existing eap_variable_data object.
   295 	 * @param data is pointer to existing eap_variable_data object.
   275 	 */
   296 	 */
   276 	EAP_FUNC_IMPORT virtual eap_status_e write_configure(
   297 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H virtual eap_status_e write_configure(
   277 		const eap_configuration_field_c * const field,
   298 		const eap_configuration_field_c * const field,
   278 		eap_variable_data_c * const data);
   299 		eap_variable_data_c * const data);
   279 
   300 
   280 	// This is documented in abs_eap_stack_interface_c::set_is_valid().
   301 	// This is documented in abs_eap_stack_interface_c::set_is_valid().
   281 	EAP_FUNC_IMPORT void set_is_valid();
   302 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H void set_is_valid();
   282 
   303 
   283 	// This is documented in abs_eap_stack_interface_c::get_is_valid().
   304 	// This is documented in abs_eap_stack_interface_c::get_is_valid().
   284 	EAP_FUNC_IMPORT bool get_is_valid();
   305 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H bool get_is_valid();
   285 
   306 
   286 	// See abs_eap_base_type_c::state_notification().
   307 	// See abs_eap_base_type_c::state_notification().
   287 	EAP_FUNC_IMPORT void state_notification(
   308 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H void state_notification(
   288 		const abs_eap_state_notification_c * const state);
   309 		const abs_eap_state_notification_c * const state);
   289 
   310 
   290 	// See abs_eap_base_timer_c::timer_expired().
   311 	// See abs_eap_base_timer_c::timer_expired().
   291 	EAP_FUNC_IMPORT eap_status_e timer_expired(
   312 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e timer_expired(
   292 		const u32_t id, void *data);
   313 		const u32_t id, void *data);
   293 
   314 
   294 	// See abs_eap_base_timer_c::timer_delete_data().
   315 	// See abs_eap_base_timer_c::timer_delete_data().
   295 	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
   316 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e timer_delete_data(
   296 		const u32_t id, void *data);
   317 		const u32_t id, void *data);
   297 
   318 
   298 	/**
   319 	/**
   299 	 * The load_module() function function indicates the lower level to
   320 	 * The load_module() function function indicates the lower level to
   300 	 * load new module of EAP-type.
   321 	 * load new module of EAP-type.
   301 	 * @see abs_eap_core_c::load_module().
   322 	 * @see abs_eap_core_c::load_module().
   302 	 */
   323 	 */
   303 	EAP_FUNC_IMPORT eap_status_e load_module(
   324 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e load_module(
   304 		const eap_type_value_e type,
   325 		const eap_type_value_e type,
   305 		const eap_type_value_e /* tunneling_type */,
   326 		const eap_type_value_e /* tunneling_type */,
   306 		abs_eap_base_type_c * const partner,
   327 		abs_eap_base_type_c * const partner,
   307 		eap_base_type_c ** const eap_type,
   328 		eap_base_type_c ** const eap_type,
   308 		const bool is_client_when_true,
   329 		const bool is_client_when_true,
   311 	/**
   332 	/**
   312 	 * The adaptation module calls the restart_authentication() function
   333 	 * The adaptation module calls the restart_authentication() function
   313 	 * when EAP-authentication is needed with another peer.
   334 	 * when EAP-authentication is needed with another peer.
   314 	 * @see abs_eap_core_c::restart_authentication().
   335 	 * @see abs_eap_core_c::restart_authentication().
   315 	 */
   336 	 */
   316 	EAP_FUNC_IMPORT eap_status_e restart_authentication(
   337 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e restart_authentication(
   317 		const eap_am_network_id_c * const receive_network_id,
   338 		const eap_am_network_id_c * const receive_network_id,
   318 		const bool is_client_when_true,
   339 		const bool is_client_when_true,
   319 		const bool force_clean_restart,
   340 		const bool force_clean_restart,
   320 		const bool from_timer = false);
   341 		const bool from_timer = false);
   321 
   342 
   322 	/**
   343 	/**
   323 	 * This function creates EAP session object synchronously.
   344 	 * This function creates EAP session object synchronously.
   324 	 * @param receive_network_id identifies the removed EAP session.
   345 	 * @param receive_network_id identifies the removed EAP session.
   325 	 */
   346 	 */
   326 	EAP_FUNC_IMPORT eap_status_e create_eap_session(
   347 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e create_eap_session(
   327 		const eap_am_network_id_c * const receive_network_id);
   348 		const eap_am_network_id_c * const receive_network_id);
   328 
   349 
   329 	/**
   350 	/**
   330 	 * This function removes EAP session object synchronously.
   351 	 * This function removes EAP session object synchronously.
   331 	 * @param receive_network_id identifies the removed EAP session.
   352 	 * @param receive_network_id identifies the removed EAP session.
   332 	 */
   353 	 */
   333 	EAP_FUNC_IMPORT eap_status_e remove_eap_session(
   354 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e remove_eap_session(
   334 		const bool complete_to_lower_layer,
   355 		const bool complete_to_lower_layer,
   335 		const eap_am_network_id_c * const receive_network_id);
   356 		const eap_am_network_id_c * const receive_network_id);
   336 
   357 
   337 	/**
   358 	/**
   338 	 * This function removes EAP session object asynchronously.
   359 	 * This function removes EAP session object asynchronously.
   343 
   364 
   344 	/**
   365 	/**
   345 	 * This function tells lower layer to remove EAP session object asynchronously.
   366 	 * This function tells lower layer to remove EAP session object asynchronously.
   346 	 * @param eap_type is pointer to selector that identifies the removed EAP session.
   367 	 * @param eap_type is pointer to selector that identifies the removed EAP session.
   347 	 */
   368 	 */
   348 	EAP_FUNC_IMPORT eap_status_e asynchronous_init_remove_eap_session(
   369 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e asynchronous_init_remove_eap_session(
   349 		const eap_network_id_selector_c * const state_selector);
   370 		const eap_network_id_selector_c * const state_selector);
   350 
   371 
   351 	//
   372 	//
   352 	EAP_FUNC_IMPORT eap_status_e set_timer(
   373 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e set_timer(
   353 		abs_eap_base_timer_c * const p_initializer, 
   374 		abs_eap_base_timer_c * const p_initializer, 
   354 		const u32_t p_id, 
   375 		const u32_t p_id, 
   355 		void * const p_data,
   376 		void * const p_data,
   356 		const u32_t p_time_ms);
   377 		const u32_t p_time_ms);
   357 
   378 
   358 	EAP_FUNC_IMPORT eap_status_e cancel_timer(
   379 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e cancel_timer(
   359 		abs_eap_base_timer_c * const p_initializer, 
   380 		abs_eap_base_timer_c * const p_initializer, 
   360 		const u32_t p_id);
   381 		const u32_t p_id);
   361 
   382 
   362 	//
   383 	//
   363 	EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
   384 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
   364 
   385 
   365 	/// @see abs_eap_core_c::get_eap_type_list().
   386 	/// @see abs_eap_core_c::get_eap_type_list().
   366 	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
   387 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e get_eap_type_list(
   367 		eap_array_c<eap_type_value_e> * const eap_type_list);
   388 		eap_array_c<eap_type_value_e> * const eap_type_list);
   368 
   389 
   369 	/// @see abs_eap_core_c::add_rogue_ap().
   390 	/// @see abs_eap_core_c::add_rogue_ap().
   370 	EAP_FUNC_IMPORT eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
   391 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
   371 
   392 
   372 	// This is documented in abs_eap_core_c::set_session_timeout().
   393 	// This is documented in abs_eap_core_c::set_session_timeout().
   373 	EAP_FUNC_IMPORT eap_status_e set_session_timeout(
   394 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e set_session_timeout(
   374 		const u32_t session_timeout_ms);
   395 		const u32_t session_timeout_ms);
   375 
   396 
   376 	EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
   397 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e set_eap_database_reference_values(
   377 		const eap_variable_data_c * const reference);
   398 		const eap_variable_data_c * const reference);
   378 
   399 
   379 	EAP_FUNC_IMPORT eap_status_e get_802_11_authentication_mode(
   400 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e get_802_11_authentication_mode(
   380 		const eap_am_network_id_c * const receive_network_id,
   401 		const eap_am_network_id_c * const receive_network_id,
   381 		const eapol_key_authentication_type_e authentication_type,
   402 		const eapol_key_authentication_type_e authentication_type,
   382 		const eap_variable_data_c * const SSID,
   403 		const eap_variable_data_c * const SSID,
   383 		const eap_variable_data_c * const preshared_key);
   404 		const eap_variable_data_c * const preshared_key);
   384 
   405 
   385 	EAP_FUNC_IMPORT eap_status_e complete_get_802_11_authentication_mode(
   406 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_H eap_status_e complete_get_802_11_authentication_mode(
   386 		const eap_status_e completion_status,
   407 		const eap_status_e completion_status,
   387 		const eap_am_network_id_c * const receive_network_id,
   408 		const eap_am_network_id_c * const receive_network_id,
   388 		const eapol_key_802_11_authentication_mode_e mode);
   409 		const eapol_key_802_11_authentication_mode_e mode);
   389 
   410 
   390 	//--------------------------------------------------
   411 	//--------------------------------------------------