eapol/eapol_framework/eapol_common/type/radius/include/eap_radius.h
changeset 52 c23bdf5a328a
parent 33 938269283a16
equal deleted inserted replaced
51:e863583e6720 52:c23bdf5a328a
    22 #if !defined(_RADIUS_CORE_H_)
    22 #if !defined(_RADIUS_CORE_H_)
    23 #define _RADIUS_CORE_H_
    23 #define _RADIUS_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_RADIUS_H)
       
    29 	#define EAP_CLASS_VISIBILITY_EAP_RADIUS_H EAP_NONSHARABLE 
       
    30 	#define EAP_FUNC_VISIBILITY_EAP_RADIUS_H 
       
    31 	#define EAP_C_FUNC_VISIBILITY_EAP_RADIUS_H 
       
    32 	#define EAP_FUNC_EXPORT_EAP_RADIUS_H 
       
    33 	#define EAP_C_FUNC_EXPORT_EAP_RADIUS_H 
       
    34 #elif defined(EAP_EXPORT_EAP_RADIUS_H)
       
    35 	#define EAP_CLASS_VISIBILITY_EAP_RADIUS_H EAP_EXPORT 
       
    36 	#define EAP_FUNC_VISIBILITY_EAP_RADIUS_H EAP_FUNC_EXPORT 
       
    37 	#define EAP_C_FUNC_VISIBILITY_EAP_RADIUS_H EAP_C_FUNC_EXPORT 
       
    38 	#define EAP_FUNC_EXPORT_EAP_RADIUS_H EAP_FUNC_EXPORT 
       
    39 	#define EAP_C_FUNC_EXPORT_EAP_RADIUS_H EAP_C_FUNC_EXPORT 
       
    40 #else
       
    41 	#define EAP_CLASS_VISIBILITY_EAP_RADIUS_H EAP_IMPORT 
       
    42 	#define EAP_FUNC_VISIBILITY_EAP_RADIUS_H EAP_FUNC_IMPORT 
       
    43 	#define EAP_C_FUNC_VISIBILITY_EAP_RADIUS_H EAP_C_FUNC_IMPORT 
       
    44 	#define EAP_FUNC_EXPORT_EAP_RADIUS_H 
       
    45 	#define EAP_C_FUNC_EXPORT_EAP_RADIUS_H 
       
    46 #endif
       
    47 // End: added by script change_export_macros.sh.
    27 #include "eap_base_type.h"
    48 #include "eap_base_type.h"
    28 #include "eap_variable_data.h"
    49 #include "eap_variable_data.h"
    29 #include "eap_radius_header.h"
    50 #include "eap_radius_header.h"
    30 #include "eap_radius_types.h"
    51 #include "eap_radius_types.h"
    31 #include "eap_radius_payloads.h"
    52 #include "eap_radius_payloads.h"
    46 
    67 
    47 //--------------------------------------------------
    68 //--------------------------------------------------
    48 
    69 
    49 
    70 
    50 /// This class is implementation of RADIUS EAP-type.
    71 /// This class is implementation of RADIUS EAP-type.
    51 class EAP_EXPORT eap_radius_c
    72 class EAP_CLASS_VISIBILITY_EAP_RADIUS_H eap_radius_c
    52 : public abs_eap_radius_session_c
    73 : public abs_eap_radius_session_c
    53 , public abs_eap_radius_state_c
    74 , public abs_eap_radius_state_c
    54 , public abs_eap_base_timer_c
    75 , public abs_eap_base_timer_c
    55 , public abs_eap_core_map_c
    76 , public abs_eap_core_map_c
    56 {
    77 {
    96 
   117 
    97 
   118 
    98 	/**
   119 	/**
    99 	 * This function sends and traces all messages.
   120 	 * This function sends and traces all messages.
   100 	 */
   121 	 */
   101 	EAP_FUNC_IMPORT eap_status_e packet_send(
   122 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e packet_send(
   102 		const eap_am_network_id_c * const network_id,
   123 		const eap_am_network_id_c * const network_id,
   103 		eap_buf_chain_wr_c * const sent_packet,
   124 		eap_buf_chain_wr_c * const sent_packet,
   104 		const u32_t header_offset,
   125 		const u32_t header_offset,
   105 		const u32_t data_length,
   126 		const u32_t data_length,
   106 		const u32_t buffer_length,
   127 		const u32_t buffer_length,
   110 #if defined(USE_EAP_TRACE)
   131 #if defined(USE_EAP_TRACE)
   111 
   132 
   112 	/**
   133 	/**
   113 	 * This function traces the EAP packet.
   134 	 * This function traces the EAP packet.
   114 	 */
   135 	 */
   115 	EAP_FUNC_IMPORT void packet_trace(
   136 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H void packet_trace(
   116 		eap_const_string prefix,
   137 		eap_const_string prefix,
   117 		const eap_am_network_id_c * const receive_network_id,
   138 		const eap_am_network_id_c * const receive_network_id,
   118 		eap_radius_header_base_c * const received_eap,
   139 		eap_radius_header_base_c * const received_eap,
   119 		const u32_t eap_packet_length);
   140 		const u32_t eap_packet_length);
   120 
   141 
   131 
   152 
   132 
   153 
   133 	/**
   154 	/**
   134 	 * This function processes the RADIUS packets.
   155 	 * This function processes the RADIUS packets.
   135 	 */
   156 	 */
   136 	EAP_FUNC_IMPORT eap_status_e radius_packet_process(
   157 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e radius_packet_process(
   137 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   158 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   138 		eap_radius_header_base_c * const received_radius, ///< This is pointer to EAP header including RADIUS fields.
   159 		eap_radius_header_base_c * const received_radius, ///< This is pointer to EAP header including RADIUS fields.
   139 		const u32_t radius_packet_length, ///< This is length of received RADIUS EAP packet.
   160 		const u32_t radius_packet_length, ///< This is length of received RADIUS EAP packet.
   140 		const bool is_client_when_true ///< Indicates whether this is client (true) or server (false).
   161 		const bool is_client_when_true ///< Indicates whether this is client (true) or server (false).
   141 		);
   162 		);
   142 
   163 
   143 	EAP_FUNC_IMPORT eap_status_e cancel_error_message_delay_timer();
   164 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e cancel_error_message_delay_timer();
   144 
   165 
   145 	EAP_FUNC_IMPORT eap_status_e set_error_message_delay_timer();
   166 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e set_error_message_delay_timer();
   146 
   167 
   147 	EAP_FUNC_IMPORT eap_status_e handle_error_packet();
   168 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e handle_error_packet();
   148 
   169 
   149 	EAP_FUNC_IMPORT bool random_selection();
   170 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H bool random_selection();
   150 
   171 
   151 	EAP_FUNC_IMPORT eap_status_e add_ms_mppe_key_attributes(
   172 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e add_ms_mppe_key_attributes(
   152 		const eap_variable_data_c * const shared_secret,
   173 		const eap_variable_data_c * const shared_secret,
   153 		const eap_variable_data_c * const master_session_key,
   174 		const eap_variable_data_c * const master_session_key,
   154 		const eap_variable_data_c * const request_authenticator,
   175 		const eap_variable_data_c * const request_authenticator,
   155 		eap_radius_header_base_c * const radius_header,
   176 		eap_radius_header_base_c * const radius_header,
   156 		u32_t * const attribute_offset,
   177 		u32_t * const attribute_offset,
   157 		crypto_hmac_c * const hmac_message_auth,
   178 		crypto_hmac_c * const hmac_message_auth,
   158 		crypto_md5_c * const md5_response_auth);
   179 		crypto_md5_c * const md5_response_auth);
   159 
   180 
   160 
   181 
   161 	EAP_FUNC_IMPORT eap_status_e add_user_name_attribute(
   182 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e add_user_name_attribute(
   162 		const eap_radius_variable_data_c * const user_name,
   183 		const eap_radius_variable_data_c * const user_name,
   163 		eap_radius_header_base_c * const radius_header,
   184 		eap_radius_header_base_c * const radius_header,
   164 		u32_t * const radius_attribute_offset,
   185 		u32_t * const radius_attribute_offset,
   165 		crypto_hmac_c * const hmac_message_auth,
   186 		crypto_hmac_c * const hmac_message_auth,
   166 		crypto_md5_c * const md5_response_auth);
   187 		crypto_md5_c * const md5_response_auth);
   167 
   188 
   168 	EAP_FUNC_IMPORT eap_status_e xor_values(
   189 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e xor_values(
   169 		u8_t * const plaintext,
   190 		u8_t * const plaintext,
   170 		const u32_t plaintext_length,
   191 		const u32_t plaintext_length,
   171 		const eap_variable_data_c * const intermediate_value);
   192 		const eap_variable_data_c * const intermediate_value);
   172 
   193 
   173 	EAP_FUNC_IMPORT eap_status_e encrypt_ms_mppe_key_attribute(
   194 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e encrypt_ms_mppe_key_attribute(
   174 		const eap_variable_data_c * const shared_secret,
   195 		const eap_variable_data_c * const shared_secret,
   175 		const eap_variable_data_c * const request_authenticator,
   196 		const eap_variable_data_c * const request_authenticator,
   176 		const u8_t * salt,
   197 		const u8_t * salt,
   177 		const u32_t salt_length,
   198 		const u32_t salt_length,
   178 		u8_t * const data,
   199 		u8_t * const data,
   179 		const u32_t data_length);
   200 		const u32_t data_length);
   180 
   201 
   181 	EAP_FUNC_IMPORT eap_status_e add_one_ms_mppe_key_attribute(
   202 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e add_one_ms_mppe_key_attribute(
   182 		const eap_variable_data_c * const shared_secret,
   203 		const eap_variable_data_c * const shared_secret,
   183 		const eap_variable_data_c * const request_authenticator,
   204 		const eap_variable_data_c * const request_authenticator,
   184 		eap_radius_header_base_c * const radius_header,
   205 		eap_radius_header_base_c * const radius_header,
   185 		u32_t * const attribute_offset,
   206 		u32_t * const attribute_offset,
   186 		const u8_t * const key,
   207 		const u8_t * const key,
   187 		const u32_t key_length,
   208 		const u32_t key_length,
   188 		const eap_diameter_avp_code_c mppe_key_type,
   209 		const eap_diameter_avp_code_c mppe_key_type,
   189 		crypto_hmac_c * const hmac_message_auth,
   210 		crypto_hmac_c * const hmac_message_auth,
   190 		crypto_md5_c * const md5_response_auth);
   211 		crypto_md5_c * const md5_response_auth);
   191 
   212 
   192 	EAP_FUNC_IMPORT static eap_status_e shutdown_operation(
   213 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H static eap_status_e shutdown_operation(
   193 		eap_radius_session_c * const session,
   214 		eap_radius_session_c * const session,
   194 		abs_eap_am_tools_c * const m_am_tools);
   215 		abs_eap_am_tools_c * const m_am_tools);
   195 
   216 
   196 	/**
   217 	/**
   197 	 * This function parses all payloads of the whole RADIUS EAP packet.
   218 	 * This function parses all payloads of the whole RADIUS EAP packet.
   198 	 * Payloads are stored to p_radius_payloads.
   219 	 * Payloads are stored to p_radius_payloads.
   199 	 * @see parse_radius_payload().
   220 	 * @see parse_radius_payload().
   200 	 */
   221 	 */
   201 	EAP_FUNC_IMPORT eap_status_e parse_radius_packet(
   222 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e parse_radius_packet(
   202 		eap_radius_header_base_c * const radius, ///< This is pointer to EAP header including RADIUS fields.
   223 		eap_radius_header_base_c * const radius, ///< This is pointer to EAP header including RADIUS fields.
   203 		const u32_t radius_packet_length, ///< This is length of received RADIUS EAP packet.
   224 		const u32_t radius_packet_length, ///< This is length of received RADIUS EAP packet.
   204 		eap_radius_payloads_c * const p_radius_payloads);
   225 		eap_radius_payloads_c * const p_radius_payloads);
   205 
   226 
   206 	/**
   227 	/**
   213 	 * See also parse_radius_packet().
   234 	 * See also parse_radius_packet().
   214 	 *
   235 	 *
   215 	 * Third is analysed the RADIUS EAP packet. This includes the payload and values of each payload.
   236 	 * Third is analysed the RADIUS EAP packet. This includes the payload and values of each payload.
   216 	 * See also analyse_radius_packet().
   237 	 * See also analyse_radius_packet().
   217 	 */
   238 	 */
   218 	EAP_FUNC_IMPORT eap_status_e handle_radius_packet(
   239 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e handle_radius_packet(
   219 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   240 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   220 		eap_radius_header_base_c * const radius, ///< This is pointer to EAP header including RADIUS fields.
   241 		eap_radius_header_base_c * const radius, ///< This is pointer to EAP header including RADIUS fields.
   221 		const u32_t radius_length, ///< This is length of received RADIUS EAP packet.
   242 		const u32_t radius_length, ///< This is length of received RADIUS EAP packet.
   222 		eap_radius_payloads_c * const p_radius_payloads ///< This is pointer to all payloads of the received EAP packet.
   243 		eap_radius_payloads_c * const p_radius_payloads ///< This is pointer to all payloads of the received EAP packet.
   223 		);
   244 		);
   226 	 * This function analyses the received RADIUS EAP packet.
   247 	 * This function analyses the received RADIUS EAP packet.
   227 	 * Each sub-type is handled in separate function.
   248 	 * Each sub-type is handled in separate function.
   228 	 * @see Client messages are handled in handle_start_request_message() and handle_challenge_request_message(). 
   249 	 * @see Client messages are handled in handle_start_request_message() and handle_challenge_request_message(). 
   229 	 * @see Server messages are handled in handle_start_response_message() and handle_challenge_response_message(). 
   250 	 * @see Server messages are handled in handle_start_response_message() and handle_challenge_response_message(). 
   230 	 */
   251 	 */
   231 	EAP_FUNC_IMPORT eap_status_e analyse_radius_packet(
   252 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e analyse_radius_packet(
   232 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   253 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   233 		eap_radius_header_base_c * const received_radius, ///< This is pointer to EAP header including RADIUS fields.
   254 		eap_radius_header_base_c * const received_radius, ///< This is pointer to EAP header including RADIUS fields.
   234 		const u32_t radius_packet_length, ///< This is length of received RADIUS EAP packet.
   255 		const u32_t radius_packet_length, ///< This is length of received RADIUS EAP packet.
   235 		eap_radius_payloads_c * const p_radius_payloads ///< This is pointer to all payloads of the received EAP packet.
   256 		eap_radius_payloads_c * const p_radius_payloads ///< This is pointer to all payloads of the received EAP packet.
   236 		);
   257 		);
   237 
   258 
   238 	EAP_FUNC_IMPORT void trace_tunneled_packet(
   259 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H void trace_tunneled_packet(
   239 		eap_const_string prefix,
   260 		eap_const_string prefix,
   240 		const eap_header_base_c * const eap_packet);
   261 		const eap_header_base_c * const eap_packet);
   241 
   262 
   242 	//--------------------------------------------------
   263 	//--------------------------------------------------
   243 protected:
   264 protected:
   248 	//--------------------------------------------------
   269 	//--------------------------------------------------
   249 
   270 
   250 	/**
   271 	/**
   251 	 * Destructor cancels all timers and deletes member attributes.
   272 	 * Destructor cancels all timers and deletes member attributes.
   252 	 */
   273 	 */
   253 	EAP_FUNC_IMPORT virtual ~eap_radius_c();
   274 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H virtual ~eap_radius_c();
   254 
   275 
   255 	/**
   276 	/**
   256 	 * Constructor initializes all member attributes.
   277 	 * Constructor initializes all member attributes.
   257 	 */
   278 	 */
   258 	EAP_FUNC_IMPORT eap_radius_c(
   279 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_radius_c(
   259 		abs_eap_am_tools_c * const tools, ///< This is pointer to the tools AM of current platform.
   280 		abs_eap_am_tools_c * const tools, ///< This is pointer to the tools AM of current platform.
   260 		abs_eap_radius_c * const partner, ///< This is back pointer to object which created this object.
   281 		abs_eap_radius_c * const partner, ///< This is back pointer to object which created this object.
   261 		eap_am_radius_c * const am_radius, ///< This is pointer to adaptation module of RADIUS EAP type.
   282 		eap_am_radius_c * const am_radius, ///< This is pointer to adaptation module of RADIUS EAP type.
   262 		const bool free_am_radius, ///< True value means m_am_radius is allocated within eap_radius_c and m_am_radius must be freed in destructor.
   283 		const bool free_am_radius, ///< True value means m_am_radius is allocated within eap_radius_c and m_am_radius must be freed in destructor.
   263 		const bool is_client_when_true ///< Indicates whether this is client (true) or server (false).
   284 		const bool is_client_when_true ///< Indicates whether this is client (true) or server (false).
   265 
   286 
   266 	/**
   287 	/**
   267 	 * This function returns string of the state. This is for trace purposes.
   288 	 * This function returns string of the state. This is for trace purposes.
   268 	 * NOTE this is static member function.
   289 	 * NOTE this is static member function.
   269 	 */
   290 	 */
   270 	EAP_FUNC_IMPORT static eap_const_string get_state_string(eap_radius_state_variable_e state);
   291 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H static eap_const_string get_state_string(eap_radius_state_variable_e state);
   271 
   292 
   272 	/**
   293 	/**
   273 	 * This function tells if the object is a client or a server..
   294 	 * This function tells if the object is a client or a server..
   274 	 */
   295 	 */
   275 	EAP_FUNC_IMPORT bool get_is_client();
   296 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H bool get_is_client();
   276 
   297 
   277 	EAP_FUNC_IMPORT eap_status_e load_module(
   298 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e load_module(
   278 		const eap_type_value_e type,
   299 		const eap_type_value_e type,
   279 		const eap_type_value_e tunneling_type,
   300 		const eap_type_value_e tunneling_type,
   280 		abs_eap_base_type_c * const partner,
   301 		abs_eap_base_type_c * const partner,
   281 		eap_base_type_c ** const eap_type,
   302 		eap_base_type_c ** const eap_type,
   282 		const bool is_client_when_true,
   303 		const bool is_client_when_true,
   283 		const eap_am_network_id_c * const receive_network_id);
   304 		const eap_am_network_id_c * const receive_network_id);
   284 
   305 
   285 	EAP_FUNC_IMPORT eap_status_e unload_module(const eap_type_value_e eap_type);
   306 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e unload_module(const eap_type_value_e eap_type);
   286 
   307 
   287 	EAP_FUNC_IMPORT eap_status_e restart_authentication(
   308 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e restart_authentication(
   288 		const eap_am_network_id_c * const receive_network_id,
   309 		const eap_am_network_id_c * const receive_network_id,
   289 		const bool is_client_when_true,
   310 		const bool is_client_when_true,
   290 		const bool force_clean_restart,
   311 		const bool force_clean_restart,
   291 		const bool from_timer = false);
   312 		const bool from_timer = false);
   292 
   313 
   293 	EAP_FUNC_IMPORT eap_status_e asynchronous_init_remove_eap_session(
   314 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e asynchronous_init_remove_eap_session(
   294 		const eap_am_network_id_c * const send_network_id);
   315 		const eap_am_network_id_c * const send_network_id);
   295 
   316 
   296 	EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
   317 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
   297 
   318 
   298 	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
   319 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e get_eap_type_list(
   299 		eap_array_c<eap_type_value_e> * const eap_type_list);
   320 		eap_array_c<eap_type_value_e> * const eap_type_list);
   300 
   321 
   301 	EAP_FUNC_IMPORT eap_status_e add_rogue_ap(
   322 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e add_rogue_ap(
   302 		eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
   323 		eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
   303 
   324 
   304 	EAP_FUNC_IMPORT eap_status_e set_session_timeout(
   325 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e set_session_timeout(
   305 		const u32_t session_timeout_ms);
   326 		const u32_t session_timeout_ms);
   306 
   327 
   307 	/**
   328 	/**
   308 	 * The partner class calls this function when EAP/RADIUS packet is received.
   329 	 * The partner class calls this function when EAP/RADIUS packet is received.
   309 	 * see also eap_base_type_c::packet_process().
   330 	 * see also eap_base_type_c::packet_process().
   310 	 */
   331 	 */
   311 	EAP_FUNC_IMPORT eap_status_e packet_process(
   332 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e packet_process(
   312 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   333 		const eap_am_network_id_c * const receive_network_id, ///< This is the network identity of the received EAP packet.
   313 		eap_radius_header_base_c * const radius, ///< This is pointer to RADIUS header and data.
   334 		eap_radius_header_base_c * const radius, ///< This is pointer to RADIUS header and data.
   314 		const u32_t radius_packet_length ///< This is length of received RADIUS packet.
   335 		const u32_t radius_packet_length ///< This is length of received RADIUS packet.
   315 		);
   336 		);
   316 
   337 
   317 	/**
   338 	/**
   318 	 * This function obtains header offset, MTU and trailer length.
   339 	 * This function obtains header offset, MTU and trailer length.
   319 	 * See also abs_eap_base_type_c::get_header_offset().
   340 	 * See also abs_eap_base_type_c::get_header_offset().
   320 	 */
   341 	 */
   321 	EAP_FUNC_IMPORT u32_t get_header_offset(
   342 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H u32_t get_header_offset(
   322 		u32_t * const MTU,
   343 		u32_t * const MTU,
   323 		u32_t * const trailer_length
   344 		u32_t * const trailer_length
   324 		);
   345 		);
   325 
   346 
   326 	/**
   347 	/**
   327 	 * This function creates a message authentication code (MAC)
   348 	 * This function creates a message authentication code (MAC)
   328 	 */
   349 	 */
   329 	EAP_FUNC_IMPORT eap_status_e create_message_authentication_code(
   350 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e create_message_authentication_code(
   330 		eap_radius_MAC_attributes_c *MAC_attributes, ///< This includes required parameters.
   351 		eap_radius_MAC_attributes_c *MAC_attributes, ///< This includes required parameters.
   331 		const eap_radius_code_value_e code,
   352 		const eap_radius_code_value_e code,
   332 		const eap_variable_data_c * const authentication_key
   353 		const eap_variable_data_c * const authentication_key
   333 		);
   354 		);
   334 
   355 
   335 	// This is commented in abs_eap_base_timer_c::timer_delete_data().
   356 	// This is commented in abs_eap_base_timer_c::timer_delete_data().
   336 	EAP_FUNC_IMPORT eap_status_e timer_expired(
   357 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e timer_expired(
   337 		const u32_t id, void *data
   358 		const u32_t id, void *data
   338 		);
   359 		);
   339 
   360 
   340 	// This is commented in abs_eap_base_timer_c::timer_delete_data().
   361 	// This is commented in abs_eap_base_timer_c::timer_delete_data().
   341 	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
   362 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e timer_delete_data(
   342 		const u32_t id, void *data
   363 		const u32_t id, void *data
   343 		);
   364 		);
   344 
   365 
   345 	// This is commented in eap_base_type_c::set_is_valid().
   366 	// This is commented in eap_base_type_c::set_is_valid().
   346 	EAP_FUNC_IMPORT void set_is_valid();
   367 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H void set_is_valid();
   347 
   368 
   348 	// This is commented in eap_base_type_c::get_is_valid().
   369 	// This is commented in eap_base_type_c::get_is_valid().
   349 	EAP_FUNC_IMPORT bool get_is_valid();
   370 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H bool get_is_valid();
   350 
   371 
   351 	// This is commented in eap_base_type_c::configure().
   372 	// This is commented in eap_base_type_c::configure().
   352 	/**
   373 	/**
   353 	 * EAP-type RADIUS reads configuration.
   374 	 * EAP-type RADIUS reads configuration.
   354 	 */
   375 	 */
   355 	EAP_FUNC_IMPORT eap_status_e configure();
   376 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e configure();
   356 
   377 
   357 	// This is commented in eap_base_type_c::shutdown().
   378 	// This is commented in eap_base_type_c::shutdown().
   358 	/**
   379 	/**
   359 	 * The shutdown() function is called before the destructor of the 
   380 	 * The shutdown() function is called before the destructor of the 
   360 	 * object is executed. During the function call the object 
   381 	 * object is executed. During the function call the object 
   361 	 * could shutdown the operations, for example cancel timers.
   382 	 * could shutdown the operations, for example cancel timers.
   362 	 * Each derived class must define this function.
   383 	 * Each derived class must define this function.
   363 	 */
   384 	 */
   364 	EAP_FUNC_IMPORT eap_status_e shutdown();
   385 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e shutdown();
   365 
   386 
   366 	/**
   387 	/**
   367 	 * The read_configure() function reads the configuration data identified
   388 	 * The read_configure() function reads the configuration data identified
   368 	 * by the field string of field_length bytes length. Adaptation module must direct
   389 	 * by the field string of field_length bytes length. Adaptation module must direct
   369 	 * the query to some persistent store.
   390 	 * the query to some persistent store.
   370 	 * @param field is generic configure string idenfying the required configure data.
   391 	 * @param field is generic configure string idenfying the required configure data.
   371 	 * @param field_length is length of the field string.
   392 	 * @param field_length is length of the field string.
   372 	 * @param data is pointer to existing eap_variable_data object.
   393 	 * @param data is pointer to existing eap_variable_data object.
   373 	 */
   394 	 */
   374 	EAP_FUNC_IMPORT virtual eap_status_e read_configure(
   395 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H virtual eap_status_e read_configure(
   375 		const eap_configuration_field_c * const field,
   396 		const eap_configuration_field_c * const field,
   376 		eap_variable_data_c * const data
   397 		eap_variable_data_c * const data
   377 		);
   398 		);
   378 
   399 
   379 	/**
   400 	/**
   382 	 * the action to some persistent store.
   403 	 * the action to some persistent store.
   383 	 * @param field is generic configure string idenfying the required configure data.
   404 	 * @param field is generic configure string idenfying the required configure data.
   384 	 * @param field_length is length of the field string.
   405 	 * @param field_length is length of the field string.
   385 	 * @param data is pointer to existing eap_variable_data object.
   406 	 * @param data is pointer to existing eap_variable_data object.
   386 	 */
   407 	 */
   387 	EAP_FUNC_IMPORT virtual eap_status_e write_configure(
   408 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H virtual eap_status_e write_configure(
   388 		const eap_configuration_field_c * const field,
   409 		const eap_configuration_field_c * const field,
   389 		eap_variable_data_c * const data
   410 		eap_variable_data_c * const data
   390 		);
   411 		);
   391 
   412 
   392 	// This is commented in eap_base_type_c::eap_acknowledge().
   413 	// This is commented in eap_base_type_c::eap_acknowledge().
   393 	EAP_FUNC_IMPORT eap_status_e eap_acknowledge(
   414 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e eap_acknowledge(
   394 		const eap_am_network_id_c * const receive_network_id);
   415 		const eap_am_network_id_c * const receive_network_id);
   395 
   416 
   396 	/**
   417 	/**
   397 	 * This function must reset the state of object to same as 
   418 	 * This function must reset the state of object to same as 
   398 	 * state was after the configure() function call.
   419 	 * state was after the configure() function call.
   399 	 * If object reset succeeds this function must return eap_status_ok.
   420 	 * If object reset succeeds this function must return eap_status_ok.
   400 	 * If object reset fails this function must return corresponding error status.
   421 	 * If object reset fails this function must return corresponding error status.
   401 	 * @return This function returns the status of reset operation.
   422 	 * @return This function returns the status of reset operation.
   402 	 */
   423 	 */
   403 	EAP_FUNC_IMPORT eap_status_e reset();
   424 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e reset();
   404 
   425 
   405 	//
   426 	//
   406 	EAP_FUNC_IMPORT eap_status_e set_timer(
   427 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e set_timer(
   407 		abs_eap_base_timer_c * const p_initializer, 
   428 		abs_eap_base_timer_c * const p_initializer, 
   408 		const u32_t p_id, 
   429 		const u32_t p_id, 
   409 		void * const p_data,
   430 		void * const p_data,
   410 		const u32_t p_time_ms);
   431 		const u32_t p_time_ms);
   411 
   432 
   412 	EAP_FUNC_IMPORT eap_status_e cancel_timer(
   433 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e cancel_timer(
   413 		abs_eap_base_timer_c * const p_initializer, 
   434 		abs_eap_base_timer_c * const p_initializer, 
   414 		const u32_t p_id);
   435 		const u32_t p_id);
   415 
   436 
   416 	//
   437 	//
   417 	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
   438 	EAP_FUNC_VISIBILITY_EAP_RADIUS_H eap_status_e cancel_all_timers();
   418 
   439 
   419 	//--------------------------------------------------
   440 	//--------------------------------------------------
   420 }; // class eap_radius_c
   441 }; // class eap_radius_c
   421 
   442 
   422 #endif //#if !defined(_RADIUS_CORE_H_)
   443 #endif //#if !defined(_RADIUS_CORE_H_)