eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_tlv_header.h
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: defines header of Attribute-Value Pairs used in protected setup. |
14 * Description: EAP and WLAN authentication protocols. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 9.1.2 % |
19 * %version: 11 % |
20 */ |
20 */ |
21 |
21 |
22 #if !defined(_SIMPLE_CONFIG_TLV_HEADER_H_) |
22 #if !defined(_SIMPLE_CONFIG_TLV_HEADER_H_) |
23 #define _SIMPLE_CONFIG_TLV_HEADER_H_ |
23 #define _SIMPLE_CONFIG_TLV_HEADER_H_ |
24 |
24 |
67 //-------------------------------------------------- |
67 //-------------------------------------------------- |
68 |
68 |
69 /// This is enumeration of offsets to data fields. |
69 /// This is enumeration of offsets to data fields. |
70 enum offsets |
70 enum offsets |
71 { |
71 { |
72 m_tlv_type_offset = 0ul, ///< This is offset to tlv type 16-bit field. |
72 m_tlv_type_offset = 0ul, ///< This is offset to fags and tlv type 16-bit field. |
73 m_length_offset = m_tlv_type_offset+sizeof(u16_t), ///< This is offset to length 16-bit field. |
73 m_length_offset = m_tlv_type_offset+sizeof(u16_t), ///< This is offset to length 16-bit field. |
74 m_data_offset = m_length_offset+sizeof(u16_t), ///< This is offset to data field. |
74 m_data_offset = m_length_offset+sizeof(u16_t), ///< This is offset to data field. |
75 }; |
75 }; |
76 |
76 |
77 //-------------------------------------------------- |
77 //-------------------------------------------------- |
78 public: |
78 public: |
79 //-------------------------------------------------- |
79 //-------------------------------------------------- |
113 u16_t get_data_length() const; |
113 u16_t get_data_length() const; |
114 |
114 |
115 /** |
115 /** |
116 * This function returns the header length of TLV. |
116 * This function returns the header length of TLV. |
117 */ |
117 */ |
118 EAP_FUNC_IMPORT static u32_t get_header_length(); |
118 static u32_t get_header_length(); |
119 |
119 |
120 /** |
120 /** |
121 * This function returns pointer to the offset of data of TLV. |
121 * This function returns pointer to the offset of data of TLV. |
122 * @param offset is the offset of queried data in bytes. |
122 * @param offset is the offset of queried data in bytes. |
123 * @param contignuous_bytes is the length of queried data in bytes. |
123 * @param contignuous_bytes is the length of queried data in bytes. |