abs_eap_core_c Class Reference

class abs_eap_core_c

This class defines the interface the eap_core_c class will use with the partner class (lower layer).

Constructor & Destructor Documentation

abs_eap_core_c()

abs_eap_core_c()[inline]

The constructor of the abs_eap_core class does nothing special.

~abs_eap_core_c()

~abs_eap_core_c()[inline, virtual]

The destructor of the abs_eap_core class does nothing special.

Member Functions Documentation

add_rogue_ap(eap_array_c< eap_rogue_ap_entry_c > &)

eap_status_e add_rogue_ap(eap_array_c< eap_rogue_ap_entry_c > &rogue_ap_list)[pure virtual]

Parameters

eap_array_c< eap_rogue_ap_entry_c > & rogue_ap_list

asynchronous_init_remove_eap_session(const eap_am_network_id_c *const)

eap_status_e asynchronous_init_remove_eap_session(const eap_am_network_id_c *const send_network_id)[pure virtual]

This function tells lower layer to remove EAP session object asyncronously.

Parameters

const eap_am_network_id_c *const send_network_id

cancel_all_timers()

eap_status_e cancel_all_timers()[pure virtual]

The cancel_all_timers() function cancels all timers. User should use this in termination of the stack before the adaptation module of tools is deleted. Preferred mode is to cancel each timer directly using cancel_timer() function.

Adaptation module internally implements the timer.

cancel_timer(abs_eap_base_timer_c *const, const u32_t)

eap_status_e cancel_timer(abs_eap_base_timer_c *const initializer,
const u32_tid
)[pure virtual]

The cancel_timer() function cancels the timer id initiated by initializer. Adaptation module internally implements the timer.

Parameters

abs_eap_base_timer_c *const initializeris pointer to object which set the cancelled timer.
const u32_t idis identifier which will be returned in timer_expired() function. The user selects and interprets the id for this timer.

check_is_valid_eap_type(const eap_type_value_e)

eap_status_e check_is_valid_eap_type(const eap_type_value_eeap_type)[pure virtual]

This function queries the validity of EAP-type. Lower layer should return eap_status_ok if this EAP-type is supported.

Parameters

const eap_type_value_e eap_typeis the requested EAP-type.

get_eap_type_list(eap_array_c< eap_type_value_e > *const)

eap_status_e get_eap_type_list(eap_array_c< eap_type_value_e > *const eap_type_list)[pure virtual]

This function queries the list of supported EAP-types. Lower layer should return eap_status_ok if this call succeeds.

Parameters

eap_array_c< eap_type_value_e > *const eap_type_listwill include the list of supported EAP-types. Each value in list is type of u32_t and represent one supported EAP-type. List consists of subsequent u32_t type values.

get_header_offset(u32_t *const, u32_t *const)

u32_t get_header_offset(u32_t *const MTU,
u32_t *const trailer_length
)[pure virtual]

The get_header_offset() function obtains the header offset of EAP-packet. abs_eap_base_type_c::get_header_offset().

Parameters

u32_t *const MTU
u32_t *const trailer_length

load_module(const eap_type_value_e, const, abs_eap_base_type_c *const, eap_base_type_c **const, const bool, const eap_am_network_id_c *const)

eap_status_e load_module(const eap_type_value_etype,
const eap_type_value_e,
abs_eap_base_type_c *const partner,
eap_base_type_c **const eap_type,
const boolis_client_when_true,
const eap_am_network_id_c *const receive_network_id
)[pure virtual]

The load_module() function function indicates the lower level to load new module of EAP-type.

Parameters

const eap_type_value_e typeis the requested EAP-type.
const eap_type_value_e
abs_eap_base_type_c *const partneris pointer to the caller object. The partner of the new created EAP-type object is the caller object.
eap_base_type_c **const eap_typeis a pointer to a pointer of EAP-type object. Adaptation module sets eap_type pointer to created EAP-type object.
const bool is_client_when_trueparameter indicates whether the network entity should act as a client (true) or server (false), in terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
const eap_am_network_id_c *const receive_network_idincludes the addresses (network identity) and packet type.

packet_data_crypto_keys(const eap_am_network_id_c *const, const eap_master_session_key_c *const)

eap_status_e packet_data_crypto_keys(const eap_am_network_id_c *const send_network_id,
const eap_master_session_key_c *const master_session_key
)[pure virtual]

Note this function is just an example. Parameters will change later. The packet_data_crypto_keys() function gives the generated keys to lower level. After EAP-authentication has generated the keys it calls this function to offer the keys to lower level. abs_eap_base_type_c::packet_data_crypto_keys().

Parameters

const eap_am_network_id_c *const send_network_id
const eap_master_session_key_c *const master_session_key

packet_send(const eap_am_network_id_c *const, eap_buf_chain_wr_c *const, const u32_t, const u32_t, const u32_t)

eap_status_e packet_send(const eap_am_network_id_c *const network_id,
eap_buf_chain_wr_c *const sent_packet,
const u32_theader_offset,
const u32_tdata_length,
const u32_tbuffer_length
)[pure virtual]

The derived class could send packets to partner class with this function. abs_eap_base_type_c::packet_send().

Parameters

const eap_am_network_id_c *const network_id
eap_buf_chain_wr_c *const sent_packet
const u32_t header_offset
const u32_t data_length
const u32_t buffer_length

read_configure(const eap_configuration_field_c *const, eap_variable_data_c *const)

eap_status_e read_configure(const eap_configuration_field_c *const field,
eap_variable_data_c *const data
)[pure virtual]

The read_configure() function reads the configuration data identified by the field string of field_length bytes length. Adaptation module must direct the query to some persistent store. abs_eap_base_type_c::read_configure().

Parameters

const eap_configuration_field_c *const field
eap_variable_data_c *const data

restart_authentication(const eap_am_network_id_c *const, const bool, const bool, const bool)

eap_status_e restart_authentication(const eap_am_network_id_c *const receive_network_id,
const boolis_client_when_true,
const boolforce_clean_restart,
const boolfrom_timer = false
)[pure virtual]

The session calls the restart_authentication() function when EAP-authentication is needed with another peer. This is also used when session restarts authentication.

Parameters

const eap_am_network_id_c *const receive_network_idincludes the addresses (network identity) and packet type.
const bool is_client_when_trueindicates whether the EAP-type should act as a client or server, in terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
const bool force_clean_restartthis selects whether the server removes this session (true) or not (false).
const bool from_timer = falsetells whether the timer calls this function (true) or not (false).

set_session_timeout(const u32_t)

eap_status_e set_session_timeout(const u32_tsession_timeout_ms)[pure virtual]

The set_session_timeout() function changes the session timeout timer to be elapsed after session_timeout_ms milliseconds.

Parameters

const u32_t session_timeout_ms

set_timer(abs_eap_base_timer_c *const, const u32_t, void *const, const u32_t)

eap_status_e set_timer(abs_eap_base_timer_c *const initializer,
const u32_tid,
void *const data,
const u32_ttime_ms
)[pure virtual]

The set_timer() function initializes timer to be elapsed after time_ms milliseconds. Adaptation module internally implements the timer.

Parameters

abs_eap_base_timer_c *const initializeris pointer to object which timer_expired() function will be called after timer elapses.
const u32_t idis identifier which will be returned in timer_expired() function. The user selects and interprets the id for this timer.
void *const datais pointer to any user selected data which will be returned in timer_expired() function.
const u32_t time_msis the time of timer in milli seconds.

state_notification(const abs_eap_state_notification_c *const)

voidstate_notification(const abs_eap_state_notification_c *const state)[pure virtual]

This is notification of internal state transition. This is used for notifications, debugging and protocol testing. The primal notifications are eap_state_variable_e::eap_state_authentication_finished_successfully and eap_state_variable_e::eap_state_authentication_terminated_unsuccessfully. These two notifications are sent from EAP-protocol layer (eap_protocol_layer_e::eap_protocol_layer_eap). These two notifications tells the end state of authentication session. These are the only reliable indications of the final status of authentication session. You MUST NOT make decision based on the return value of abs_eap_stack_interface_c::packet_process().

Parameters

const abs_eap_state_notification_c *const state

unload_module(const eap_type_value_e)

eap_status_e unload_module(const eap_type_value_eeap_type)[pure virtual]

The unload_module() function unloads the module of a EAP-type.

Parameters

const eap_type_value_e eap_typeis the requested EAP-type.

write_configure(const eap_configuration_field_c *const, eap_variable_data_c *const)

eap_status_e write_configure(const eap_configuration_field_c *const field,
eap_variable_data_c *const data
)[pure virtual]

The write_configure() function writes the configuration data identified by the field string of field_length bytes length. Adaptation module must direct the action to some persistent store. abs_eap_base_type_c::write_configure().

Parameters

const eap_configuration_field_c *const field
eap_variable_data_c *const data