eap_base_type_c Class Reference

class eap_base_type_c

The eap_base_type_c class declares pure virtual functions a user class of EAP-type class could call. See also abs_eap_stack_interface_c. It includes important functions too.

Constructor & Destructor Documentation

eap_base_type_c(abs_eap_am_tools_c *const, abs_eap_base_type_c *const)

EAP_FUNC_IMPORTeap_base_type_c(abs_eap_am_tools_c *const tools,
abs_eap_base_type_c *const partner
)

The constructor of the eap_base_type class simply initializes the attributes. abs_eap_am_tools_c.

Parameters

abs_eap_am_tools_c *const toolsis pointer to the tools class.
abs_eap_base_type_c *const partneris back pointer to object which created this object. The eap_base_type_c object sends packets to the network using m_type_partner object.

~eap_base_type_c()

EAP_FUNC_IMPORT~eap_base_type_c()[virtual]

The destructor of the eap_base_type class does nothing special.

Member Functions Documentation

configure()

eap_status_e configure()[pure virtual]

The configure() function is called after the constructor of the object is successfully executed. During the function call the object could query the configuration. Each derived class must define this function. Needed configuration depends on the EAP-type.

eap_acknowledge(const eap_am_network_id_c *const)

eap_status_e eap_acknowledge(const eap_am_network_id_c *const receive_network_id)[pure virtual]

The adaptation module calls the eap_acknowledge() function after any Network Protocol packet is received. This is used as a success indication. This is described in RFC 2284 "PPP Extensible Authentication Protocol (EAP)". Mostly there is only one session in the client. The server does not need eap_acknowledge() function because server (EAP-authenticator) sends the EAP-success message.

Parameters

const eap_am_network_id_c *const receive_network_id

get_is_valid()

boolget_is_valid()[pure virtual]

Object must indicate it's validity. If object initialization fails this function must return false.

get_type_partner()

EAP_FUNC_IMPORT abs_eap_base_type_c *get_type_partner()

Type partner is object below the EAP-type object.

object_decrease_reference_count()

EAP_FUNC_IMPORT u32_tobject_decrease_reference_count()

The object_decrease_reference_count () function decreases the reference count and returns the remaining value. The EAP type is removed after there is no references to it.

object_increase_reference_count()

EAP_FUNC_IMPORT voidobject_increase_reference_count()

The object_increase_reference_count() function increases the reference count.

packet_process(const eap_am_network_id_c *const, eap_header_wr_c *const, const u32_t)

eap_status_e packet_process(const eap_am_network_id_c *const receive_network_id,
eap_header_wr_c *const eap,
const u32_tpacket_length
)[pure virtual]

This function processes the received packet. The return value of this function should be used only for traces and error counters. You MUST NOT make any decision of authentication session based on the return value. The stack calls abs_eap_core_c::state_notification() function when authentication session terminates unsuccessfully or ends successfully. You MUST make decision of authentication session based on the state_notification() call. See more abs_eap_core_c::state_notification().

Parameters

const eap_am_network_id_c *const receive_network_idcarries the addresses and type of the received packet.
eap_header_wr_c *const eapincludes the buffer of the packet.
const u32_t packet_lengthis length in bytes of the EAP-packet.

query_eap_identity(const bool, eap_variable_data_c *const, const eap_am_network_id_c *const, const u8_t)

eap_status_e query_eap_identity(const boolmust_be_synchronous,
eap_variable_data_c *const identity,
const eap_am_network_id_c *const receive_network_id,
const u8_teap_identifier
)[pure virtual]

This function queries the identity of user using this type. Parameters receive_network_id and eap_identifier are used in asynchronous completion of this call. See abs_eap_base_type_c::complete_eap_identity_query().

Parameters

const bool must_be_synchronoustells whether this call must be synchronous.
eap_variable_data_c *const identityis buffer for queried identity in synchronous call.
const eap_am_network_id_c *const receive_network_idcarries the addresses and type of the received packet.
const u8_t eap_identifieris EAP-Identifier for EAP-Response/Identity packet.

reset()

eap_status_e reset()[pure virtual]

This function resets the reused object.

set_initial_eap_identifier(const eap_am_network_id_c *const, const u8_t)

eap_status_e set_initial_eap_identifier(const eap_am_network_id_c *const receive_network_id,
const u8_tinitial_identifier
)[pure virtual]

This function sets the initial EAP-Identifier to be used for the first sent packet. This function is only needed in Windows RAS.

Parameters

const eap_am_network_id_c *const receive_network_id
const u8_t initial_identifier

set_is_valid()

voidset_is_valid()[private, pure virtual]

The set_is_valid() function sets the state of the object valid. The creator of this object calls this function after it is initialized.

shutdown()

eap_status_e shutdown()[pure virtual]

The shutdown() function is called before the destructor of the object is executed. During the function call the object could shutdown the operations, for example cancel timers. Each derived class must define this function.

Member Data Documentation

abs_eap_am_tools_c *const m_am_tools

abs_eap_am_tools_c *constm_am_tools[private]

u32_t m_reference_count

u32_t m_reference_count[private]

This is count of references to this EAP-type. EAP-type is removed from eap_core_map_c after the reference count is zero.

abs_eap_base_type_c * m_type_partner

abs_eap_base_type_c *m_type_partner[private]

This is back pointer to object which created this object. The eap_base_type_c object sends packets to the network using m_type_partner object. abs_eap_base_type_c.