eap_tlv_message_data_c Class Reference
class eap_tlv_message_data_c
|
Here is a figure of message data composed of Attribute-Value Pairs (See
eap_tlv_header_c
). Value data follows
eap_tlv_message_data_c
.
EAP-TLV-message data:
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 = 8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Value 1 |
+-+- -+-+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Value 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Value 3 |
+-+- -+-+
| |
+-+- -+-+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
NOTE, the length of value could be anythin between 0 ... (2^32)-1.
Only the free memory limits the length of the value.
There are no padding between Attribute-Value Pairs.
The next Attribute-Value Pair starts exactly after the previous
Value of previous Attribute-Value Pair.
Constructor & Destructor Documentation
eap_tlv_message_data_c(abs_eap_am_tools_c *const)
~eap_tlv_message_data_c()
EAP_FUNC_IMPORT
|
~eap_tlv_message_data_c
|
(
|
)
|
[virtual]
|
Member Functions Documentation
add_message_data(const eap_tlv_type_t, const u32_t, const void *const)
EAP_FUNC_IMPORT
eap_status_e
|
add_message_data
|
(
|
const
eap_tlv_type_t
|
type,
|
|
const
u32_t
|
length,
|
|
const void *const
|
data
|
|
)
|
|
This function adds data to message.
Parameters
const
eap_tlv_type_t
type
|
|
const
u32_t
length
|
|
const void *const data
|
|
add_message_data_array(const eap_tlv_type_t, const u32_t, eap_array_c< eap_variable_data_c > *const)
This function adds array of data to message.
add_message_header(const eap_tlv_type_t, const u32_t)
EAP_FUNC_IMPORT
eap_status_e
|
add_message_header
|
(
|
const
eap_tlv_type_t
|
type,
|
|
const
u32_t
|
length
|
|
)
|
|
This function adds header of structured data to message.
Parameters
const
eap_tlv_type_t
type
|
|
const
u32_t
length
|
|
allocate_message_buffer(const eap_tlv_type_t, const u32_t, void **const)
EAP_FUNC_IMPORT
eap_status_e
|
allocate_message_buffer
|
(
|
const
eap_tlv_type_t
|
type,
|
|
const
u32_t
|
length,
|
|
void **const
|
buffer
|
|
)
|
|
This function allocates buffer to message of specified type. Function returns pointer to the value field of specified length.
Parameters
const
eap_tlv_type_t
type
|
|
const
u32_t
length
|
|
void **const buffer
|
|
allocate_message_data_buffer(const u32_t)
EAP_FUNC_IMPORT
eap_status_e
|
allocate_message_data_buffer
|
(
|
const
u32_t
|
approximate_buffer_requirement
|
)
|
|
Parameters
const
u32_t
approximate_buffer_requirement
|
|
copy_message_data(const u32_t, const void *const)
EAP_FUNC_IMPORT
eap_status_e
|
copy_message_data
|
(
|
const
u32_t
|
length,
|
|
const void *const
|
value
|
|
)
|
|
This function copies message data. Data must be formatted as EAP-TLV-message data.
Parameters
const
u32_t
length
|
|
const void *const value
|
|
get_is_valid()
EAP_FUNC_IMPORT bool
|
get_is_valid
|
(
|
)
|
|
Object must indicate it's validity. If object initialization fails this function must return false.
get_message_data()
EAP_FUNC_IMPORT void *
|
get_message_data
|
(
|
)
|
const
|
This function returns the pointer to the data. Empty message return NULL pointer.
get_message_data_length()
EAP_FUNC_IMPORT
u32_t
|
get_message_data_length
|
(
|
)
|
const
|
This function returns the length of the data. Empty message return zero.
object_decrease_reference_count()
EAP_FUNC_IMPORT
u32_t
|
object_decrease_reference_count
|
(
|
)
|
|
This function should first decrease reference count and second return the remaining reference count. Reference count must not be decreased when it is zero.
object_increase_reference_count()
EAP_FUNC_IMPORT void
|
object_increase_reference_count
|
(
|
)
|
|
This function should increase reference count.
parse_message_data(eap_array_c< eap_tlv_header_c > *const)
set_message_data(const u32_t, const void *const)
EAP_FUNC_IMPORT
eap_status_e
|
set_message_data
|
(
|
const
u32_t
|
length,
|
|
const void *const
|
value
|
|
)
|
|
This function sets message data. Note the data is referenced not copied. Data must be formatted as EAP-TLV-message data.
Parameters
const
u32_t
length
|
|
const void *const value
|
|
Member Data Documentation
abs_eap_am_tools_c *const m_am_tools
eap_variable_data_c
m_message_data
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.