14 * Description: EAP and WLAN authentication protocols. |
14 * Description: EAP and WLAN authentication protocols. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 11.1.2 % |
19 * %version: % |
20 */ |
20 */ |
21 |
21 |
22 #ifndef _FILECONFIG_H |
22 #ifndef _FILECONFIG_H |
23 #define _FILECONFIG_H |
23 #define _FILECONFIG_H |
24 |
24 |
25 #include "eap_core_map.h" |
25 #include "eap_core_map.h" |
26 #include "eap_configuration_field.h" |
26 #include "eap_configuration_field.h" |
27 #include "abs_eap_am_file_input.h" |
27 #include "abs_eap_am_file_input.h" |
28 |
28 |
|
29 class eap_tlv_header_c; |
|
30 |
29 |
31 |
30 template <class Type> |
32 template <class Type> |
31 Type minimum( Type a, Type b ) |
33 Type minimum( Type a, Type b ) |
32 { |
34 { |
33 return a < b ? a : b; |
35 return a < b ? a : b; |
34 } |
36 } |
35 |
37 |
36 |
38 |
37 class eap_config_value_c |
39 class EAP_EXPORT eap_config_value_c |
38 { |
40 { |
39 private: |
41 private: |
40 |
42 |
41 abs_eap_am_tools_c* const m_am_tools; |
43 abs_eap_am_tools_c* const m_am_tools; |
42 |
44 |
48 |
50 |
49 bool m_is_valid; |
51 bool m_is_valid; |
50 |
52 |
51 public: |
53 public: |
52 |
54 |
53 virtual ~eap_config_value_c(); |
55 EAP_FUNC_IMPORT virtual ~eap_config_value_c(); |
54 |
56 |
55 eap_config_value_c( |
57 EAP_FUNC_IMPORT eap_config_value_c( |
56 abs_eap_am_tools_c* const tools); |
58 abs_eap_am_tools_c* const tools); |
57 |
59 |
58 void set_subsection( |
60 EAP_FUNC_IMPORT void set_subsection( |
59 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const subsection_map); |
61 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const subsection_map); |
60 |
62 |
61 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * get_subsection(); |
63 EAP_FUNC_IMPORT eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * get_subsection(); |
62 |
64 |
63 eap_variable_data_c * get_data(); |
65 EAP_FUNC_IMPORT eap_variable_data_c * get_data(); |
64 |
66 |
65 void set_type(const eap_configure_type_e type); |
67 EAP_FUNC_IMPORT const eap_variable_data_c * get_const_data() const; |
66 |
68 |
67 eap_configure_type_e get_type(); |
69 EAP_FUNC_IMPORT void set_type(const eap_configure_type_e type); |
68 |
70 |
69 void object_increase_reference_count(); |
71 EAP_FUNC_IMPORT eap_configure_type_e get_type(); |
70 |
72 |
71 bool get_is_valid(); |
73 EAP_FUNC_IMPORT eap_configure_type_e get_const_type() const; |
|
74 |
|
75 EAP_FUNC_IMPORT void object_increase_reference_count(); |
|
76 |
|
77 EAP_FUNC_IMPORT bool get_is_valid() const; |
72 |
78 |
73 }; |
79 }; |
74 |
80 |
75 const u32_t MAX_LINE_LENGTH = 1024; |
81 const u32_t MAX_LINE_LENGTH = 1024; |
76 const u32_t MAX_CONFIG_TYPE_LENGTH = 32; |
82 const u32_t MAX_CONFIG_TYPE_LENGTH = 32; |
218 const eap_configuration_field_c * const field, |
224 const eap_configuration_field_c * const field, |
219 eap_variable_data_c* const data, |
225 eap_variable_data_c* const data, |
220 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map, |
226 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map, |
221 const bool check_subsection_when_true); |
227 const bool check_subsection_when_true); |
222 |
228 |
|
229 eap_status_e read_all_configurations( |
|
230 const eap_configuration_field_c * const field, |
|
231 eap_variable_data_c* const data, |
|
232 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map); |
|
233 |
|
234 eap_status_e add_option( |
|
235 const eap_tlv_header_c * const option_header); |
|
236 |
223 public: |
237 public: |
224 |
238 |
225 EAP_FUNC_IMPORT eap_file_config_c( |
239 EAP_FUNC_IMPORT eap_file_config_c( |
226 abs_eap_am_tools_c* const tools); |
240 abs_eap_am_tools_c* const tools); |
227 |
241 |
228 EAP_FUNC_IMPORT virtual ~eap_file_config_c(); |
242 EAP_FUNC_IMPORT virtual ~eap_file_config_c(); |
229 |
243 |
230 EAP_FUNC_IMPORT eap_status_e configure( |
244 EAP_FUNC_IMPORT eap_status_e configure( |
231 abs_eap_am_file_input_c * const file); |
245 abs_eap_am_file_input_c * const file); |
232 |
246 |
|
247 EAP_FUNC_IMPORT eap_status_e read_configuration_message( |
|
248 const eap_variable_data_c * const configuration_message); |
|
249 |
233 EAP_FUNC_IMPORT eap_status_e read_configure( |
250 EAP_FUNC_IMPORT eap_status_e read_configure( |
234 const eap_configuration_field_c * const field, |
251 const eap_configuration_field_c * const field, |
235 eap_variable_data_c* const data); |
252 eap_variable_data_c* const data); |
236 |
253 |
237 bool get_is_valid() const |
254 bool get_is_valid() const |