eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config.h
changeset 49 43351a4f2da3
parent 26 9abfd4f00d37
equal deleted inserted replaced
47:712b4ffd76bb 49:43351a4f2da3
    24 
    24 
    25 #if defined(USE_EAP_SIMPLE_CONFIG)
    25 #if defined(USE_EAP_SIMPLE_CONFIG)
    26 
    26 
    27 #include "eap_tools.h"
    27 #include "eap_tools.h"
    28 #include "eap_am_export.h"
    28 #include "eap_am_export.h"
       
    29 // Start: added by script change_export_macros.sh.
       
    30 #if defined(EAP_NO_EXPORT_EAP_TYPE_SIMPLE_CONFIG_H)
       
    31 	#define EAP_CLASS_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H EAP_NONSHARABLE 
       
    32 	#define EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H 
       
    33 	#define EAP_C_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H 
       
    34 	#define EAP_FUNC_EXPORT_EAP_TYPE_SIMPLE_CONFIG_H 
       
    35 	#define EAP_C_FUNC_EXPORT_EAP_TYPE_SIMPLE_CONFIG_H 
       
    36 #elif defined(EAP_EXPORT_EAP_TYPE_SIMPLE_CONFIG_H)
       
    37 	#define EAP_CLASS_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H EAP_EXPORT 
       
    38 	#define EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H EAP_FUNC_EXPORT 
       
    39 	#define EAP_C_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H EAP_C_FUNC_EXPORT 
       
    40 	#define EAP_FUNC_EXPORT_EAP_TYPE_SIMPLE_CONFIG_H EAP_FUNC_EXPORT 
       
    41 	#define EAP_C_FUNC_EXPORT_EAP_TYPE_SIMPLE_CONFIG_H EAP_C_FUNC_EXPORT 
       
    42 #else
       
    43 	#define EAP_CLASS_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H EAP_IMPORT 
       
    44 	#define EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H EAP_FUNC_IMPORT 
       
    45 	#define EAP_C_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H EAP_C_FUNC_IMPORT 
       
    46 	#define EAP_FUNC_EXPORT_EAP_TYPE_SIMPLE_CONFIG_H 
       
    47 	#define EAP_C_FUNC_EXPORT_EAP_TYPE_SIMPLE_CONFIG_H 
       
    48 #endif
       
    49 // End: added by script change_export_macros.sh.
    29 #include "abs_eap_am_type_simple_config.h"
    50 #include "abs_eap_am_type_simple_config.h"
    30 #include "eap_am_network_id.h"
    51 #include "eap_am_network_id.h"
    31 #include "abs_eap_base_type.h"
    52 #include "abs_eap_base_type.h"
    32 #include "eap_base_type.h"
    53 #include "eap_base_type.h"
    33 #include "eap_variable_data.h"
    54 #include "eap_variable_data.h"
    47 
    68 
    48 //--------------------------------------------------
    69 //--------------------------------------------------
    49 
    70 
    50 
    71 
    51 /// This class is implementation of SIMPLE_CONFIG type. See more detailed design and architecture document <a href="../../type/simple_config/documentation/EAP_SIMPLE_CONFIG.doc">EAP_SIMPLE_CONFIG.doc</a>.
    72 /// This class is implementation of SIMPLE_CONFIG type. See more detailed design and architecture document <a href="../../type/simple_config/documentation/EAP_SIMPLE_CONFIG.doc">EAP_SIMPLE_CONFIG.doc</a>.
    52 class EAP_EXPORT eap_type_simple_config_c
    73 class EAP_CLASS_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_type_simple_config_c
    53 : public abs_eap_base_timer_c
    74 : public abs_eap_base_timer_c
    54 , public eap_base_type_c
    75 , public eap_base_type_c
    55 , public abs_eap_am_type_simple_config_c
    76 , public abs_eap_am_type_simple_config_c
    56 , public abs_simple_config_base_record_c
    77 , public abs_simple_config_base_record_c
    57 {
    78 {
   155 	//--------------------------------------------------
   176 	//--------------------------------------------------
   156 
   177 
   157 	/**
   178 	/**
   158 	 * This function returns the domain name, realm part of NAI.
   179 	 * This function returns the domain name, realm part of NAI.
   159 	 */
   180 	 */
   160 	EAP_FUNC_IMPORT eap_variable_data_c * get_nai_realm();
   181 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_variable_data_c * get_nai_realm();
   161 
   182 
   162 	/**
   183 	/**
   163 	 * This function returns the full NAI.
   184 	 * This function returns the full NAI.
   164 	 */
   185 	 */
   165 	EAP_FUNC_IMPORT eap_variable_data_c * get_NAI();
   186 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_variable_data_c * get_NAI();
   166 
   187 
   167 	/**
   188 	/**
   168 	 * This is the situation before the update_buffer_indexes() call.
   189 	 * This is the situation before the update_buffer_indexes() call.
   169 	 * @code
   190 	 * @code
   170 	 * 
   191 	 * 
   195 	 *
   216 	 *
   196 	 * @endcode
   217 	 * @endcode
   197 	 *
   218 	 *
   198 	 * Note maximum_buffer_size could be larger than (m_simple_config_header_offset + m_MTU + m_trailer_length).
   219 	 * Note maximum_buffer_size could be larger than (m_simple_config_header_offset + m_MTU + m_trailer_length).
   199 	 */
   220 	 */
   200 	EAP_FUNC_IMPORT void update_buffer_indexes(
   221 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void update_buffer_indexes(
   201 		const u32_t maximum_buffer_size,
   222 		const u32_t maximum_buffer_size,
   202 		const u32_t payload_size,
   223 		const u32_t payload_size,
   203 		u32_t * const buffer_offset,
   224 		u32_t * const buffer_offset,
   204 		u32_t * const buffer_free);
   225 		u32_t * const buffer_free);
   205 
   226 
   242 	 *
   263 	 *
   243 	 * @endcode
   264 	 * @endcode
   244 	 *
   265 	 *
   245 	 * Note maximum_buffer_size could be larger than (m_simple_config_header_offset + m_MTU + m_trailer_length).
   266 	 * Note maximum_buffer_size could be larger than (m_simple_config_header_offset + m_MTU + m_trailer_length).
   246 	 */
   267 	 */
   247 	EAP_FUNC_IMPORT void update_payload_indexes(
   268 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void update_payload_indexes(
   248 		const u32_t maximum_buffer_size,
   269 		const u32_t maximum_buffer_size,
   249 		const u32_t eap_header_size,
   270 		const u32_t eap_header_size,
   250 		const u32_t payload_size,
   271 		const u32_t payload_size,
   251 		u32_t * const data_offset,
   272 		u32_t * const data_offset,
   252 		u32_t * const data_free,
   273 		u32_t * const data_free,
   254 		u32_t * const buffer_free);
   275 		u32_t * const buffer_free);
   255 
   276 
   256 	/**
   277 	/**
   257 	 * This function reads the identity payload. Identity is stored to handler->get_identity().
   278 	 * This function reads the identity payload. Identity is stored to handler->get_identity().
   258 	 */
   279 	 */
   259 	EAP_FUNC_IMPORT eap_status_e parse_identity(
   280 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e parse_identity(
   260 		const u8_t * const identity, ///< This is pointer to received EAP-Identity buffer.
   281 		const u8_t * const identity, ///< This is pointer to received EAP-Identity buffer.
   261 		const u32_t identity_length ///< This is length of received EAP-Identity buffer.
   282 		const u32_t identity_length ///< This is length of received EAP-Identity buffer.
   262 		);
   283 		);
   263 
   284 
   264 	/**
   285 	/**
   265 	 * This function chechs NAI.
   286 	 * This function chechs NAI.
   266 	 */
   287 	 */
   267 	EAP_FUNC_IMPORT eap_status_e check_NAI(
   288 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e check_NAI(
   268 		const u8_t * const identity,
   289 		const u8_t * const identity,
   269 		const u32_t identity_length,
   290 		const u32_t identity_length,
   270 		const u8_t * const at_character);
   291 		const u8_t * const at_character);
   271 
   292 
   272 	/**
   293 	/**
   273 	 * This function traces the EAP packet.
   294 	 * This function traces the EAP packet.
   274 	 */
   295 	 */
   275 	EAP_FUNC_IMPORT void packet_trace(
   296 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void packet_trace(
   276 		eap_const_string prefix,
   297 		eap_const_string prefix,
   277 		const eap_am_network_id_c * const receive_network_id,
   298 		const eap_am_network_id_c * const receive_network_id,
   278 		eap_header_wr_c * const received_eap,
   299 		eap_header_wr_c * const received_eap,
   279 		const u32_t eap_packet_length);
   300 		const u32_t eap_packet_length);
   280 
   301 
   281 	/**
   302 	/**
   282 	 * This function finishes the successfull authentication.
   303 	 * This function finishes the successfull authentication.
   283 	 * Generated keys are offered to lower layer.
   304 	 * Generated keys are offered to lower layer.
   284 	 * Connection handle is initialised.
   305 	 * Connection handle is initialised.
   285 	 */
   306 	 */
   286 	EAP_FUNC_IMPORT eap_status_e finish_successful_authentication();
   307 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e finish_successful_authentication();
   287 
   308 
   288 	/**
   309 	/**
   289 	 * This function sends a notification of possible failed authentication
   310 	 * This function sends a notification of possible failed authentication
   290 	 * to lower layer.
   311 	 * to lower layer.
   291 	 */
   312 	 */
   292 	EAP_FUNC_IMPORT eap_status_e send_final_notification();
   313 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e send_final_notification();
   293 
   314 
   294 
   315 
   295 	/**
   316 	/**
   296 	 * This function returns the state of this authentication session.
   317 	 * This function returns the state of this authentication session.
   297 	 */
   318 	 */
   298 	EAP_FUNC_IMPORT eap_type_simple_config_state_variable_e get_state() const;
   319 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_type_simple_config_state_variable_e get_state() const;
   299 
   320 
   300 	/**
   321 	/**
   301 	 * This function sets the new state and notifies the lower layer of this change.
   322 	 * This function sets the new state and notifies the lower layer of this change.
   302 	 */
   323 	 */
   303 	EAP_FUNC_IMPORT void set_state(const eap_type_simple_config_state_variable_e state);
   324 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void set_state(const eap_type_simple_config_state_variable_e state);
   304 
   325 
   305 	/**
   326 	/**
   306 	 * This function saves the current m_state to m_saved_previous_state.
   327 	 * This function saves the current m_state to m_saved_previous_state.
   307 	 * The saved state is restored in error case.
   328 	 * The saved state is restored in error case.
   308 	 */
   329 	 */
   309 	EAP_FUNC_IMPORT void save_current_state();
   330 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void save_current_state();
   310 
   331 
   311 	/**
   332 	/**
   312 	 * This function restores the saved state.
   333 	 * This function restores the saved state.
   313 	 */
   334 	 */
   314 	EAP_FUNC_IMPORT void restore_saved_previous_state();
   335 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void restore_saved_previous_state();
   315 
   336 
   316 
   337 
   317 	/**
   338 	/**
   318 	 * This function returns the state of reassembly.
   339 	 * This function returns the state of reassembly.
   319 	 */
   340 	 */
   320 	EAP_FUNC_IMPORT eap_type_simple_config_reassembly_state_e get_reassembly_state() const;
   341 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_type_simple_config_reassembly_state_e get_reassembly_state() const;
   321 
   342 
   322 	/**
   343 	/**
   323 	 * This function sets the new reassembly state.
   344 	 * This function sets the new reassembly state.
   324 	 */
   345 	 */
   325 	EAP_FUNC_IMPORT void set_reassembly_state(const eap_type_simple_config_reassembly_state_e state);
   346 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void set_reassembly_state(const eap_type_simple_config_reassembly_state_e state);
   326 
   347 
   327 	/**
   348 	/**
   328 	 * This function saves the current m_reassembly_state to m_saved_previous_reassembly_state.
   349 	 * This function saves the current m_reassembly_state to m_saved_previous_reassembly_state.
   329 	 * The saved state is restored in error case.
   350 	 * The saved state is restored in error case.
   330 	 */
   351 	 */
   331 	EAP_FUNC_IMPORT void save_current_reassembly_state();
   352 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void save_current_reassembly_state();
   332 
   353 
   333 	/**
   354 	/**
   334 	 * This function restores the saved reassembly state.
   355 	 * This function restores the saved reassembly state.
   335 	 */
   356 	 */
   336 	EAP_FUNC_IMPORT void restore_saved_reassembly_state();
   357 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void restore_saved_reassembly_state();
   337 
   358 
   338 
   359 
   339 	/**
   360 	/**
   340 	 * This function returns the send network identity of this session.
   361 	 * This function returns the send network identity of this session.
   341 	 */
   362 	 */
   342 	EAP_FUNC_IMPORT eap_am_network_id_c * get_send_network_id();
   363 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_am_network_id_c * get_send_network_id();
   343 
   364 
   344 	/**
   365 	/**
   345 	 * This function stores the last EAP-Identifier.
   366 	 * This function stores the last EAP-Identifier.
   346 	 */
   367 	 */
   347 	EAP_FUNC_IMPORT void set_last_eap_identifier(const u8_t last_eap_identifier);
   368 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void set_last_eap_identifier(const u8_t last_eap_identifier);
   348 
   369 
   349 	/**
   370 	/**
   350 	 * This function returns the last stored EAP-Identifier.
   371 	 * This function returns the last stored EAP-Identifier.
   351 	 */
   372 	 */
   352 	EAP_FUNC_IMPORT u8_t get_last_eap_identifier() const;
   373 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H u8_t get_last_eap_identifier() const;
   353 
   374 
   354 	eap_status_e check_received_eap_identifier(
   375 	eap_status_e check_received_eap_identifier(
   355 		const eap_header_wr_c * const eap_header);
   376 		const eap_header_wr_c * const eap_header);
   356 
   377 
   357 
   378 
   358 	/**
   379 	/**
   359 	 * This function returns string of the current state. This is for trace purposes.
   380 	 * This function returns string of the current state. This is for trace purposes.
   360 	 */
   381 	 */
   361 	EAP_FUNC_IMPORT eap_const_string get_state_string() const;
   382 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_const_string get_state_string() const;
   362 
   383 
   363 	/**
   384 	/**
   364 	 * This function returns string of the current state. This is for trace purposes.
   385 	 * This function returns string of the current state. This is for trace purposes.
   365 	 */
   386 	 */
   366 	EAP_FUNC_IMPORT eap_const_string get_saved_previous_state_string() const;
   387 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_const_string get_saved_previous_state_string() const;
   367 
   388 
   368 	/**
   389 	/**
   369 	 * This function returns string of the current reassembly state. This is for trace purposes.
   390 	 * This function returns string of the current reassembly state. This is for trace purposes.
   370 	 */
   391 	 */
   371 	EAP_FUNC_IMPORT eap_const_string get_reassembly_state_string() const;
   392 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_const_string get_reassembly_state_string() const;
   372 
   393 
   373 
   394 
   374 	/**
   395 	/**
   375 	 * This function sets the m_failure_message_received flag true.
   396 	 * This function sets the m_failure_message_received flag true.
   376 	 */
   397 	 */
   377 	EAP_FUNC_IMPORT void set_failure_message_received();
   398 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void set_failure_message_received();
   378 
   399 
   379 	/**
   400 	/**
   380 	 * This function sets the m_failure_message_received flag false.
   401 	 * This function sets the m_failure_message_received flag false.
   381 	 */
   402 	 */
   382 	EAP_FUNC_IMPORT void unset_failure_message_received();
   403 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void unset_failure_message_received();
   383 
   404 
   384 	/**
   405 	/**
   385 	 * This function returns the m_failure_message_received flag.
   406 	 * This function returns the m_failure_message_received flag.
   386 	 */
   407 	 */
   387 	EAP_FUNC_IMPORT bool get_failure_message_received() const;
   408 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H bool get_failure_message_received() const;
   388 
   409 
   389 	/**
   410 	/**
   390 	 * This function sends an simple config fragment acknowledge.
   411 	 * This function sends an simple config fragment acknowledge.
   391 	 */
   412 	 */
   392 	EAP_FUNC_IMPORT eap_status_e send_sc_frag_ack();
   413 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e send_sc_frag_ack();
   393 
   414 
   394 	/**
   415 	/**
   395 	 * This function sends EAP-SIMPLE_CONFIG Start message.
   416 	 * This function sends EAP-SIMPLE_CONFIG Start message.
   396 	 */
   417 	 */
   397 	EAP_FUNC_IMPORT eap_status_e send_simple_config_start_message(
   418 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e send_simple_config_start_message(
   398 		const u8_t next_eap_identifier ///< This is EAP-Identifier of next EAP packet.
   419 		const u8_t next_eap_identifier ///< This is EAP-Identifier of next EAP packet.
   399 		);
   420 		);
   400 
   421 
   401 	/**
   422 	/**
   402 	 * This function sends starts EAP-SIMPLE_CONFIG after a start message is received.
   423 	 * This function sends starts EAP-SIMPLE_CONFIG after a start message is received.
   403 	 */
   424 	 */
   404 	EAP_FUNC_IMPORT eap_status_e start_simple_config_authentication(
   425 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e start_simple_config_authentication(
   405 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   426 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   406 		const eap_variable_data_c * const NAI ///< This is the full NAI of the client.
   427 		const eap_variable_data_c * const NAI ///< This is the full NAI of the client.
   407 		);
   428 		);
   408 
   429 
   409 	/**
   430 	/**
   410 	 * This function extracts the SIMPLE_CONFIG-record message from m_simple_config_message_buffer and forwards it to simple_config_base_record_c object.
   431 	 * This function extracts the SIMPLE_CONFIG-record message from m_simple_config_message_buffer and forwards it to simple_config_base_record_c object.
   411 	 */
   432 	 */
   412 	EAP_FUNC_IMPORT eap_status_e simple_config_message_process(
   433 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e simple_config_message_process(
   413 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   434 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   414 		eap_simple_config_header_c * const received_simple_config, ///< This is pointer to EAP header including EAP-SIMPLE_CONFIG fields.
   435 		eap_simple_config_header_c * const received_simple_config, ///< This is pointer to EAP header including EAP-SIMPLE_CONFIG fields.
   415 		const u32_t simple_config_packet_length ///< This is length of received EAP-SIMPLE_CONFIG packet.
   436 		const u32_t simple_config_packet_length ///< This is length of received EAP-SIMPLE_CONFIG packet.
   416 		);
   437 		);
   417 
   438 
   418 	/**
   439 	/**
   419 	 * This function sends the EAP-SIMPLE_CONFIG message from rm_simple_config_reassembly_buffer.
   440 	 * This function sends the EAP-SIMPLE_CONFIG message from rm_simple_config_reassembly_buffer.
   420 	 */
   441 	 */
   421 	EAP_FUNC_IMPORT eap_status_e eap_simple_config_fragment_send();
   442 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e eap_simple_config_fragment_send();
   422 
   443 
   423 	EAP_FUNC_IMPORT eap_status_e handle_eap_identity_query(
   444 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e handle_eap_identity_query(
   424 		const eap_am_network_id_c * const receive_network_id,
   445 		const eap_am_network_id_c * const receive_network_id,
   425 		const u8_t eap_identifier,
   446 		const u8_t eap_identifier,
   426 		const bool use_manual_username,
   447 		const bool use_manual_username,
   427 		const eap_variable_data_c * const manual_username,
   448 		const eap_variable_data_c * const manual_username,
   428 		const bool use_manual_realm,
   449 		const bool use_manual_realm,
   438 	//--------------------------------------------------
   459 	//--------------------------------------------------
   439 
   460 
   440 	/**
   461 	/**
   441 	 * Destructor cancels all timers and deletes member attributes.
   462 	 * Destructor cancels all timers and deletes member attributes.
   442 	 */
   463 	 */
   443 	EAP_FUNC_IMPORT virtual ~eap_type_simple_config_c();
   464 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H virtual ~eap_type_simple_config_c();
   444 
   465 
   445 	/**
   466 	/**
   446 	 * Constructor initializes all member attributes.
   467 	 * Constructor initializes all member attributes.
   447 	 */
   468 	 */
   448 	EAP_FUNC_IMPORT eap_type_simple_config_c(
   469 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_type_simple_config_c(
   449 		abs_eap_am_tools_c * const tools, ///< This is pointer to the tools AM of current platform.
   470 		abs_eap_am_tools_c * const tools, ///< This is pointer to the tools AM of current platform.
   450 		abs_eap_base_type_c * const partner, ///< This is back pointer to object which created this object.
   471 		abs_eap_base_type_c * const partner, ///< This is back pointer to object which created this object.
   451 		eap_am_type_simple_config_c * const am_type_simple_config, ///< This is pointer to adaptation module of EAP-SIMPLE_CONFIG type.
   472 		eap_am_type_simple_config_c * const am_type_simple_config, ///< This is pointer to adaptation module of EAP-SIMPLE_CONFIG type.
   452 		const bool free_am_type_simple_config,
   473 		const bool free_am_type_simple_config,
   453 		simple_config_base_record_c * const simple_config_record, /// This is pointer to SIMPLE_CONFIG implementation.
   474 		simple_config_base_record_c * const simple_config_record, /// This is pointer to SIMPLE_CONFIG implementation.
   458 		);
   479 		);
   459 
   480 
   460 	/**
   481 	/**
   461 	 * This function creates reassembly state string.
   482 	 * This function creates reassembly state string.
   462 	 */
   483 	 */
   463 	EAP_FUNC_IMPORT static eap_const_string get_reassembly_state_string(eap_type_simple_config_reassembly_state_e state);
   484 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H static eap_const_string get_reassembly_state_string(eap_type_simple_config_reassembly_state_e state);
   464 
   485 
   465 	/**
   486 	/**
   466 	 * This function creates state string.
   487 	 * This function creates state string.
   467 	 */
   488 	 */
   468 	EAP_FUNC_IMPORT static eap_const_string get_state_string(eap_type_simple_config_state_variable_e state);
   489 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H static eap_const_string get_state_string(eap_type_simple_config_state_variable_e state);
   469 
   490 
   470 
   491 
   471 	/**
   492 	/**
   472 	 * This function tells if the object is a client or a server..
   493 	 * This function tells if the object is a client or a server..
   473 	 */
   494 	 */
   474 	EAP_FUNC_IMPORT bool get_is_client();
   495 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H bool get_is_client();
   475 
   496 
   476 	// This is commented in abs_eap_am_type_simple_config_c::complete_eap_identity_query().
   497 	// This is commented in abs_eap_am_type_simple_config_c::complete_eap_identity_query().
   477 	EAP_FUNC_IMPORT eap_status_e complete_eap_identity_query(
   498 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e complete_eap_identity_query(
   478 		const eap_am_network_id_c * const receive_network_id,
   499 		const eap_am_network_id_c * const receive_network_id,
   479 		const u8_t eap_identifier,
   500 		const u8_t eap_identifier,
   480 		const eap_status_e completion_status,
   501 		const eap_status_e completion_status,
   481 		const bool use_manual_username,
   502 		const bool use_manual_username,
   482 		const eap_variable_data_c * const manual_username,
   503 		const eap_variable_data_c * const manual_username,
   486 
   507 
   487 	/**
   508 	/**
   488 	 * The partner class calls this function when EAP-SIMPLE_CONFIG packet is received.
   509 	 * The partner class calls this function when EAP-SIMPLE_CONFIG packet is received.
   489 	 * see also eap_base_type_c::packet_process().
   510 	 * see also eap_base_type_c::packet_process().
   490 	 */
   511 	 */
   491 	EAP_FUNC_IMPORT eap_status_e packet_process(
   512 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e packet_process(
   492 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   513 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   493 		eap_header_wr_c * const eap, ///< This is pointer to EAP header and data.
   514 		eap_header_wr_c * const eap, ///< This is pointer to EAP header and data.
   494 		const u32_t eap_packet_length ///< This is length of received EAP packet.
   515 		const u32_t eap_packet_length ///< This is length of received EAP packet.
   495 		);
   516 		);
   496 
   517 
   497 	/**
   518 	/**
   498 	 * This function processes the EAP-Response/Identity.
   519 	 * This function processes the EAP-Response/Identity.
   499 	 */
   520 	 */
   500 	EAP_FUNC_IMPORT eap_status_e eap_identity_response_packet_process(
   521 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e eap_identity_response_packet_process(
   501 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   522 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   502 		eap_header_wr_c * const received_eap, ///< This is pointer to EAP header and data.
   523 		eap_header_wr_c * const received_eap, ///< This is pointer to EAP header and data.
   503 		const u32_t eap_packet_length ///< This is length of received EAP packet.
   524 		const u32_t eap_packet_length ///< This is length of received EAP packet.
   504 		);
   525 		);
   505 
   526 
   506 	/**
   527 	/**
   507 	 * This function processes the EAP-SIMPLE_CONFIG packets.
   528 	 * This function processes the EAP-SIMPLE_CONFIG packets.
   508 	 */
   529 	 */
   509 	EAP_FUNC_IMPORT eap_status_e simple_config_packet_process(
   530 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e simple_config_packet_process(
   510 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   531 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   511 		eap_simple_config_header_c * const received_simple_config, ///< This is pointer to EAP header including EAP-SIMPLE_CONFIG fields.
   532 		eap_simple_config_header_c * const received_simple_config, ///< This is pointer to EAP header including EAP-SIMPLE_CONFIG fields.
   512 		const u32_t simple_config_packet_length ///< This is length of received EAP-SIMPLE_CONFIG packet.
   533 		const u32_t simple_config_packet_length ///< This is length of received EAP-SIMPLE_CONFIG packet.
   513 		);
   534 		);
   514 
   535 
   515 	// This is commented in abs_eap_base_timer_c::timer_delete_data().
   536 	// This is commented in abs_eap_base_timer_c::timer_delete_data().
   516 	EAP_FUNC_IMPORT eap_status_e timer_expired(
   537 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e timer_expired(
   517 		const u32_t id, void *data
   538 		const u32_t id, void *data
   518 		);
   539 		);
   519 
   540 
   520 	// This is commented in abs_eap_base_timer_c::timer_delete_data().
   541 	// This is commented in abs_eap_base_timer_c::timer_delete_data().
   521 	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
   542 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e timer_delete_data(
   522 		const u32_t id, void *data
   543 		const u32_t id, void *data
   523 		);
   544 		);
   524 
   545 
   525 	// This is commented in eap_base_type_c::set_is_valid().
   546 	// This is commented in eap_base_type_c::set_is_valid().
   526 	EAP_FUNC_IMPORT void set_is_valid();
   547 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void set_is_valid();
   527 
   548 
   528 	// This is commented in eap_base_type_c::get_is_valid().
   549 	// This is commented in eap_base_type_c::get_is_valid().
   529 	EAP_FUNC_IMPORT bool get_is_valid();
   550 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H bool get_is_valid();
   530 
   551 
   531 	// This is commented in eap_base_type_c::configure().
   552 	// This is commented in eap_base_type_c::configure().
   532 	EAP_FUNC_IMPORT eap_status_e configure();
   553 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e configure();
   533 
   554 
   534 	// This is commented in eap_base_type_c::shutdown().
   555 	// This is commented in eap_base_type_c::shutdown().
   535 	EAP_FUNC_IMPORT eap_status_e shutdown();
   556 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e shutdown();
   536 
   557 
   537 	// This is commented in eap_base_type_c::query_eap_identity().
   558 	// This is commented in eap_base_type_c::query_eap_identity().
   538 	EAP_FUNC_IMPORT eap_status_e query_eap_identity(
   559 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e query_eap_identity(
   539 		const bool must_be_synchronous,
   560 		const bool must_be_synchronous,
   540 		eap_variable_data_c * const identity,
   561 		eap_variable_data_c * const identity,
   541 		const eap_am_network_id_c * const receive_network_id,
   562 		const eap_am_network_id_c * const receive_network_id,
   542 		const u8_t eap_identifier);
   563 		const u8_t eap_identifier);
   543 
   564 
   544 	// This is commented in eap_base_type_c::query_eap_identity().
   565 	// This is commented in eap_base_type_c::query_eap_identity().
   545 	EAP_FUNC_IMPORT eap_status_e set_initial_eap_identifier(
   566 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e set_initial_eap_identifier(
   546 		const eap_am_network_id_c * const receive_network_id,
   567 		const eap_am_network_id_c * const receive_network_id,
   547 		const u8_t initial_identifier);
   568 		const u8_t initial_identifier);
   548 
   569 
   549 	// This is commented in eap_base_type_c::eap_acknowledge().
   570 	// This is commented in eap_base_type_c::eap_acknowledge().
   550 	EAP_FUNC_IMPORT eap_status_e eap_acknowledge(
   571 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e eap_acknowledge(
   551 		const eap_am_network_id_c * const receive_network_id);
   572 		const eap_am_network_id_c * const receive_network_id);
   552 
   573 
   553 	/**
   574 	/**
   554 	 * This function must reset the state of object to same as 
   575 	 * This function must reset the state of object to same as 
   555 	 * state was after the configure() function call.
   576 	 * state was after the configure() function call.
   556 	 * If object reset succeeds this function must return eap_status_ok.
   577 	 * If object reset succeeds this function must return eap_status_ok.
   557 	 * If object reset fails this function must return corresponding error status.
   578 	 * If object reset fails this function must return corresponding error status.
   558 	 * @return This function returns the status of reset operation.
   579 	 * @return This function returns the status of reset operation.
   559 	 */
   580 	 */
   560 	EAP_FUNC_IMPORT eap_status_e reset();
   581 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e reset();
   561 
   582 
   562 	/// @see abs_simple_config_base_record_c::state_notification().
   583 	/// @see abs_simple_config_base_record_c::state_notification().
   563 	EAP_FUNC_IMPORT void state_notification(
   584 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H void state_notification(
   564 		const abs_eap_state_notification_c * const state
   585 		const abs_eap_state_notification_c * const state
   565 		);
   586 		);
   566 
   587 
   567 	/// @see abs_simple_config_base_record_c::packet_send().
   588 	/// @see abs_simple_config_base_record_c::packet_send().
   568 	EAP_FUNC_IMPORT eap_status_e simple_config_packet_send(
   589 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e simple_config_packet_send(
   569 		eap_buf_chain_wr_c * const sent_packet,
   590 		eap_buf_chain_wr_c * const sent_packet,
   570 		const simple_config_Message_Type_e message_type);
   591 		const simple_config_Message_Type_e message_type);
   571 
   592 
   572 	/// @see abs_simple_config_base_record_c::packet_send().
   593 	/// @see abs_simple_config_base_record_c::packet_send().
   573 	EAP_FUNC_IMPORT eap_status_e packet_send(
   594 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e packet_send(
   574 		const eap_am_network_id_c * const network_id,
   595 		const eap_am_network_id_c * const network_id,
   575 		eap_buf_chain_wr_c * const sent_packet,
   596 		eap_buf_chain_wr_c * const sent_packet,
   576 		const u32_t header_offset,
   597 		const u32_t header_offset,
   577 		const u32_t data_length,
   598 		const u32_t data_length,
   578 		const u32_t buffer_length);
   599 		const u32_t buffer_length);
   579 
   600 
   580 	/// @see abs_simple_config_base_record_c::get_header_offset().
   601 	/// @see abs_simple_config_base_record_c::get_header_offset().
   581 	EAP_FUNC_IMPORT u32_t get_header_offset(
   602 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H u32_t get_header_offset(
   582 		u32_t * const MTU,
   603 		u32_t * const MTU,
   583 		u32_t * const trailer_length
   604 		u32_t * const trailer_length
   584 		);
   605 		);
   585 
   606 
   586 	/// @see abs_simple_config_base_record_c::restart_authentication().
   607 	/// @see abs_simple_config_base_record_c::restart_authentication().
   587 	EAP_FUNC_IMPORT eap_status_e restart_authentication(
   608 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e restart_authentication(
   588 		const eap_am_network_id_c * const receive_network_id,
   609 		const eap_am_network_id_c * const receive_network_id,
   589 		const bool is_client_when_true,
   610 		const bool is_client_when_true,
   590 		const bool force_clean_restart,
   611 		const bool force_clean_restart,
   591 		const bool from_timer);
   612 		const bool from_timer);
   592 
   613 
   593 	/// @see abs_simple_config_base_record_c::read_configure().
   614 	/// @see abs_simple_config_base_record_c::read_configure().
   594 	EAP_FUNC_IMPORT virtual eap_status_e read_configure(
   615 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H virtual eap_status_e read_configure(
   595 		const eap_configuration_field_c * const field,
   616 		const eap_configuration_field_c * const field,
   596 		eap_variable_data_c * const data
   617 		eap_variable_data_c * const data
   597 		);
   618 		);
   598 
   619 
   599 	/// @see abs_simple_config_base_record_c::write_configure().
   620 	/// @see abs_simple_config_base_record_c::write_configure().
   600 	EAP_FUNC_IMPORT virtual eap_status_e write_configure(
   621 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H virtual eap_status_e write_configure(
   601 		const eap_configuration_field_c * const field,
   622 		const eap_configuration_field_c * const field,
   602 		eap_variable_data_c * const data
   623 		eap_variable_data_c * const data
   603 		);
   624 		);
   604 
   625 
   605 	/// @see abs_simple_config_base_record_c::set_timer().
   626 	/// @see abs_simple_config_base_record_c::set_timer().
   606 	EAP_FUNC_IMPORT eap_status_e set_timer(
   627 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e set_timer(
   607 		abs_eap_base_timer_c * const p_initializer, 
   628 		abs_eap_base_timer_c * const p_initializer, 
   608 		const u32_t p_id, 
   629 		const u32_t p_id, 
   609 		void * const p_data,
   630 		void * const p_data,
   610 		const u32_t p_time_ms);
   631 		const u32_t p_time_ms);
   611 
   632 
   612 	/// @see abs_simple_config_base_record_c::cancel_timer().
   633 	/// @see abs_simple_config_base_record_c::cancel_timer().
   613 	EAP_FUNC_IMPORT eap_status_e cancel_timer(
   634 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e cancel_timer(
   614 		abs_eap_base_timer_c * const p_initializer, 
   635 		abs_eap_base_timer_c * const p_initializer, 
   615 		const u32_t p_id);
   636 		const u32_t p_id);
   616 
   637 
   617 	/// @see abs_simple_config_base_record_c::load_module().
   638 	/// @see abs_simple_config_base_record_c::load_module().
   618 	EAP_FUNC_IMPORT eap_status_e load_module(
   639 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e load_module(
   619 		const eap_type_value_e type,
   640 		const eap_type_value_e type,
   620 		const eap_type_value_e /* tunneling_type */,
   641 		const eap_type_value_e /* tunneling_type */,
   621 		abs_eap_base_type_c * const partner,
   642 		abs_eap_base_type_c * const partner,
   622 		eap_base_type_c ** const eap_type,
   643 		eap_base_type_c ** const eap_type,
   623 		const bool is_client_when_true,
   644 		const bool is_client_when_true,
   624 		const eap_am_network_id_c * const receive_network_id);
   645 		const eap_am_network_id_c * const receive_network_id);
   625 
   646 
   626 	/// @see abs_simple_config_base_record_c::unload_module().
   647 	/// @see abs_simple_config_base_record_c::unload_module().
   627 	EAP_FUNC_IMPORT eap_status_e unload_module(const eap_type_value_e type);
   648 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e unload_module(const eap_type_value_e type);
   628 
   649 
   629 	/// @see abs_simple_config_base_record_c::packet_data_crypto_keys().
   650 	/// @see abs_simple_config_base_record_c::packet_data_crypto_keys().
   630 	EAP_FUNC_IMPORT eap_status_e packet_data_crypto_keys(
   651 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e packet_data_crypto_keys(
   631 		const eap_am_network_id_c * const send_network_id,
   652 		const eap_am_network_id_c * const send_network_id,
   632 		const eap_master_session_key_c * const master_session_key);
   653 		const eap_master_session_key_c * const master_session_key);
   633 
   654 
   634 	/// @see abs_simple_config_base_record_c::check_is_valid_eap_type().
   655 	/// @see abs_simple_config_base_record_c::check_is_valid_eap_type().
   635 	EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
   656 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
   636 
   657 
   637 	/// @see abs_simple_config_base_record_c::get_eap_type_list().
   658 	/// @see abs_simple_config_base_record_c::get_eap_type_list().
   638 	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
   659 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e get_eap_type_list(
   639 		eap_array_c<eap_type_value_e> * const eap_type_list);
   660 		eap_array_c<eap_type_value_e> * const eap_type_list);
   640 
   661 
   641 	/// @see abs_simple_config_base_record_c::set_session_timeout().
   662 	/// @see abs_simple_config_base_record_c::set_session_timeout().
   642 	EAP_FUNC_IMPORT eap_status_e set_session_timeout(
   663 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e set_session_timeout(
   643 		const u32_t session_timeout_ms);
   664 		const u32_t session_timeout_ms);
   644 
   665 
   645 	EAP_FUNC_IMPORT eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
   666 	EAP_FUNC_VISIBILITY_EAP_TYPE_SIMPLE_CONFIG_H eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
   646 
   667 
   647 	//--------------------------------------------------
   668 	//--------------------------------------------------
   648 }; // class eap_type_simple_config_c
   669 }; // class eap_type_simple_config_c
   649 
   670 
   650 #endif //#if defined(USE_EAP_SIMPLE_CONFIG)
   671 #endif //#if defined(USE_EAP_SIMPLE_CONFIG)