eap_state_notification_c Class Reference

class eap_state_notification_c : public abs_eap_state_notification_c

A eap_state_notification_c class. This is used for state change indications of EAP-protocol. EAP-Success and EAP-Failure are sent based on eap_state_variable_e::eap_state_authentication_finished_successfully and eap_state_variable_e::eap_state_authentication_terminated_unsuccessfully notifications.

Inherits from

Public Member Functions
eap_state_notification_c ( abs_eap_am_tools_c *const , const eap_am_network_id_c *const , bool, eap_state_notification_generic_e , eap_protocol_layer_e , u32_t , u32_t , u32_t , u8_t , bool)
eap_state_notification_c ( abs_eap_am_tools_c *const , const eap_am_network_id_c *const , bool, eap_state_notification_eap_e , eap_protocol_layer_e , eap_type_ietf_values_e , u32_t , u32_t , u8_t , bool)
~eap_state_notification_c ()
EAP_FUNC_IMPORT bool get_allow_send_eap_success ()
EAP_FUNC_IMPORT eap_status_e get_authentication_error ()
EAP_FUNC_IMPORT u32_t get_current_state ()
EAP_FUNC_IMPORT eap_const_string get_current_state_string ()
EAP_FUNC_IMPORT u8_t get_eap_identifier ()
EAP_FUNC_IMPORT eap_type_value_e get_eap_type ()
EAP_FUNC_IMPORT bool get_is_client ()
EAP_FUNC_IMPORT bool get_needs_confirmation_from_user ()
EAP_FUNC_IMPORT const eap_variable_data_c * get_notification_string ()
EAP_FUNC_IMPORT u32_t get_previous_state ()
EAP_FUNC_IMPORT eap_const_string get_previous_state_string ()
EAP_FUNC_IMPORT u32_t get_protocol ()
EAP_FUNC_IMPORT eap_protocol_layer_e get_protocol_layer ()
EAP_FUNC_IMPORT eap_const_string get_protocol_layer_string (const u32_t )
EAP_FUNC_IMPORT eap_const_string get_protocol_layer_string ()
EAP_FUNC_IMPORT eap_const_string get_protocol_string (const u32_t , const u32_t )
EAP_FUNC_IMPORT eap_const_string get_protocol_string ()
EAP_FUNC_IMPORT const eap_am_network_id_c * get_send_network_id ()
EAP_FUNC_IMPORT eap_const_string get_state_string (const u32_t , const u32_t )
EAP_FUNC_IMPORT void set_authentication_error (const eap_status_e )
EAP_FUNC_IMPORT eap_status_e set_notification_string (const eap_variable_data_c *const , const bool)
Inherited Functions
abs_eap_state_notification_c::abs_eap_state_notification_c()
abs_eap_state_notification_c::~abs_eap_state_notification_c()
Private Attributes
bool m_allow_send_eap_success
abs_eap_am_tools_c *const m_am_tools
eap_status_e m_authentication_error
u32_t m_current_state
u8_t m_eap_identifier
eap_type_value_e m_eap_type
bool m_is_client
eap_protocol_layer_e m_layer
bool m_needs_confirmation_from_user
eap_variable_data_c m_notification_string
u32_t m_previous_state
u32_t m_protocol
const eap_am_network_id_c * m_send_network_id

Constructor & Destructor Documentation

eap_state_notification_c(abs_eap_am_tools_c *const, const eap_am_network_id_c *const, bool, eap_state_notification_generic_e, eap_protocol_layer_e, u32_t, u32_t, u32_t, u8_t, bool)

EAP_FUNC_IMPORT eap_state_notification_c ( abs_eap_am_tools_c *const tools,
const eap_am_network_id_c *const send_network_id,
bool is_client,
eap_state_notification_generic_e ,
eap_protocol_layer_e layer,
u32_t protocol,
u32_t previous_state,
u32_t current_state,
u8_t eap_identifier,
bool allow_send_eap_success
)

The constructor of the eap_state_notification_c class does nothing special.

Parameters

abs_eap_am_tools_c *const tools
const eap_am_network_id_c *const send_network_id
bool is_client
eap_state_notification_generic_e
eap_protocol_layer_e layer
u32_t protocol
u32_t previous_state
u32_t current_state
u8_t eap_identifier
bool allow_send_eap_success

eap_state_notification_c(abs_eap_am_tools_c *const, const eap_am_network_id_c *const, bool, eap_state_notification_eap_e, eap_protocol_layer_e, eap_type_ietf_values_e, u32_t, u32_t, u8_t, bool)

EAP_FUNC_IMPORT eap_state_notification_c ( abs_eap_am_tools_c *const tools,
const eap_am_network_id_c *const send_network_id,
bool is_client,
eap_state_notification_eap_e ,
eap_protocol_layer_e layer,
eap_type_ietf_values_e eap_type,
u32_t previous_state,
u32_t current_state,
u8_t eap_identifier,
bool allow_send_eap_success
)

Parameters

abs_eap_am_tools_c *const tools
const eap_am_network_id_c *const send_network_id
bool is_client
eap_state_notification_eap_e
eap_protocol_layer_e layer
eap_type_ietf_values_e eap_type
u32_t previous_state
u32_t current_state
u8_t eap_identifier
bool allow_send_eap_success

~eap_state_notification_c()

EAP_FUNC_IMPORT ~eap_state_notification_c ( ) [virtual]

The destructor of the eap_state_notification_c class does nothing special.

Member Functions Documentation

get_allow_send_eap_success()

EAP_FUNC_IMPORT bool get_allow_send_eap_success ( ) const [virtual]

This function sets flag that allows EAP-Core to send EAP-Response/Success.

get_authentication_error()

EAP_FUNC_IMPORT eap_status_e get_authentication_error ( ) const [virtual]

This function returns the authentication error when get_protocol_layer() returns eap_protocol_layer_general and get_current_state() returns eap_general_state_authentication_error.

get_current_state()

EAP_FUNC_IMPORT u32_t get_current_state ( ) const [virtual]

This returns the current state. This is plain 32-bit value because of easy abstraction. Later we could do more detailed information. Each protocol layer and EAP type should define own internal states.

get_current_state_string()

EAP_FUNC_IMPORT eap_const_string get_current_state_string ( ) const [virtual]

This returns the current state string.

get_eap_identifier()

EAP_FUNC_IMPORT u8_t get_eap_identifier ( ) const [virtual]

This returns EAP-Identifier.

get_eap_type()

EAP_FUNC_IMPORT eap_type_value_e get_eap_type ( ) const [virtual]

This returns the protocol on the layer that send this notification. This is eap_type_value_e value. Before using this check the get_protocol_layer() returns eap_protocol_layer_eap, eap_protocol_layer_eap_type, eap_protocol_layer_general or eap_protocol_layer_internal_type.

get_is_client()

EAP_FUNC_IMPORT bool get_is_client ( ) const [virtual]

This returns true when notifier is client, false when server.

get_needs_confirmation_from_user()

EAP_FUNC_IMPORT bool get_needs_confirmation_from_user ( ) const [virtual]

This function gets flag that tells whether there should be user action to confirm the text.

get_notification_string()

EAP_FUNC_IMPORT const eap_variable_data_c * get_notification_string ( ) const [virtual]

This function gets the notification text that is displayed to user.

get_previous_state()

EAP_FUNC_IMPORT u32_t get_previous_state ( ) const [virtual]

This returns the previous state. This is plain 32-bit value because of easy abstraction. Later we could do more detailed information. Each protocol layer and EAP type should define own internal states.

get_previous_state_string()

EAP_FUNC_IMPORT eap_const_string get_previous_state_string ( ) const [virtual]

This returns the previous state string.

get_protocol()

EAP_FUNC_IMPORT u32_t get_protocol ( ) const [virtual]

This returns the protocol on the layer that send this notification. This is plain 32-bit value because of easy abstraction. Later we could do more detailed information. Each protocol layer and EAP type should define own internal states.

get_protocol_layer()

EAP_FUNC_IMPORT eap_protocol_layer_e get_protocol_layer ( ) const [virtual]

This returns the protocol layer that send this notification.

get_protocol_layer_string(const u32_t)

EAP_FUNC_IMPORT eap_const_string get_protocol_layer_string ( const u32_t protocol_layer ) [static]

Parameters

const u32_t protocol_layer

get_protocol_layer_string()

EAP_FUNC_IMPORT eap_const_string get_protocol_layer_string ( ) const [virtual]

This returns the protocol layer string string.

get_protocol_string(const u32_t, const u32_t)

EAP_FUNC_IMPORT eap_const_string get_protocol_string ( const u32_t protocol_layer,
const u32_t state
) [static]

Parameters

const u32_t protocol_layer
const u32_t state

get_protocol_string()

EAP_FUNC_IMPORT eap_const_string get_protocol_string ( ) const [virtual]

This returns the protocol string string.

get_send_network_id()

EAP_FUNC_IMPORT const eap_am_network_id_c * get_send_network_id ( ) const [virtual]

This returns send network id.

get_state_string(const u32_t, const u32_t)

EAP_FUNC_IMPORT eap_const_string get_state_string ( const u32_t protocol_layer,
const u32_t state
) [static]

Parameters

const u32_t protocol_layer
const u32_t state

set_authentication_error(const eap_status_e)

EAP_FUNC_IMPORT void set_authentication_error ( const eap_status_e error ) [virtual]

The authentication error must be set when get_protocol_layer() returns eap_protocol_layer_general and get_current_state() returns eap_general_state_authentication_error.

Parameters

const eap_status_e error

set_notification_string(const eap_variable_data_c *const, const bool)

EAP_FUNC_IMPORT eap_status_e set_notification_string ( const eap_variable_data_c *const notification_string,
const bool needs_confirmation_from_user
) [virtual]

This function sets notification text that is displayed to user. Text must be localized string. Type of the string is known to adaptation modules. Type depends on the running environment. Value true of the parameter needs_confirmation_from_user tells whether there should be user action to confirm the text. When notification is information where user action is not needed the needs_confirmation_from_user parameter should be false. Mostly it is better to set this false to disrupt the user less.

Parameters

const eap_variable_data_c *const notification_string
const bool needs_confirmation_from_user

Member Data Documentation

bool m_allow_send_eap_success

bool m_allow_send_eap_success [private]

abs_eap_am_tools_c *const m_am_tools

abs_eap_am_tools_c *const m_am_tools [private]

eap_status_e m_authentication_error

eap_status_e m_authentication_error [private]

u32_t m_current_state

u32_t m_current_state [private]

u8_t m_eap_identifier

u8_t m_eap_identifier [private]

eap_type_value_e m_eap_type

eap_type_value_e m_eap_type [private]

bool m_is_client

bool m_is_client [private]

eap_protocol_layer_e m_layer

eap_protocol_layer_e m_layer [private]

bool m_needs_confirmation_from_user

bool m_needs_confirmation_from_user [private]

eap_variable_data_c m_notification_string

eap_variable_data_c m_notification_string [private]

u32_t m_previous_state

u32_t m_previous_state [private]

u32_t m_protocol

u32_t m_protocol [private]

const eap_am_network_id_c * m_send_network_id

const eap_am_network_id_c * m_send_network_id [private]