22 #if !defined(_EAP_CORE_CLIENT_MESSAGE_IF_H_) |
22 #if !defined(_EAP_CORE_CLIENT_MESSAGE_IF_H_) |
23 #define _EAP_CORE_CLIENT_MESSAGE_IF_H_ |
23 #define _EAP_CORE_CLIENT_MESSAGE_IF_H_ |
24 |
24 |
25 #include "eap_tools.h" |
25 #include "eap_tools.h" |
26 #include "eap_am_export.h" |
26 #include "eap_am_export.h" |
|
27 // Start: added by script change_export_macros.sh. |
|
28 #if defined(EAP_NO_EXPORT_EAP_CORE_CLIENT_MESSAGE_IF_H) |
|
29 #define EAP_CLASS_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H EAP_NONSHARABLE |
|
30 #define EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H |
|
31 #define EAP_C_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H |
|
32 #define EAP_FUNC_EXPORT_EAP_CORE_CLIENT_MESSAGE_IF_H |
|
33 #define EAP_C_FUNC_EXPORT_EAP_CORE_CLIENT_MESSAGE_IF_H |
|
34 #elif defined(EAP_EXPORT_EAP_CORE_CLIENT_MESSAGE_IF_H) |
|
35 #define EAP_CLASS_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H EAP_EXPORT |
|
36 #define EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H EAP_FUNC_EXPORT |
|
37 #define EAP_C_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H EAP_C_FUNC_EXPORT |
|
38 #define EAP_FUNC_EXPORT_EAP_CORE_CLIENT_MESSAGE_IF_H EAP_FUNC_EXPORT |
|
39 #define EAP_C_FUNC_EXPORT_EAP_CORE_CLIENT_MESSAGE_IF_H EAP_C_FUNC_EXPORT |
|
40 #else |
|
41 #define EAP_CLASS_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H EAP_IMPORT |
|
42 #define EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H EAP_FUNC_IMPORT |
|
43 #define EAP_C_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H EAP_C_FUNC_IMPORT |
|
44 #define EAP_FUNC_EXPORT_EAP_CORE_CLIENT_MESSAGE_IF_H |
|
45 #define EAP_C_FUNC_EXPORT_EAP_CORE_CLIENT_MESSAGE_IF_H |
|
46 #endif |
|
47 // End: added by script change_export_macros.sh. |
27 #include "eap_session_core_base.h" |
48 #include "eap_session_core_base.h" |
28 #include "abs_eap_session_core.h" |
49 #include "abs_eap_session_core.h" |
29 #include "eap_core_map.h" |
50 #include "eap_core_map.h" |
30 #include "abs_eap_stack_interface.h" |
51 #include "abs_eap_stack_interface.h" |
31 #include "abs_eap_am_message_if.h" |
52 #include "abs_eap_am_message_if.h" |
124 //-------------------------------------------------- |
145 //-------------------------------------------------- |
125 |
146 |
126 /** |
147 /** |
127 * The destructor of the eap_core class does nothing special. |
148 * The destructor of the eap_core class does nothing special. |
128 */ |
149 */ |
129 EAP_FUNC_IMPORT EAP_FUNC_IMPORT virtual ~eap_core_client_message_if_c(); |
150 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H virtual ~eap_core_client_message_if_c(); |
130 |
151 |
131 /** |
152 /** |
132 * The constructor initializes member attributes using parameters passed to it. |
153 * The constructor initializes member attributes using parameters passed to it. |
133 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c. |
154 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c. |
134 * @param partner is back pointer to object which created this object. |
155 * @param partner is back pointer to object which created this object. |
135 * @param is_client_when_true indicates whether the network entity should act |
156 * @param is_client_when_true indicates whether the network entity should act |
136 * as a client (true) or server (false), in terms of EAP-protocol |
157 * as a client (true) or server (false), in terms of EAP-protocol |
137 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false). |
158 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false). |
138 */ |
159 */ |
139 EAP_FUNC_IMPORT eap_core_client_message_if_c( |
160 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_core_client_message_if_c( |
140 abs_eap_am_tools_c * const tools, |
161 abs_eap_am_tools_c * const tools, |
141 eap_am_message_if_c * const server, |
162 eap_am_message_if_c * const server, |
142 abs_eap_session_core_c * const partner, |
163 abs_eap_session_core_c * const partner, |
143 const bool is_client_when_true); |
164 const bool is_client_when_true); |
144 |
165 |
149 * state was after the configure() function call. |
170 * state was after the configure() function call. |
150 * If object reset succeeds this function must return eap_status_ok. |
171 * If object reset succeeds this function must return eap_status_ok. |
151 * If object reset fails this function must return corresponding error status. |
172 * If object reset fails this function must return corresponding error status. |
152 * @return This function returns the status of reset operation. |
173 * @return This function returns the status of reset operation. |
153 */ |
174 */ |
154 EAP_FUNC_IMPORT eap_status_e reset(); |
175 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e reset(); |
155 |
176 |
156 /** |
177 /** |
157 * This function cancels all EAP-sessions. |
178 * This function cancels all EAP-sessions. |
158 * If this succeeds this function must return eap_status_ok. |
179 * If this succeeds this function must return eap_status_ok. |
159 * If this fails this function must return corresponding error status. |
180 * If this fails this function must return corresponding error status. |
160 * @return This function returns the status of operation. |
181 * @return This function returns the status of operation. |
161 */ |
182 */ |
162 EAP_FUNC_IMPORT eap_status_e cancel_all_eap_sessions(); |
183 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e cancel_all_eap_sessions(); |
163 |
184 |
164 // This is documented in abs_eap_stack_interface_c::packet_process(). |
185 // This is documented in abs_eap_stack_interface_c::packet_process(). |
165 EAP_FUNC_IMPORT eap_status_e packet_process( |
186 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e packet_process( |
166 const eap_am_network_id_c * const receive_network_id, |
187 const eap_am_network_id_c * const receive_network_id, |
167 eap_general_header_base_c * const packet_data, |
188 eap_general_header_base_c * const packet_data, |
168 const u32_t packet_length); |
189 const u32_t packet_length); |
169 |
190 |
170 /** |
191 /** |
174 * @param connection_handle separates the context of the acknowledged session. |
195 * @param connection_handle separates the context of the acknowledged session. |
175 * Mostly there is only one session in the client. |
196 * Mostly there is only one session in the client. |
176 * The server does not need eap_acknowledge() function because |
197 * The server does not need eap_acknowledge() function because |
177 * server (EAP-authenticator) sends the EAP-success message. |
198 * server (EAP-authenticator) sends the EAP-success message. |
178 */ |
199 */ |
179 EAP_FUNC_IMPORT eap_status_e eap_acknowledge( |
200 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e eap_acknowledge( |
180 const eap_am_network_id_c * const receive_network_id); |
201 const eap_am_network_id_c * const receive_network_id); |
181 |
202 |
182 #if defined(USE_EAP_CORE_SERVER) |
203 #if defined(USE_EAP_CORE_SERVER) |
183 /** |
204 /** |
184 * The EAP Core calls the send_eap_identity_request() function |
205 * The EAP Core calls the send_eap_identity_request() function |
185 * when EAP-authentication is needed with another peer. |
206 * when EAP-authentication is needed with another peer. |
186 * @param network_id includes the addresses (network identity) and packet type. |
207 * @param network_id includes the addresses (network identity) and packet type. |
187 */ |
208 */ |
188 EAP_FUNC_IMPORT eap_status_e send_eap_identity_request( |
209 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e send_eap_identity_request( |
189 const eap_am_network_id_c * const network_id); |
210 const eap_am_network_id_c * const network_id); |
190 #endif //#if defined(USE_EAP_CORE_SERVER) |
211 #endif //#if defined(USE_EAP_CORE_SERVER) |
191 |
212 |
192 // This is documented in abs_eap_stack_interface_c::configure(). |
213 // This is documented in abs_eap_stack_interface_c::configure(). |
193 EAP_FUNC_IMPORT eap_status_e configure(); |
214 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e configure(); |
194 |
215 |
195 // This is documented in abs_eap_stack_interface_c::shutdown(). |
216 // This is documented in abs_eap_stack_interface_c::shutdown(). |
196 EAP_FUNC_IMPORT eap_status_e shutdown(); |
217 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e shutdown(); |
197 |
218 |
198 // This is documented in abs_eap_stack_interface_c::get_is_valid(). |
219 // This is documented in abs_eap_stack_interface_c::get_is_valid(). |
199 EAP_FUNC_IMPORT bool get_is_valid(); |
220 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H bool get_is_valid(); |
200 |
221 |
201 /** |
222 /** |
202 * This function creates EAP session object synchronously. |
223 * This function creates EAP session object synchronously. |
203 * @param receive_network_id identifies the removed EAP session. |
224 * @param receive_network_id identifies the removed EAP session. |
204 */ |
225 */ |
205 EAP_FUNC_IMPORT eap_status_e create_eap_session( |
226 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e create_eap_session( |
206 const eap_am_network_id_c * const receive_network_id); |
227 const eap_am_network_id_c * const receive_network_id); |
207 |
228 |
208 /** |
229 /** |
209 * This function removes EAP session object synchronously. |
230 * This function removes EAP session object synchronously. |
210 * @param receive_network_id identifies the removed EAP session. |
231 * @param receive_network_id identifies the removed EAP session. |
211 */ |
232 */ |
212 EAP_FUNC_IMPORT eap_status_e remove_eap_session( |
233 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e remove_eap_session( |
213 const bool complete_to_lower_layer, |
234 const bool complete_to_lower_layer, |
214 const eap_am_network_id_c * const receive_network_id); |
235 const eap_am_network_id_c * const receive_network_id); |
215 |
236 |
216 // See abs_eap_base_timer_c::timer_expired(). |
237 // See abs_eap_base_timer_c::timer_expired(). |
217 EAP_FUNC_IMPORT eap_status_e timer_expired( |
238 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e timer_expired( |
218 const u32_t id, void *data); |
239 const u32_t id, void *data); |
219 |
240 |
220 // See abs_eap_base_timer_c::timer_delete_data(). |
241 // See abs_eap_base_timer_c::timer_delete_data(). |
221 EAP_FUNC_IMPORT eap_status_e timer_delete_data( |
242 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e timer_delete_data( |
222 const u32_t id, void *data); |
243 const u32_t id, void *data); |
223 |
244 |
224 // See abs_eap_am_message_if_c::send_data(). |
245 // See abs_eap_am_message_if_c::send_data(). |
225 EAP_FUNC_IMPORT eap_status_e send_data(const void * const data, const u32_t length); |
246 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e send_data(const void * const data, const u32_t length); |
226 |
247 |
227 |
248 |
228 EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values( |
249 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e set_eap_database_reference_values( |
229 const eap_variable_data_c * const reference); |
250 const eap_variable_data_c * const reference); |
230 |
251 |
231 EAP_FUNC_IMPORT eap_status_e get_802_11_authentication_mode( |
252 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e get_802_11_authentication_mode( |
232 const eap_am_network_id_c * const receive_network_id, |
253 const eap_am_network_id_c * const receive_network_id, |
233 const eapol_key_authentication_type_e authentication_type, |
254 const eapol_key_authentication_type_e authentication_type, |
234 const eap_variable_data_c * const SSID, |
255 const eap_variable_data_c * const SSID, |
235 const eap_variable_data_c * const preshared_key); |
256 const eap_variable_data_c * const preshared_key); |
236 |
257 |
237 EAP_FUNC_IMPORT eap_status_e complete_get_802_11_authentication_mode( |
258 EAP_FUNC_VISIBILITY_EAP_CORE_CLIENT_MESSAGE_IF_H eap_status_e complete_get_802_11_authentication_mode( |
238 const eap_status_e completion_status, |
259 const eap_status_e completion_status, |
239 const eap_am_network_id_c * const receive_network_id, |
260 const eap_am_network_id_c * const receive_network_id, |
240 const eapol_key_802_11_authentication_mode_e mode); |
261 const eapol_key_802_11_authentication_mode_e mode); |
241 |
262 |
242 //-------------------------------------------------- |
263 //-------------------------------------------------- |