eap_tlv_header_c Class Reference

class eap_tlv_header_c : public eap_general_header_base_c
Here is a figure of header of Attribute-Value Pairs. Value data follows eap_tlv_header_c .
        EAP-TLV-header:
  0                   1                   2                   3   
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                              Type                             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                             Length                            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                              Value...
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       
        The fields of this header are:
 32-bits Type;                   This is a type of value.
 32-bits value length (Length);  This is a length field, the length (in bytes) of the following value.
       

Inherits from

Constructor & Destructor Documentation

eap_tlv_header_c(abs_eap_am_tools_c *const, void *const, const u32_t)

EAP_FUNC_IMPORT eap_tlv_header_c ( abs_eap_am_tools_c *const tools,
void *const header_begin,
const u32_t header_buffer_length
)

The constructor of the eap_tlv_header_c class simply initializes the attributes.

Parameters

abs_eap_am_tools_c *const tools
void *const header_begin
const u32_t header_buffer_length

~eap_tlv_header_c()

EAP_FUNC_IMPORT ~eap_tlv_header_c ( ) [virtual]

The destructor of the eap_tlv_header_c class does nothing.

Member Functions Documentation

check_header()

EAP_FUNC_IMPORT eap_status_e check_header ( ) const [virtual]

This function checks the header is valid.

get_header_length()

EAP_FUNC_IMPORT u32_t get_header_length ( ) [static]

This function returns the header length of TLV.

get_type()

EAP_FUNC_IMPORT eap_tlv_type_t get_type ( ) const

This function returns the type.

get_value(const u32_t)

EAP_FUNC_IMPORT u8_t * get_value ( const u32_t contignuous_bytes ) const

This function returns pointer to begin of value.

Parameters

const u32_t contignuous_bytes is the length of queried data in bytes.

get_value_length()

EAP_FUNC_IMPORT u32_t get_value_length ( ) const

This function returns the data length of value.

get_value_offset(const u32_t, const u32_t)

EAP_FUNC_IMPORT u8_t * get_value_offset ( const u32_t offset,
const u32_t contignuous_bytes
) const

This function returns pointer to the offset of value.

Parameters

const u32_t offset is the offset of queried data in bytes.
const u32_t contignuous_bytes is the length of queried data in bytes.

reset_header(const eap_tlv_type_t, const u32_t)

EAP_FUNC_IMPORT eap_status_e reset_header ( const eap_tlv_type_t type,
const u32_t value_length
)

This function resets the TLV header.

Parameters

const eap_tlv_type_t type
const u32_t value_length

set_type(const eap_tlv_type_t)

EAP_FUNC_IMPORT eap_status_e set_type ( const eap_tlv_type_t type )

This function returns the type.

Parameters

const eap_tlv_type_t type

set_value_length(const u32_t)

EAP_FUNC_IMPORT eap_status_e set_value_length ( const u32_t value_length )

This function sets the value length.

Parameters

const u32_t value_length

Member Enumerations Documentation

Enum offsets

Enumerators

m_type_offset = 0ul
m_length_offset = m_type_offset+sizeof(u32_t)
m_data_offset = m_length_offset+sizeof(u32_t)

Member Data Documentation

abs_eap_am_tools_c *const m_am_tools

abs_eap_am_tools_c *const m_am_tools [private]