eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_record.h
changeset 49 43351a4f2da3
parent 26 9abfd4f00d37
equal deleted inserted replaced
47:712b4ffd76bb 49:43351a4f2da3
    34 #include "simple_config_message.h"
    34 #include "simple_config_message.h"
    35 #include "eap_am_network_id.h"
    35 #include "eap_am_network_id.h"
    36 #include "eap_automatic_variable.h"
    36 #include "eap_automatic_variable.h"
    37 #include "eap_master_session_key.h"
    37 #include "eap_master_session_key.h"
    38 #include "abs_eap_base_timer.h"
    38 #include "abs_eap_base_timer.h"
       
    39 #include "eap_am_export.h"
       
    40 // Start: added by script change_export_macros.sh.
       
    41 #if defined(EAP_NO_EXPORT_SIMPLE_CONFIG_RECORD_H)
       
    42 	#define EAP_CLASS_VISIBILITY_SIMPLE_CONFIG_RECORD_H EAP_NONSHARABLE 
       
    43 	#define EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H 
       
    44 	#define EAP_C_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H 
       
    45 	#define EAP_FUNC_EXPORT_SIMPLE_CONFIG_RECORD_H 
       
    46 	#define EAP_C_FUNC_EXPORT_SIMPLE_CONFIG_RECORD_H 
       
    47 #elif defined(EAP_EXPORT_SIMPLE_CONFIG_RECORD_H)
       
    48 	#define EAP_CLASS_VISIBILITY_SIMPLE_CONFIG_RECORD_H EAP_EXPORT 
       
    49 	#define EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H EAP_FUNC_EXPORT 
       
    50 	#define EAP_C_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H EAP_C_FUNC_EXPORT 
       
    51 	#define EAP_FUNC_EXPORT_SIMPLE_CONFIG_RECORD_H EAP_FUNC_EXPORT 
       
    52 	#define EAP_C_FUNC_EXPORT_SIMPLE_CONFIG_RECORD_H EAP_C_FUNC_EXPORT 
       
    53 #else
       
    54 	#define EAP_CLASS_VISIBILITY_SIMPLE_CONFIG_RECORD_H EAP_IMPORT 
       
    55 	#define EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H EAP_FUNC_IMPORT 
       
    56 	#define EAP_C_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H EAP_C_FUNC_IMPORT 
       
    57 	#define EAP_FUNC_EXPORT_SIMPLE_CONFIG_RECORD_H 
       
    58 	#define EAP_C_FUNC_EXPORT_SIMPLE_CONFIG_RECORD_H 
       
    59 #endif
       
    60 // End: added by script change_export_macros.sh.
       
    61 
    39 
    62 
    40 
    63 
    41 class abs_simple_config_base_record_c;
    64 class abs_simple_config_base_record_c;
    42 class abs_eap_am_tools_c;
    65 class abs_eap_am_tools_c;
    43 class eap_am_network_id_c;
    66 class eap_am_network_id_c;
    74 /**
    97 /**
    75  * The simple_config_record_c class implements simple_config_base_record_c.
    98  * The simple_config_record_c class implements simple_config_base_record_c.
    76  * See more detailed design and architecture document <a href="../../type/simple_config/documentation/EAP_SIMPLE_CONFIG.doc">EAP_SIMPLE_CONFIG.doc</a>
    99  * See more detailed design and architecture document <a href="../../type/simple_config/documentation/EAP_SIMPLE_CONFIG.doc">EAP_SIMPLE_CONFIG.doc</a>
    77  * and <a href="../../type/simple_config/documentation/rfc2246.txt">RFC 2246</a>.
   100  * and <a href="../../type/simple_config/documentation/rfc2246.txt">RFC 2246</a>.
    78  */
   101  */
    79 class EAP_EXPORT simple_config_record_c
   102 class EAP_CLASS_VISIBILITY_SIMPLE_CONFIG_RECORD_H simple_config_record_c
    80 : public simple_config_base_record_c
   103 : public simple_config_base_record_c
    81 , public abs_simple_config_am_services_c
   104 , public abs_simple_config_am_services_c
    82 , public abs_eap_base_timer_c
   105 , public abs_eap_base_timer_c
    83 {
   106 {
    84 private:
   107 private:
   285 
   308 
   286 	/**
   309 	/**
   287 	 * The set_is_valid() function sets the state of the object valid.
   310 	 * The set_is_valid() function sets the state of the object valid.
   288 	 * The creator of this object calls this function after it is initialized. 
   311 	 * The creator of this object calls this function after it is initialized. 
   289 	 */
   312 	 */
   290 	EAP_FUNC_IMPORT void set_is_valid();
   313 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H void set_is_valid();
   291 
   314 
   292 
   315 
   293 	EAP_FUNC_IMPORT eap_status_e add_common_attributes(
   316 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e add_common_attributes(
   294 		simple_config_payloads_c * const payloads,
   317 		simple_config_payloads_c * const payloads,
   295 		const simple_config_Message_Type_e message_type,
   318 		const simple_config_Message_Type_e message_type,
   296 		const bool add_enrollee_nonce,
   319 		const bool add_enrollee_nonce,
   297 		const bool add_registrar_nonce);
   320 		const bool add_registrar_nonce);
   298 
   321 
   299 
   322 
   300 	EAP_FUNC_IMPORT eap_status_e send_M1(
   323 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_M1(
   301 		const simple_config_payloads_c * const network_and_device_parameters);
   324 		const simple_config_payloads_c * const network_and_device_parameters);
   302 
   325 
   303 	EAP_FUNC_IMPORT eap_status_e send_M3();
   326 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_M3();
   304 
   327 
   305 	EAP_FUNC_IMPORT eap_status_e send_M5();
   328 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_M5();
   306 
   329 
   307 	EAP_FUNC_IMPORT eap_status_e send_M7();
   330 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_M7();
   308 
   331 
   309 	EAP_FUNC_IMPORT eap_status_e send_WSC_ACK();
   332 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_WSC_ACK();
   310 
   333 
   311 	EAP_FUNC_IMPORT eap_status_e send_WSC_NACK();
   334 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_WSC_NACK();
   312 
   335 
   313 	EAP_FUNC_IMPORT eap_status_e send_WSC_Done();
   336 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_WSC_Done();
   314 
   337 
   315 
   338 
   316 #if defined(USE_EAP_TYPE_SERVER_SIMPLE_CONFIG)
   339 #if defined(USE_EAP_TYPE_SERVER_SIMPLE_CONFIG)
   317 
   340 
   318 	EAP_FUNC_IMPORT eap_status_e send_M2(
   341 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_M2(
   319 		const simple_config_payloads_c * const network_and_device_parameters);
   342 		const simple_config_payloads_c * const network_and_device_parameters);
   320 
   343 
   321 	EAP_FUNC_IMPORT eap_status_e send_M2D(
   344 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_M2D(
   322 		const simple_config_payloads_c * const network_and_device_parameters);
   345 		const simple_config_payloads_c * const network_and_device_parameters);
   323 
   346 
   324 	EAP_FUNC_IMPORT eap_status_e send_M4();
   347 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_M4();
   325 
   348 
   326 	EAP_FUNC_IMPORT eap_status_e send_M6();
   349 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_M6();
   327 
   350 
   328 	EAP_FUNC_IMPORT eap_status_e send_M8();
   351 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_M8();
   329 
   352 
   330 #endif //#if defined(USE_EAP_TYPE_SERVER_SIMPLE_CONFIG)
   353 #endif //#if defined(USE_EAP_TYPE_SERVER_SIMPLE_CONFIG)
   331 
   354 
   332 
   355 
   333 	EAP_FUNC_IMPORT eap_status_e process_M2(
   356 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_M2(
   334 		const simple_config_payloads_c * const payloads);
   357 		const simple_config_payloads_c * const payloads);
   335 
   358 
   336 	EAP_FUNC_IMPORT eap_status_e process_M2D(
   359 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_M2D(
   337 		const simple_config_payloads_c * const payloads);
   360 		const simple_config_payloads_c * const payloads);
   338 
   361 
   339 	EAP_FUNC_IMPORT eap_status_e process_M4(
   362 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_M4(
   340 		const simple_config_payloads_c * const payloads);
   363 		const simple_config_payloads_c * const payloads);
   341 
   364 
   342 	EAP_FUNC_IMPORT eap_status_e process_M6(
   365 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_M6(
   343 		const simple_config_payloads_c * const payloads);
   366 		const simple_config_payloads_c * const payloads);
   344 
   367 
   345 	EAP_FUNC_IMPORT eap_status_e process_M8(
   368 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_M8(
   346 		const simple_config_payloads_c * const payloads);
   369 		const simple_config_payloads_c * const payloads);
   347 
   370 
   348 	EAP_FUNC_IMPORT eap_status_e process_WSC_ACK(
   371 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_WSC_ACK(
   349 		const simple_config_payloads_c * const payloads);
   372 		const simple_config_payloads_c * const payloads);
   350 
   373 
   351 	EAP_FUNC_IMPORT eap_status_e process_WSC_NACK(
   374 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_WSC_NACK(
   352 		const simple_config_payloads_c * const payloads);
   375 		const simple_config_payloads_c * const payloads);
   353 
   376 
   354 #if defined(USE_EAP_TYPE_SERVER_SIMPLE_CONFIG)
   377 #if defined(USE_EAP_TYPE_SERVER_SIMPLE_CONFIG)
   355 
   378 
   356 	EAP_FUNC_IMPORT eap_status_e process_M1(
   379 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_M1(
   357 		const simple_config_payloads_c * const payloads);
   380 		const simple_config_payloads_c * const payloads);
   358 
   381 
   359 	EAP_FUNC_IMPORT eap_status_e process_M3(
   382 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_M3(
   360 		const simple_config_payloads_c * const payloads);
   383 		const simple_config_payloads_c * const payloads);
   361 
   384 
   362 	EAP_FUNC_IMPORT eap_status_e process_M5(
   385 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_M5(
   363 		const simple_config_payloads_c * const payloads);
   386 		const simple_config_payloads_c * const payloads);
   364 
   387 
   365 	EAP_FUNC_IMPORT eap_status_e process_M7(
   388 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_M7(
   366 		const simple_config_payloads_c * const payloads);
   389 		const simple_config_payloads_c * const payloads);
   367 
   390 
   368 	EAP_FUNC_IMPORT eap_status_e process_WSC_DONE(
   391 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_WSC_DONE(
   369 		const simple_config_payloads_c * const payloads);
   392 		const simple_config_payloads_c * const payloads);
   370 
   393 
   371 #endif //#if defined(USE_EAP_TYPE_SERVER_SIMPLE_CONFIG)
   394 #endif //#if defined(USE_EAP_TYPE_SERVER_SIMPLE_CONFIG)
   372 
   395 
   373 	EAP_FUNC_IMPORT void send_error_notification(const eap_status_e error);
   396 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H void send_error_notification(const eap_status_e error);
   374 
   397 
   375 
   398 
   376 	/**
   399 	/**
   377 	 * This function processes received SIMPLE_CONFIG attributes.
   400 	 * This function processes received SIMPLE_CONFIG attributes.
   378 	 */
   401 	 */
   379 	EAP_FUNC_IMPORT eap_status_e process_simple_config_attributes(
   402 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_simple_config_attributes(
   380 		const simple_config_payloads_c * const payloads);
   403 		const simple_config_payloads_c * const payloads);
   381 
   404 
   382 	/**
   405 	/**
   383 	 * This function processes received SIMPLE_CONFIG message.
   406 	 * This function processes received SIMPLE_CONFIG message.
   384 	 */
   407 	 */
   385 	EAP_FUNC_IMPORT eap_status_e process_simple_config_message();
   408 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e process_simple_config_message();
   386 
   409 
   387 
   410 
   388 	/**
   411 	/**
   389 	 * This function initialises timeout for received erroneous message.
   412 	 * This function initialises timeout for received erroneous message.
   390 	 * If no correct message is received before this timeout the authentication
   413 	 * If no correct message is received before this timeout the authentication
   391 	 * is terminated.
   414 	 * is terminated.
   392 	 */
   415 	 */
   393 	EAP_FUNC_IMPORT eap_status_e initalize_error_message_timeout();
   416 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e initalize_error_message_timeout();
   394 
   417 
   395 	/**
   418 	/**
   396 	 * This function cancels timeout for received erroneous message.
   419 	 * This function cancels timeout for received erroneous message.
   397 	 */
   420 	 */
   398 	EAP_FUNC_IMPORT eap_status_e cancel_error_message_timeout();
   421 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e cancel_error_message_timeout();
   399 
   422 
   400 
   423 
   401 	EAP_FUNC_IMPORT eap_status_e initialize_M2D_received_timeout();
   424 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e initialize_M2D_received_timeout();
   402 
   425 
   403 	EAP_FUNC_IMPORT eap_status_e cancel_M2D_received_timeout();
   426 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e cancel_M2D_received_timeout();
   404 
   427 
   405 
   428 
   406 	EAP_FUNC_IMPORT eap_status_e timer_expired(
   429 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e timer_expired(
   407 		const u32_t id,
   430 		const u32_t id,
   408 		void * data);
   431 		void * data);
   409 
   432 
   410 	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
   433 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e timer_delete_data(
   411 		const u32_t id,
   434 		const u32_t id,
   412 		void * data);
   435 		void * data);
   413 
   436 
   414 	/**
   437 	/**
   415 	 * This function verifies the Authenticator of received SIMPLE_CONFIG message.
   438 	 * This function verifies the Authenticator of received SIMPLE_CONFIG message.
   416 	 */
   439 	 */
   417 	EAP_FUNC_IMPORT eap_status_e verify_nonces_and_authenticator(
   440 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e verify_nonces_and_authenticator(
   418 		const eap_variable_data_c * const auth_key,
   441 		const eap_variable_data_c * const auth_key,
   419 		const eap_variable_data_c * const registrar_nonce,
   442 		const eap_variable_data_c * const registrar_nonce,
   420 		const eap_variable_data_c * const enrollee_nonce,
   443 		const eap_variable_data_c * const enrollee_nonce,
   421 		const simple_config_payloads_c * const payloads,
   444 		const simple_config_payloads_c * const payloads,
   422 		const bool check_enrollee_nonce,
   445 		const bool check_enrollee_nonce,
   424 		const bool check_authenticator);
   447 		const bool check_authenticator);
   425 
   448 
   426 	/**
   449 	/**
   427 	 * This function checks whether all pending queries are completed.
   450 	 * This function checks whether all pending queries are completed.
   428 	 */
   451 	 */
   429 	EAP_FUNC_IMPORT eap_status_e are_pending_queries_completed();
   452 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e are_pending_queries_completed();
   430 
   453 
   431 	/**
   454 	/**
   432 	 * This function indicates state to lower layer.
   455 	 * This function indicates state to lower layer.
   433 	 */
   456 	 */
   434 	EAP_FUNC_IMPORT eap_status_e indicate_state_to_lower_layer(
   457 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e indicate_state_to_lower_layer(
   435 		const simple_config_state_e indicated_state);
   458 		const simple_config_state_e indicated_state);
   436 
   459 
   437 	/**
   460 	/**
   438 	 * This function indicates all message processed to lower layer.
   461 	 * This function indicates all message processed to lower layer.
   439 	 */
   462 	 */
   440 	EAP_FUNC_IMPORT eap_status_e indicate_messages_processed();
   463 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e indicate_messages_processed();
   441 
   464 
   442 	/**
   465 	/**
   443 	 * This function combines SIMPLE_CONFIG-protocols data to a buffer and sends SIMPLE_CONFIG-message.
   466 	 * This function combines SIMPLE_CONFIG-protocols data to a buffer and sends SIMPLE_CONFIG-message.
   444 	 */
   467 	 */
   445 	EAP_FUNC_IMPORT eap_status_e send_simple_config_message();
   468 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e send_simple_config_message();
   446 
   469 
   447 	/**
   470 	/**
   448 	 * This function checks all queries are completed.
   471 	 * This function checks all queries are completed.
   449 	 * If all queries are completed this function send the pending LS-messages.
   472 	 * If all queries are completed this function send the pending LS-messages.
   450 	 */
   473 	 */
   451 	EAP_FUNC_IMPORT eap_status_e check_sent_simple_config_message();
   474 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e check_sent_simple_config_message();
   452 
   475 
   453 	/**
   476 	/**
   454 	 * This function generates ephemeral Diffie-Hellman keys.
   477 	 * This function generates ephemeral Diffie-Hellman keys.
   455 	 * Keys are stored to m_own_private_dhe_key and m_own_public_dhe_key.
   478 	 * Keys are stored to m_own_private_dhe_key and m_own_public_dhe_key.
   456 	 */
   479 	 */
   457 	EAP_FUNC_IMPORT eap_status_e generate_dhe_keys();
   480 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e generate_dhe_keys();
   458 
   481 
   459 	/**
   482 	/**
   460 	 * This function generates ephemeral Diffie-Hellman shared secret.
   483 	 * This function generates ephemeral Diffie-Hellman shared secret.
   461 	 * Shared secret is stored to dhe_shared_secret.
   484 	 * Shared secret is stored to dhe_shared_secret.
   462 	 */
   485 	 */
   463 	EAP_FUNC_IMPORT eap_status_e generate_dhe_shared_secret(
   486 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e generate_dhe_shared_secret(
   464 		const eap_variable_data_c * const registrar_public_key_data,
   487 		const eap_variable_data_c * const registrar_public_key_data,
   465 		eap_variable_data_c * const dhe_shared_secret);
   488 		eap_variable_data_c * const dhe_shared_secret);
   466 
   489 
   467 	EAP_FUNC_IMPORT eap_status_e generate_nonce(
   490 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e generate_nonce(
   468 		eap_variable_data_c * const nonce,
   491 		eap_variable_data_c * const nonce,
   469 		const u32_t nonce_length);
   492 		const u32_t nonce_length);
   470 
   493 
   471 	EAP_FUNC_IMPORT eap_status_e generate_erhash(
   494 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e generate_erhash(
   472 		const bool verify,
   495 		const bool verify,
   473 		const eap_variable_data_c * const half_of_device_password,
   496 		const eap_variable_data_c * const half_of_device_password,
   474 		const eap_variable_data_c * const PKE,
   497 		const eap_variable_data_c * const PKE,
   475 		const eap_variable_data_c * const PKR,
   498 		const eap_variable_data_c * const PKR,
   476 		eap_variable_data_c * const PSKn,
   499 		eap_variable_data_c * const PSKn,
   477 		eap_variable_data_c * const ERSn,
   500 		eap_variable_data_c * const ERSn,
   478 		eap_variable_data_c * const ERHash);
   501 		eap_variable_data_c * const ERHash);
   479 
   502 
   480 	EAP_FUNC_IMPORT eap_status_e generate_er_hashs(
   503 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e generate_er_hashs(
   481 		const bool verify,
   504 		const bool verify,
   482 		const eap_variable_data_c * const device_password,
   505 		const eap_variable_data_c * const device_password,
   483 		const eap_variable_data_c * const PKE,
   506 		const eap_variable_data_c * const PKE,
   484 		const eap_variable_data_c * const PKR,
   507 		const eap_variable_data_c * const PKR,
   485 		eap_variable_data_c * const PSK1,
   508 		eap_variable_data_c * const PSK1,
   488 		eap_variable_data_c * const PSK2,
   511 		eap_variable_data_c * const PSK2,
   489 		eap_variable_data_c * const ER_S2,
   512 		eap_variable_data_c * const ER_S2,
   490 		eap_variable_data_c * const ER_Hash2);
   513 		eap_variable_data_c * const ER_Hash2);
   491 
   514 
   492 
   515 
   493 	EAP_FUNC_IMPORT eap_status_e keyed_hmac(
   516 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e keyed_hmac(
   494 		const eap_variable_data_c * const key,
   517 		const eap_variable_data_c * const key,
   495 		const eap_variable_data_c * const input,
   518 		const eap_variable_data_c * const input,
   496 		eap_variable_data_c * const output);
   519 		eap_variable_data_c * const output);
   497 
   520 
   498 	/**
   521 	/**
   499 	 * This function generates KDK of Simple Config.
   522 	 * This function generates KDK of Simple Config.
   500 	 */
   523 	 */
   501 	EAP_FUNC_IMPORT eap_status_e generate_kdk(
   524 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e generate_kdk(
   502 		const eap_variable_data_c * const dhe_shared_secret,
   525 		const eap_variable_data_c * const dhe_shared_secret,
   503 		const eap_variable_data_c * const nonce_1,
   526 		const eap_variable_data_c * const nonce_1,
   504 		const eap_variable_data_c * const enrollee_mac,
   527 		const eap_variable_data_c * const enrollee_mac,
   505 		const eap_variable_data_c * const nonce_2,
   528 		const eap_variable_data_c * const nonce_2,
   506 		eap_variable_data_c * const kdk);
   529 		eap_variable_data_c * const kdk);
   507 
   530 
   508 	/**
   531 	/**
   509 	 * This is key derivation function of Simple Config.
   532 	 * This is key derivation function of Simple Config.
   510 	 */
   533 	 */
   511 	EAP_FUNC_IMPORT eap_status_e key_derivation_function(
   534 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e key_derivation_function(
   512 		const eap_variable_data_c * const key,
   535 		const eap_variable_data_c * const key,
   513 		const eap_variable_data_c * const personalization_string,
   536 		const eap_variable_data_c * const personalization_string,
   514 		const u32_t total_key_bits,
   537 		const u32_t total_key_bits,
   515 		eap_variable_data_c * const result);
   538 		eap_variable_data_c * const result);
   516 
   539 
   517 	/**
   540 	/**
   518 	 * This function derives additional keys of Simple Config.
   541 	 * This function derives additional keys of Simple Config.
   519 	 */
   542 	 */
   520 	EAP_FUNC_IMPORT eap_status_e derive_additional_keys(
   543 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e derive_additional_keys(
   521 		const eap_variable_data_c * const kdk,
   544 		const eap_variable_data_c * const kdk,
   522 		eap_variable_data_c * const auth_key,
   545 		eap_variable_data_c * const auth_key,
   523 		eap_variable_data_c * const key_wrap_key,
   546 		eap_variable_data_c * const key_wrap_key,
   524 		eap_variable_data_c * const EMSK);
   547 		eap_variable_data_c * const EMSK);
   525 
   548 
   526 	EAP_FUNC_IMPORT eap_status_e generate_authenticator(
   549 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e generate_authenticator(
   527 		const eap_variable_data_c * const received_simple_config_message,
   550 		const eap_variable_data_c * const received_simple_config_message,
   528 		const eap_variable_data_c * const new_simple_config_message_data,
   551 		const eap_variable_data_c * const new_simple_config_message_data,
   529 		eap_variable_data_c * const authenticator);
   552 		eap_variable_data_c * const authenticator);
   530 
   553 
   531 	EAP_FUNC_IMPORT eap_status_e add_authenticator_attribute(
   554 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e add_authenticator_attribute(
   532 		simple_config_message_c * const received_simple_config_message,
   555 		simple_config_message_c * const received_simple_config_message,
   533 		simple_config_message_c * const new_simple_config_message);
   556 		simple_config_message_c * const new_simple_config_message);
   534 
   557 
   535 	EAP_FUNC_IMPORT eap_status_e encrypt_payloads(
   558 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e encrypt_payloads(
   536 		const eap_variable_data_c * const auth_key,
   559 		const eap_variable_data_c * const auth_key,
   537 		const eap_variable_data_c * const key_wrap_key,
   560 		const eap_variable_data_c * const key_wrap_key,
   538 		simple_config_payloads_c * const plaintext_payloads,
   561 		simple_config_payloads_c * const plaintext_payloads,
   539 		simple_config_variable_data_c * const encrypted_settings);
   562 		simple_config_variable_data_c * const encrypted_settings);
   540 
   563 
   541 	EAP_FUNC_IMPORT eap_status_e decrypt_payloads(
   564 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e decrypt_payloads(
   542 		const eap_variable_data_c * const auth_key,
   565 		const eap_variable_data_c * const auth_key,
   543 		const eap_variable_data_c * const key_wrap_key,
   566 		const eap_variable_data_c * const key_wrap_key,
   544 		simple_config_variable_data_c * const encrypted_settings,
   567 		simple_config_variable_data_c * const encrypted_settings,
   545 		simple_config_payloads_c * const plaintext_payloads);
   568 		simple_config_payloads_c * const plaintext_payloads);
   546 
   569 
   547 	/**
   570 	/**
   548 	 * This function adds new completion action to the end of the m_completion_queue.
   571 	 * This function adds new completion action to the end of the m_completion_queue.
   549 	 */
   572 	 */
   550 	EAP_FUNC_IMPORT eap_status_e completion_action_add(
   573 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e completion_action_add(
   551 		simple_config_completion_action_e action);
   574 		simple_config_completion_action_e action);
   552 
   575 
   553 	/**
   576 	/**
   554 	 * This function verifies all completion actions are completed.
   577 	 * This function verifies all completion actions are completed.
   555 	 */
   578 	 */
   556 	EAP_FUNC_IMPORT eap_status_e completion_action_clenup();
   579 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e completion_action_clenup();
   557 
   580 
   558 	/**
   581 	/**
   559 	 * This function checks and completes completion actions.
   582 	 * This function checks and completes completion actions.
   560 	 * This function could return eap_status_pending_request if the
   583 	 * This function could return eap_status_pending_request if the
   561 	 * first completion action cannot be completed yet.
   584 	 * first completion action cannot be completed yet.
   562 	 */
   585 	 */
   563 	EAP_FUNC_IMPORT eap_status_e completion_action_check();
   586 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e completion_action_check();
   564 
   587 
   565 	/**
   588 	/**
   566 	 * This function sets the state of SIMPLE_CONFIG.
   589 	 * This function sets the state of SIMPLE_CONFIG.
   567 	 */
   590 	 */
   568 	EAP_FUNC_IMPORT simple_config_state_e get_state() const;
   591 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H simple_config_state_e get_state() const;
   569 
   592 
   570 	/**
   593 	/**
   571 	 * This function gets the state of SIMPLE_CONFIG.
   594 	 * This function gets the state of SIMPLE_CONFIG.
   572 	 */
   595 	 */
   573 	EAP_FUNC_IMPORT void set_state(const simple_config_state_e state);
   596 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H void set_state(const simple_config_state_e state);
   574 
   597 
   575 	/**
   598 	/**
   576 	 * This function verified the current state of SIMPLE_CONFIG and parameter state are equal.
   599 	 * This function verified the current state of SIMPLE_CONFIG and parameter state are equal.
   577 	 */
   600 	 */
   578 	EAP_FUNC_IMPORT bool verify_state(const simple_config_state_e state);
   601 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H bool verify_state(const simple_config_state_e state);
   579 
   602 
   580 	eap_status_e fix_incorrect_network_key(
   603 	eap_status_e fix_incorrect_network_key(
   581 		eap_variable_data_c * const network_key, 
   604 		eap_variable_data_c * const network_key, 
   582 		const simple_config_Authentication_Type_e authentication_type);
   605 		const simple_config_Authentication_Type_e authentication_type);
   583 
   606 
   590 	//--------------------------------------------------
   613 	//--------------------------------------------------
   591 
   614 
   592 	/**
   615 	/**
   593 	 * The destructor of the simple_config_record_c class does nothing special.
   616 	 * The destructor of the simple_config_record_c class does nothing special.
   594 	 */
   617 	 */
   595 	EAP_FUNC_IMPORT virtual ~simple_config_record_c();
   618 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H virtual ~simple_config_record_c();
   596 
   619 
   597 	/**
   620 	/**
   598 	 * The constructor of the simple_config_record_c class simply initializes the attributes.
   621 	 * The constructor of the simple_config_record_c class simply initializes the attributes.
   599 	 * The simple_config_record_c object sends packets to the network using simple_config_base_record_c::get_type_partner() object.
   622 	 * The simple_config_record_c object sends packets to the network using simple_config_base_record_c::get_type_partner() object.
   600 	 */
   623 	 */
   601 	EAP_FUNC_IMPORT simple_config_record_c(
   624 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H simple_config_record_c(
   602 		abs_eap_am_tools_c * const tools, ///< tools is pointer to the tools class. @see abs_eap_am_tools_c.
   625 		abs_eap_am_tools_c * const tools, ///< tools is pointer to the tools class. @see abs_eap_am_tools_c.
   603 		simple_config_am_services_c * const am_simple_config_services, ///< This is pointer to adaoptation module of SIMPLE_CONFIG.
   626 		simple_config_am_services_c * const am_simple_config_services, ///< This is pointer to adaoptation module of SIMPLE_CONFIG.
   604 		const bool free_am_simple_config_services,
   627 		const bool free_am_simple_config_services,
   605 		const bool is_client_when_true, ///< Indicates whether this is client (true) or server (false).
   628 		const bool is_client_when_true, ///< Indicates whether this is client (true) or server (false).
   606 		const eap_am_network_id_c * const receive_network_id);
   629 		const eap_am_network_id_c * const receive_network_id);
   608 	/**
   631 	/**
   609 	 * The configure() function is called after the constructor of the 
   632 	 * The configure() function is called after the constructor of the 
   610 	 * object is successfully executed. During the function call the object 
   633 	 * object is successfully executed. During the function call the object 
   611 	 * could query the configuration. Each derived class must define this function.
   634 	 * could query the configuration. Each derived class must define this function.
   612 	 */
   635 	 */
   613 	EAP_FUNC_IMPORT eap_status_e configure();
   636 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e configure();
   614 
   637 
   615 	/**
   638 	/**
   616 	 * The shutdown() function is called before the destructor of the 
   639 	 * The shutdown() function is called before the destructor of the 
   617 	 * object is executed. During the function call the object 
   640 	 * object is executed. During the function call the object 
   618 	 * could shutdown the operations, for example cancel timers.
   641 	 * could shutdown the operations, for example cancel timers.
   619 	 * Each derived class must define this function.
   642 	 * Each derived class must define this function.
   620 	 */
   643 	 */
   621 	EAP_FUNC_IMPORT eap_status_e shutdown();
   644 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e shutdown();
   622 
   645 
   623 	/**
   646 	/**
   624 	 * This function sets the NAI realm.
   647 	 * This function sets the NAI realm.
   625 	 */
   648 	 */
   626 	EAP_FUNC_IMPORT eap_status_e set_nai_realm(
   649 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e set_nai_realm(
   627 		const eap_variable_data_c * const NAI_realm ///< This is the full NAI realm.
   650 		const eap_variable_data_c * const NAI_realm ///< This is the full NAI realm.
   628 		);
   651 		);
   629 
   652 
   630 	// This is commented in abs_simple_config_base_application_c.
   653 	// This is commented in abs_simple_config_base_application_c.
   631 	EAP_FUNC_IMPORT eap_status_e read_configure(
   654 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e read_configure(
   632 		const eap_configuration_field_c * const field,
   655 		const eap_configuration_field_c * const field,
   633 		eap_variable_data_c * const data);
   656 		eap_variable_data_c * const data);
   634 
   657 
   635 	// This is commented in abs_simple_config_base_application_c.
   658 	// This is commented in abs_simple_config_base_application_c.
   636 	EAP_FUNC_IMPORT eap_status_e write_configure(
   659 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e write_configure(
   637 		const eap_configuration_field_c * const field,
   660 		const eap_configuration_field_c * const field,
   638 		eap_variable_data_c * const data);
   661 		eap_variable_data_c * const data);
   639 
   662 
   640 	/**
   663 	/**
   641 	 * This function sends starts EAP-SIMPLE_CONFIG/PEAP after a start message is received.
   664 	 * This function sends starts EAP-SIMPLE_CONFIG/PEAP after a start message is received.
   642 	 */
   665 	 */
   643 	EAP_FUNC_IMPORT eap_status_e start_simple_config_authentication(
   666 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e start_simple_config_authentication(
   644 		const eap_variable_data_c * const NAI ///< This is the full NAI of the client.
   667 		const eap_variable_data_c * const NAI ///< This is the full NAI of the client.
   645 		);
   668 		);
   646 
   669 
   647 	/**
   670 	/**
   648 	 * This function processes the received packet.
   671 	 * This function processes the received packet.
   649 	 * @param simple_config_packet includes the buffer of the whole reassembled SIMPLE_CONFIG-packet.
   672 	 * @param simple_config_packet includes the buffer of the whole reassembled SIMPLE_CONFIG-packet.
   650 	 */
   673 	 */
   651 	EAP_FUNC_IMPORT eap_status_e packet_process(
   674 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e packet_process(
   652 		eap_variable_data_c * const simple_config_packet,
   675 		eap_variable_data_c * const simple_config_packet,
   653 		const u8_t received_eap_identifier);
   676 		const u8_t received_eap_identifier);
   654 
   677 
   655 	/**
   678 	/**
   656 	 * Object must indicate it's validity.
   679 	 * Object must indicate it's validity.
   657 	 * If object initialization fails this function must return false.
   680 	 * If object initialization fails this function must return false.
   658 	 * @return This function returns the validity of this object.
   681 	 * @return This function returns the validity of this object.
   659 	 */
   682 	 */
   660 	EAP_FUNC_IMPORT bool get_is_valid();
   683 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H bool get_is_valid();
   661 
   684 
   662 	/**
   685 	/**
   663 	 * This function must reset the state of object to same as 
   686 	 * This function must reset the state of object to same as 
   664 	 * state was after the configure() function call.
   687 	 * state was after the configure() function call.
   665 	 * If object reset succeeds this function must return eap_status_ok.
   688 	 * If object reset succeeds this function must return eap_status_ok.
   666 	 * If object reset fails this function must return corresponding error status.
   689 	 * If object reset fails this function must return corresponding error status.
   667 	 * @return This function returns the status of reset operation.
   690 	 * @return This function returns the status of reset operation.
   668 	 */
   691 	 */
   669 	EAP_FUNC_IMPORT eap_status_e reset();
   692 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e reset();
   670 
   693 
   671 	// This is commented in abs_simple_config_am_services_c::complete_query_network_and_device_parameters().
   694 	// This is commented in abs_simple_config_am_services_c::complete_query_network_and_device_parameters().
   672 	EAP_FUNC_IMPORT eap_status_e complete_query_network_and_device_parameters(
   695 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_RECORD_H eap_status_e complete_query_network_and_device_parameters(
   673 		const simple_config_state_e state,
   696 		const simple_config_state_e state,
   674 		simple_config_payloads_c * const network_and_device_parameters,
   697 		simple_config_payloads_c * const network_and_device_parameters,
   675 		const eap_status_e completion_status);
   698 		const eap_status_e completion_status);
   676 
   699 
   677 	//--------------------------------------------------
   700 	//--------------------------------------------------