|
1 /* |
|
2 * Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: EAP and WLAN authentication protocols. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #if !defined(_EAP_STATUS_H_) |
|
22 #define _EAP_STATUS_H_ |
|
23 |
|
24 /** @file */ |
|
25 |
|
26 /// This is enumeration of status values used in EAP_Core. |
|
27 /** |
|
28 * Most of the functions return type of eap_status value. |
|
29 * Each value is defined in eap_status.h. The eap_status_ok value indicates no errors. |
|
30 * The eap_status_success value indicates the EAP-authentication was successful. |
|
31 * Other values try to be self-documenting. |
|
32 * The return value of every function MUST be checked. |
|
33 * Execution of the current function MUST handle error case generated by called function. |
|
34 * In most cases this means immediately returning the erroneous status |
|
35 * from the current function. User MUST free the memory allocated before the error occurs. |
|
36 * Look at the following example. |
|
37 * @code |
|
38 * // A new EAP-type is needed. The load_type() allocates new object. |
|
39 * eap_base_type *handler = load_type(used_eap_type); |
|
40 * if (handler != 0) |
|
41 * { |
|
42 * if (handler->get_is_valid() == true) |
|
43 * { |
|
44 * eap_status status = handler->configure(); |
|
45 * if (status != eap_status_ok) |
|
46 * { |
|
47 * // Configuration failed. |
|
48 * delete handler; |
|
49 * } |
|
50 * EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
51 * return status; |
|
52 * } |
|
53 * else |
|
54 * { |
|
55 * // Handler not constructed successfully. |
|
56 * delete handler; |
|
57 * EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
58 * return eap_status_allocation_error; |
|
59 * } |
|
60 * } |
|
61 * else |
|
62 * { |
|
63 * EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
64 * return eap_status_illegal_eap_type; |
|
65 * } |
|
66 * @endcode |
|
67 */ |
|
68 |
|
69 enum eap_status_e |
|
70 { |
|
71 eap_status_ok, ///< This means successfull status. |
|
72 eap_status_success, ///< EAP-authentication is successful. |
|
73 eap_status_pending_request, ///< Request is pending. It will be completed later. |
|
74 eap_status_completed_request, ///< Request was completed already. |
|
75 eap_status_drop_packet_quietly, ///< Packet was dropped quietly. Just forget that packet. |
|
76 eap_status_not_supported, ///< You need to write some code to support this function. |
|
77 eap_status_process_general_error, ///< Most propably you need debugger to found reason to this error. |
|
78 eap_status_type_does_not_exists_error, ///< EAP-type is not implemented. |
|
79 eap_status_allocation_error, ///< Memory allocation failed. Try again later or release memory. |
|
80 eap_status_process_illegal_packet_error, |
|
81 eap_status_ethernet_type_not_supported, |
|
82 eap_status_illegal_eap_code, |
|
83 eap_status_illegal_eap_type, |
|
84 eap_status_illegal_eap_identity, |
|
85 eap_status_authentication_failure, |
|
86 eap_status_encryption_failure, |
|
87 eap_status_decryption_failure, |
|
88 eap_status_illegal_padding, |
|
89 eap_status_randomize_failure, |
|
90 eap_status_handler_exists_error, |
|
91 eap_status_handler_does_not_exists_error, |
|
92 eap_status_wrong_sae_state, |
|
93 eap_status_wrong_eapol_version, |
|
94 eap_status_wrong_eapol_type, |
|
95 eap_status_wrong_eapol_oui, |
|
96 eap_status_header_corrupted, |
|
97 eap_status_wrong_sae_sequence_number, |
|
98 eap_status_wrong_isakmp_header_version, |
|
99 eap_status_wrong_isakmp_exchange_type, |
|
100 eap_status_wrong_isakmp_flags, |
|
101 eap_status_wrong_isakmp_message_id, |
|
102 eap_status_wrong_isakmp_cookie, |
|
103 eap_status_unsupported_isakmp_payload, |
|
104 eap_status_key_error, |
|
105 eap_status_too_many_offers, |
|
106 eap_status_send_failed, |
|
107 eap_status_data_length_not_aligned_to_block_size, |
|
108 eap_status_wrong_network_id, |
|
109 eap_status_illegal_handle, |
|
110 eap_status_illegal_configure_field, |
|
111 eap_status_illegal_configure_type, |
|
112 eap_status_wrong_sae_header_version, |
|
113 eap_status_wrong_sae_exchange_type, |
|
114 eap_status_wrong_sae_flags, |
|
115 eap_status_unsupported_sae_payload, |
|
116 eap_status_wrong_sae_cookie, |
|
117 eap_status_illegal_encryption_parameter_size, |
|
118 eap_status_state_reference_count_not_zero, |
|
119 eap_status_illegal_nai, |
|
120 eap_status_illegal_nai_payload, |
|
121 eap_status_illegal_data_payload, |
|
122 eap_status_illegal_payload, |
|
123 eap_status_illegal_hashed_index, |
|
124 eap_status_wrong_gsmsim_state, |
|
125 eap_status_wrong_eap_type_state, ///< Use this instead of eap_status_wrong_gsmsim_state. |
|
126 eap_status_unsupported_gsmsim_payload, |
|
127 eap_status_unsupported_payload, ///< Use this instead of eap_status_unsupported_gsmsim_payload. |
|
128 eap_status_gsmsim_triplet_query_failed, |
|
129 eap_status_illegal_index, |
|
130 eap_status_timed_out, |
|
131 eap_status_wrong_eap_subtype, |
|
132 eap_status_exit_test, |
|
133 eap_status_no_matching_protocol_version, |
|
134 eap_status_too_short_message, |
|
135 eap_status_too_long_message, |
|
136 eap_status_hardware_not_ready, |
|
137 eap_status_wrong_protocol, |
|
138 eap_status_wrong_type, |
|
139 eap_status_illegal_parameter, |
|
140 eap_status_illegal_certificate, |
|
141 eap_status_illegal_cipher_suite, |
|
142 eap_status_bad_certificate, |
|
143 eap_status_unsupported_certificate, |
|
144 eap_status_certificate_revoked, |
|
145 eap_status_certificate_expired, |
|
146 eap_status_ca_certificate_unknown, |
|
147 eap_status_user_certificate_unknown, |
|
148 eap_status_unknown_ca, |
|
149 eap_status_access_denied, |
|
150 eap_status_unexpected_message, |
|
151 eap_status_buffer_too_short, |
|
152 eap_status_not_found, |
|
153 eap_status_not_enough_challenges, |
|
154 eap_status_not_fresh_challenges, |
|
155 eap_status_already_exists, |
|
156 eap_status_insufficient_security, |
|
157 eap_status_syncronization_failure, |
|
158 eap_status_file_does_not_exist, |
|
159 eap_status_end_of_file, |
|
160 eap_status_file_write_failed, |
|
161 eap_status_wrong_authentication_type, |
|
162 eap_status_section_ends, |
|
163 eap_status_missing_payload, |
|
164 eap_status_realm_check_failed, |
|
165 eap_status_identity_query_failed, |
|
166 eap_status_credential_query_failed, |
|
167 eap_status_user_has_not_subscribed_to_the_requested_service, |
|
168 eap_status_users_calls_are_barred, |
|
169 eap_status_restricted_logon_hours, |
|
170 eap_status_account_disabled, |
|
171 eap_status_no_dialin_permission, |
|
172 eap_status_password_expired, |
|
173 eap_status_wrong_password, |
|
174 eap_status_oob_interface_read_error, |
|
175 eap_status_decryption_crc_failure, |
|
176 eap_status_rf_band_2_4_ghz_not_supported, |
|
177 eap_status_rf_band_5_0_ghz_not_supported, |
|
178 eap_status_signal_too_weak, |
|
179 eap_status_network_authentication_failure, |
|
180 eap_status_network_association_failure, |
|
181 eap_status_no_dhcp_response, |
|
182 eap_status_failed_dhcp_configure, |
|
183 eap_status_ip_address_conflict, |
|
184 eap_status_could_not_connect_to_registrar, |
|
185 eap_status_multiple_pbc_sessions_detected, |
|
186 eap_status_rogue_activity_suspected, |
|
187 eap_status_device_busy, |
|
188 eap_status_setup_locked, |
|
189 eap_status_message_timeout, |
|
190 eap_status_registration_session_timeout, |
|
191 eap_status_device_password_authentication_failure, |
|
192 eap_status_pin_code_authentication_not_supported, |
|
193 eap_status_push_button_authentication_not_supported, |
|
194 eap_status_end_recursion, |
|
195 eap_status_tunnel_compromise_error, |
|
196 eap_status_unexpected_tlv_exhanged, |
|
197 eap_status_no_pac_nor_certs_to_authenticate_with_provision_disabled, |
|
198 eap_status_no_matching_pac_for_aid, |
|
199 eap_status_pac_store_corrupted, |
|
200 eap_status_user_cancel_authentication, |
|
201 eap_status_no_match, |
|
202 }; |
|
203 |
|
204 |
|
205 #endif //#if !defined(_EAP_STATUS_H_) |
|
206 |
|
207 |
|
208 |
|
209 // End. |