eap_am_network_id_c Class Reference

class eap_am_network_id_c

A eap_am_network_id_c class. Network addresses are handled through eap_am_network_id_c class. It includes source and destination addresses and the type of packet. Addresses are mostly Ethernet addresses. Packet type is the type of Ethernet packet. The eap_am_network_id class stores the addresses using the eap_variable_data objects.

Public Member Functions
eap_am_network_id_c ( abs_eap_am_tools_c *const )
eap_am_network_id_c ( abs_eap_am_tools_c *const , const void *const , const u32_t , const void *const , const u32_t , const u16_t , const bool, const bool)
eap_am_network_id_c ( abs_eap_am_tools_c *const , const eap_variable_data_c *const , const eap_variable_data_c *const , const u16_t )
eap_am_network_id_c ( abs_eap_am_tools_c *const , const eap_am_network_id_c *const )
~eap_am_network_id_c ()
EAP_FUNC_IMPORT bool compare_network_id (const eap_am_network_id_c *const )
EAP_FUNC_IMPORT eap_am_network_id_c * copy ()
EAP_FUNC_IMPORT const u8_t * get_destination ()
EAP_FUNC_IMPORT const eap_variable_data_c * get_destination_id ()
EAP_FUNC_IMPORT u32_t get_destination_length ()
EAP_FUNC_IMPORT bool get_is_valid ()
EAP_FUNC_IMPORT bool get_is_valid_data ()
EAP_FUNC_IMPORT const eap_am_network_id_c * get_network_id ()
EAP_FUNC_IMPORT const u8_t * get_source ()
EAP_FUNC_IMPORT const eap_variable_data_c * get_source_id ()
EAP_FUNC_IMPORT u32_t get_source_length ()
EAP_FUNC_IMPORT u16_t get_type ()
EAP_FUNC_IMPORT void reset ()
EAP_FUNC_IMPORT eap_status_e set_copy_of_am_network_id (const void *const , const u32_t , const void *const , const u32_t , const u16_t )
EAP_FUNC_IMPORT eap_status_e set_copy_of_network_id (const eap_am_network_id_c *const )
EAP_FUNC_IMPORT void set_type (const u16_t )
Private Member Functions
eap_status_e initialize_members ()
EAP_FUNC_IMPORT void set_is_valid ()
Private Attributes
abs_eap_am_tools_c *const m_am_tools
eap_am_network_id_impl_str * m_data

Constructor & Destructor Documentation

eap_am_network_id_c(abs_eap_am_tools_c *const)

EAP_FUNC_IMPORT eap_am_network_id_c ( abs_eap_am_tools_c *const tools )

This version initializes the object.

Parameters

abs_eap_am_tools_c *const tools parameter is pointer to the tools class.

eap_am_network_id_c(abs_eap_am_tools_c *const, const void *const, const u32_t, const void *const, const u32_t, const u16_t, const bool, const bool)

EAP_FUNC_IMPORT eap_am_network_id_c ( abs_eap_am_tools_c *const tools,
const void *const source,
const u32_t source_length,
const void *const destination,
const u32_t destination_length,
const u16_t type,
const bool free_id,
const bool writable_id
)

This version takes addresses as pointers to any data. This could be used to initialize addresses from the received packet. NOTE the data buffers are NOT copied.

Parameters

abs_eap_am_tools_c *const tools parameter is pointer to the tools class.
const void *const source parameter is pointer to the source address.
const u32_t source_length parameter is length of the source address.
const void *const destination parameter is pointer to the destination address.
const u32_t destination_length parameter is length of the destination address.
const u16_t type parameter is type of the packet. Mostly this is Ethernet type.
const bool free_id parameter indicates whether the source and destination buffers must be freed in destructors.
const bool writable_id parameter indicates whether the source and destination buffers are writable.

eap_am_network_id_c(abs_eap_am_tools_c *const, const eap_variable_data_c *const, const eap_variable_data_c *const, const u16_t)

EAP_FUNC_IMPORT eap_am_network_id_c ( abs_eap_am_tools_c *const tools,
const eap_variable_data_c *const source,
const eap_variable_data_c *const destination,
const u16_t type
)

This version takes addresses as pointers to eap_variable_data_c . NOTE the data buffers are NOT copied. This is used to swap addresses of existing eap_am_network_id_c object and create a new object using existing addresses.

Parameters

abs_eap_am_tools_c *const tools parameter is pointer to the tools class.
const eap_variable_data_c *const source parameter is pointer to the source address.
const eap_variable_data_c *const destination parameter is pointer to the destination address.
const u16_t type parameter is type of the packet. Mostly this is Ethernet type.

eap_am_network_id_c(abs_eap_am_tools_c *const, const eap_am_network_id_c *const)

EAP_FUNC_IMPORT eap_am_network_id_c ( abs_eap_am_tools_c *const tools,
const eap_am_network_id_c *const network_id
)

This version uses the data from existing object. NOTE this copies the addresses.

Parameters

abs_eap_am_tools_c *const tools parameter is pointer to the tools class.
const eap_am_network_id_c *const network_id parameter is pointer to the existing object.

~eap_am_network_id_c()

EAP_FUNC_IMPORT ~eap_am_network_id_c ( ) [virtual]

The destructor does nothing extra. The buffers of each address are freed in the destructor of the eap_variable_data class.

Member Functions Documentation

compare_network_id(const eap_am_network_id_c *const)

EAP_FUNC_IMPORT bool compare_network_id ( const eap_am_network_id_c *const network_id ) const

Compare the objects are identical.

Parameters

const eap_am_network_id_c *const network_id

copy()

EAP_FUNC_IMPORT eap_am_network_id_c * copy ( ) const

The copy() function copies the eap_am_network_id object. The data of addresses are copied to new buffers.

get_destination()

EAP_FUNC_IMPORT const u8_t * get_destination ( ) const

The get_destination() function returns pointer to the destination data.

get_destination_id()

EAP_FUNC_IMPORT const eap_variable_data_c * get_destination_id ( ) const

The get_destination_id() function returns pointer to the destination address.

get_destination_length()

EAP_FUNC_IMPORT u32_t get_destination_length ( ) const

The get_destination_length() function returns length of the destination address.

get_is_valid()

EAP_FUNC_IMPORT bool get_is_valid ( ) const

The get_is_valid() function returns the status of the eap_core object. True indicates the object is initialized succesfully.

get_is_valid_data()

EAP_FUNC_IMPORT bool get_is_valid_data ( ) const

The get_is_valid_data() function returns the status of the eap_core object. True indicates the object does include valid addresses.

get_network_id()

EAP_FUNC_IMPORT const eap_am_network_id_c * get_network_id ( ) const

The get_network_id() function returns pointer to this.

get_source()

EAP_FUNC_IMPORT const u8_t * get_source ( ) const

The get_source() function returns pointer to the source data.

get_source_id()

EAP_FUNC_IMPORT const eap_variable_data_c * get_source_id ( ) const

The get_source_id() function returns pointer to the source address.

get_source_length()

EAP_FUNC_IMPORT u32_t get_source_length ( ) const

The get_source_length() function returns length of the source address.

get_type()

EAP_FUNC_IMPORT u16_t get_type ( ) const

The get_type() function returns type of the packet.

initialize_members()

eap_status_e initialize_members ( ) [private]

reset()

EAP_FUNC_IMPORT void reset ( )

Resets the object.

set_copy_of_am_network_id(const void *const, const u32_t, const void *const, const u32_t, const u16_t)

EAP_FUNC_IMPORT eap_status_e set_copy_of_am_network_id ( const void *const source,
const u32_t source_length,
const void *const destination,
const u32_t destination_length,
const u16_t type
)

Parameters

const void *const source
const u32_t source_length
const void *const destination
const u32_t destination_length
const u16_t type

set_copy_of_network_id(const eap_am_network_id_c *const)

EAP_FUNC_IMPORT eap_status_e set_copy_of_network_id ( const eap_am_network_id_c *const network_id )

This function uses the data from existing object. NOTE this copies the addresses.

Parameters

const eap_am_network_id_c *const network_id parameter is pointer to the existing object.

set_is_valid()

EAP_FUNC_IMPORT void set_is_valid ( ) [private]

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

set_type(const u16_t)

EAP_FUNC_IMPORT void set_type ( const u16_t type )

The get_type() function sets type of the packet.

Parameters

const u16_t type

Member Data Documentation

abs_eap_am_tools_c *const m_am_tools

abs_eap_am_tools_c *const m_am_tools [private]

eap_am_network_id_impl_str * m_data

eap_am_network_id_impl_str * m_data [private]

This is pointer to data of eap_am_network_id_c . This decreases memory print of eap_am_network_id_c . This decreases stack usage of EAP_Core.