|
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 * %version: 29 % |
|
20 */ |
|
21 |
|
22 // This is enumeration of EAPOL source code. |
|
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
24 #undef EAP_FILE_NUMBER_ENUM |
|
25 #define EAP_FILE_NUMBER_ENUM 60 |
|
26 #undef EAP_FILE_NUMBER_DATE |
|
27 #define EAP_FILE_NUMBER_DATE 1127594498 |
|
28 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
29 |
|
30 |
|
31 |
|
32 #include "eap_am_memory.h" |
|
33 #include "eap_tools.h" |
|
34 #include "eap_core_client_message_if.h" |
|
35 #include "eap_state_notification.h" |
|
36 #include "eap_network_id_selector.h" |
|
37 #include "abs_eap_am_mutex.h" |
|
38 #include "eap_config.h" |
|
39 #include "eap_core.h" |
|
40 #include "eap_buffer.h" |
|
41 #include "eap_base_type.h" |
|
42 #include "eap_automatic_variable.h" |
|
43 #include "eap_process_tlv_message_data.h" |
|
44 #include "eap_master_session_key.h" |
|
45 #include "eapol_key_types.h" |
|
46 |
|
47 #if defined(USE_EAP_SIMPLE_CONFIG) |
|
48 #include "simple_config_types.h" |
|
49 #include "simple_config_credential.h" |
|
50 #include "simple_config_payloads.h" |
|
51 #endif // #if defined(USE_EAP_SIMPLE_CONFIG) |
|
52 |
|
53 //-------------------------------------------------- |
|
54 |
|
55 // |
|
56 EAP_FUNC_EXPORT eap_core_client_message_if_c::~eap_core_client_message_if_c() |
|
57 { |
|
58 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
59 |
|
60 EAP_TRACE_DEBUG( |
|
61 m_am_tools, |
|
62 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
63 (EAPL("eap_core_client_message_if_c::~eap_core_client_message_if_c(): this = 0x%08x => 0x%08x.\n"), |
|
64 this, |
|
65 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
66 |
|
67 EAP_ASSERT(m_shutdown_was_called == true); |
|
68 |
|
69 delete m_server_if; |
|
70 m_server_if = 0; |
|
71 |
|
72 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
73 } |
|
74 |
|
75 //-------------------------------------------------- |
|
76 |
|
77 #if defined(_WIN32) && !defined(__GNUC__) |
|
78 #pragma warning( disable : 4355 ) // 'this' : used in base member initializer list |
|
79 #endif |
|
80 |
|
81 // |
|
82 EAP_FUNC_EXPORT eap_core_client_message_if_c::eap_core_client_message_if_c( |
|
83 abs_eap_am_tools_c * const tools, |
|
84 eap_am_message_if_c * const server, |
|
85 abs_eap_session_core_c * const partner, |
|
86 const bool is_client_when_true) |
|
87 : m_am_tools(tools) |
|
88 , m_server_if(server) |
|
89 , m_partner(partner) |
|
90 , m_error_code(eap_status_ok) |
|
91 , m_error_function(eap_tlv_message_type_function_none) |
|
92 , m_eap_header_offset(0ul) |
|
93 , m_MTU(0ul) |
|
94 , m_trailer_length(0ul) |
|
95 , m_is_client(is_client_when_true) |
|
96 , m_is_valid(false) |
|
97 , m_shutdown_was_called(false) |
|
98 { |
|
99 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
100 |
|
101 EAP_TRACE_DEBUG( |
|
102 m_am_tools, |
|
103 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
104 (EAPL("eap_core_client_message_if_c::eap_core_client_message_if_c(): this = 0x%08x => 0x%08x.\n"), |
|
105 this, |
|
106 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
107 |
|
108 set_is_valid(); |
|
109 |
|
110 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
111 } |
|
112 |
|
113 //-------------------------------------------------- |
|
114 |
|
115 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::process_message(eap_process_tlv_message_data_c * const message) |
|
116 { |
|
117 // Sends message data composed of Attribute-Value Pairs. |
|
118 |
|
119 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::send_message()"); |
|
120 |
|
121 EAP_TRACE_DATA_DEBUG( |
|
122 m_am_tools, |
|
123 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
124 (EAPL("eap_core_client_message_if_c::send_message()"), |
|
125 message->get_message_data(), |
|
126 message->get_message_data_length())); |
|
127 |
|
128 { |
|
129 eap_status_e send_status = m_server_if->process_data( |
|
130 message->get_message_data(), |
|
131 message->get_message_data_length()); |
|
132 if (send_status != eap_status_ok) |
|
133 { |
|
134 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
135 return EAP_STATUS_RETURN(m_am_tools, send_status); |
|
136 } |
|
137 |
|
138 |
|
139 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
140 return EAP_STATUS_RETURN(m_am_tools, send_status); |
|
141 } |
|
142 |
|
143 } |
|
144 |
|
145 //-------------------------------------------------- |
|
146 |
|
147 // |
|
148 EAP_FUNC_EXPORT void eap_core_client_message_if_c::set_is_valid() |
|
149 { |
|
150 m_is_valid = true; |
|
151 } |
|
152 |
|
153 //-------------------------------------------------- |
|
154 |
|
155 // |
|
156 EAP_FUNC_EXPORT bool eap_core_client_message_if_c::get_is_valid() |
|
157 { |
|
158 return m_is_valid; |
|
159 } |
|
160 |
|
161 //-------------------------------------------------- |
|
162 |
|
163 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::reset() |
|
164 { |
|
165 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
166 |
|
167 EAP_TRACE_DEBUG( |
|
168 m_am_tools, |
|
169 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
170 (EAPL("eap_core_client_message_if_c::reset(): this = 0x%08x => 0x%08x.\n"), |
|
171 this, |
|
172 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
173 |
|
174 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::reset()"); |
|
175 |
|
176 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
177 return EAP_STATUS_RETURN(m_am_tools, eap_status_ok); |
|
178 } |
|
179 |
|
180 //-------------------------------------------------- |
|
181 |
|
182 // |
|
183 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::packet_process( |
|
184 const eap_am_network_id_c * const receive_network_id, |
|
185 eap_general_header_base_c * const packet_data, |
|
186 const u32_t packet_length) |
|
187 { |
|
188 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
189 |
|
190 EAP_TRACE_DEBUG( |
|
191 m_am_tools, |
|
192 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
193 (EAPL("eap_core_client_message_if_c::packet_process(): this = 0x%08x => 0x%08x.\n"), |
|
194 this, |
|
195 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
196 |
|
197 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::packet_process()"); |
|
198 |
|
199 EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true); |
|
200 |
|
201 eap_status_e status(eap_status_process_general_error); |
|
202 |
|
203 // Creates message data composed of Attribute-Value Pairs. |
|
204 eap_process_tlv_message_data_c message(m_am_tools); |
|
205 |
|
206 if (message.get_is_valid() == false) |
|
207 { |
|
208 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
209 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
210 } |
|
211 |
|
212 status = message.add_parameter_data(eap_tlv_message_type_function_packet_process); |
|
213 if (status != eap_status_ok) |
|
214 { |
|
215 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
216 return EAP_STATUS_RETURN(m_am_tools, status); |
|
217 } |
|
218 |
|
219 status = message.add_parameter_data( |
|
220 receive_network_id); |
|
221 if (status != eap_status_ok) |
|
222 { |
|
223 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
224 return EAP_STATUS_RETURN(m_am_tools, status); |
|
225 } |
|
226 |
|
227 if (packet_length != packet_data->get_header_buffer_length()) |
|
228 { |
|
229 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
230 return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter); |
|
231 } |
|
232 |
|
233 status = message.add_parameter_data( |
|
234 packet_data); |
|
235 if (status != eap_status_ok) |
|
236 { |
|
237 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
238 return EAP_STATUS_RETURN(m_am_tools, status); |
|
239 } |
|
240 |
|
241 status = process_message(&message); |
|
242 |
|
243 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
244 return EAP_STATUS_RETURN(m_am_tools, status); |
|
245 } |
|
246 |
|
247 //-------------------------------------------------- |
|
248 |
|
249 // |
|
250 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::configure() |
|
251 { |
|
252 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
253 |
|
254 EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true); |
|
255 |
|
256 m_eap_header_offset = m_partner->get_header_offset( |
|
257 &m_MTU, &m_trailer_length); |
|
258 |
|
259 eap_variable_data_c client_configuration(m_am_tools); |
|
260 |
|
261 eap_status_e status = m_partner->read_configure( |
|
262 cf_str_EAP_read_all_configurations.get_field(), |
|
263 &client_configuration); |
|
264 if (status != eap_status_ok) |
|
265 { |
|
266 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
267 return EAP_STATUS_RETURN(m_am_tools, status); |
|
268 } |
|
269 |
|
270 status = m_server_if->configure(&client_configuration); |
|
271 if (status != eap_status_ok) |
|
272 { |
|
273 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
274 return EAP_STATUS_RETURN(m_am_tools, status); |
|
275 } |
|
276 |
|
277 status = eap_mtu(m_MTU); |
|
278 if (status != eap_status_ok) |
|
279 { |
|
280 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
281 return EAP_STATUS_RETURN(m_am_tools, status); |
|
282 } |
|
283 |
|
284 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
285 return EAP_STATUS_RETURN(m_am_tools, status); |
|
286 } |
|
287 |
|
288 //-------------------------------------------------- |
|
289 |
|
290 // |
|
291 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::shutdown() |
|
292 { |
|
293 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
294 |
|
295 EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true); |
|
296 |
|
297 EAP_TRACE_DEBUG( |
|
298 m_am_tools, |
|
299 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
300 (EAPL("eap_core_client_message_if_c::shutdown(): this = 0x%08x => 0x%08x.\n"), |
|
301 this, |
|
302 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
303 |
|
304 if (m_shutdown_was_called == true) |
|
305 { |
|
306 // Shutdown function was called already. |
|
307 return EAP_STATUS_RETURN(m_am_tools, eap_status_ok); |
|
308 } |
|
309 m_shutdown_was_called = true; |
|
310 |
|
311 if (m_server_if != 0) |
|
312 { |
|
313 (void)m_server_if->shutdown(); |
|
314 } |
|
315 |
|
316 eap_status_e status = reset(); |
|
317 |
|
318 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
319 return EAP_STATUS_RETURN(m_am_tools, status); |
|
320 } |
|
321 |
|
322 //-------------------------------------------------- |
|
323 |
|
324 // |
|
325 eap_status_e eap_core_client_message_if_c::eap_mtu( |
|
326 const u32_t MTU) |
|
327 { |
|
328 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
329 |
|
330 EAP_TRACE_DEBUG( |
|
331 m_am_tools, |
|
332 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
333 (EAPL("eap_core_client_message_if_c::eap_mtu(): this = 0x%08x => 0x%08x.\n"), |
|
334 this, |
|
335 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
336 |
|
337 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::eap_mtu()"); |
|
338 |
|
339 EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true); |
|
340 |
|
341 eap_status_e status(eap_status_process_general_error); |
|
342 |
|
343 { |
|
344 // Creates message data composed of Attribute-Value Pairs. |
|
345 eap_process_tlv_message_data_c message(m_am_tools); |
|
346 |
|
347 if (message.get_is_valid() == false) |
|
348 { |
|
349 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
350 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
351 } |
|
352 |
|
353 status = message.add_parameter_data(eap_tlv_message_type_function_eap_mtu); |
|
354 if (status != eap_status_ok) |
|
355 { |
|
356 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
357 return EAP_STATUS_RETURN(m_am_tools, status); |
|
358 } |
|
359 |
|
360 status = message.add_parameter_data(MTU); |
|
361 if (status != eap_status_ok) |
|
362 { |
|
363 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
364 return EAP_STATUS_RETURN(m_am_tools, status); |
|
365 } |
|
366 |
|
367 status = process_message(&message); |
|
368 if (status != eap_status_ok) |
|
369 { |
|
370 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
371 return EAP_STATUS_RETURN(m_am_tools, status); |
|
372 } |
|
373 } |
|
374 |
|
375 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
376 return EAP_STATUS_RETURN(m_am_tools, status); |
|
377 } |
|
378 |
|
379 //-------------------------------------------------- |
|
380 |
|
381 // |
|
382 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::eap_acknowledge( |
|
383 const eap_am_network_id_c * const receive_network_id) |
|
384 { |
|
385 // Any Network Protocol packet is accepted as a success indication. |
|
386 // This is described in RFC 2284 "PPP Extensible Authentication Protocol (EAP)". |
|
387 |
|
388 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
389 |
|
390 EAP_TRACE_DEBUG( |
|
391 m_am_tools, |
|
392 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
393 (EAPL("eap_core_client_message_if_c::eap_acknowledge(): this = 0x%08x => 0x%08x.\n"), |
|
394 this, |
|
395 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
396 |
|
397 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::eap_acknowledge()"); |
|
398 |
|
399 EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true); |
|
400 |
|
401 eap_status_e status(eap_status_process_general_error); |
|
402 |
|
403 if (receive_network_id == 0) |
|
404 { |
|
405 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
406 return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter); |
|
407 } |
|
408 |
|
409 { |
|
410 // Creates message data composed of Attribute-Value Pairs. |
|
411 eap_process_tlv_message_data_c message(m_am_tools); |
|
412 |
|
413 if (message.get_is_valid() == false) |
|
414 { |
|
415 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
416 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
417 } |
|
418 |
|
419 status = message.add_parameter_data(eap_tlv_message_type_function_eap_acknowledge); |
|
420 if (status != eap_status_ok) |
|
421 { |
|
422 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
423 return EAP_STATUS_RETURN(m_am_tools, status); |
|
424 } |
|
425 |
|
426 status = message.add_parameter_data(receive_network_id); |
|
427 if (status != eap_status_ok) |
|
428 { |
|
429 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
430 return EAP_STATUS_RETURN(m_am_tools, status); |
|
431 } |
|
432 |
|
433 status = process_message(&message); |
|
434 if (status != eap_status_ok) |
|
435 { |
|
436 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
437 return EAP_STATUS_RETURN(m_am_tools, status); |
|
438 } |
|
439 } |
|
440 |
|
441 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
442 return EAP_STATUS_RETURN(m_am_tools, status); |
|
443 } |
|
444 |
|
445 //-------------------------------------------------- |
|
446 |
|
447 #if defined(USE_EAP_CORE_SERVER) |
|
448 |
|
449 // |
|
450 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::send_eap_identity_request( |
|
451 const eap_am_network_id_c * const receive_network_id) |
|
452 { |
|
453 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
454 |
|
455 EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true); |
|
456 |
|
457 eap_status_e status(eap_status_process_general_error); |
|
458 |
|
459 EAP_TRACE_DEBUG( |
|
460 m_am_tools, |
|
461 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
462 (EAPL("eap_core_client_message_if_c::send_eap_identity_request(): this = 0x%08x => 0x%08x.\n"), |
|
463 this, |
|
464 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
465 |
|
466 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::send_eap_identity_request()"); |
|
467 |
|
468 { |
|
469 // Creates message data composed of Attribute-Value Pairs. |
|
470 eap_process_tlv_message_data_c message(m_am_tools); |
|
471 |
|
472 if (message.get_is_valid() == false) |
|
473 { |
|
474 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
475 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
476 } |
|
477 |
|
478 status = message.add_parameter_data(eap_tlv_message_type_function_send_eap_identity_request); |
|
479 if (status != eap_status_ok) |
|
480 { |
|
481 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
482 return EAP_STATUS_RETURN(m_am_tools, status); |
|
483 } |
|
484 |
|
485 status = message.add_parameter_data(receive_network_id); |
|
486 if (status != eap_status_ok) |
|
487 { |
|
488 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
489 return EAP_STATUS_RETURN(m_am_tools, status); |
|
490 } |
|
491 |
|
492 status = process_message(&message); |
|
493 if (status != eap_status_ok) |
|
494 { |
|
495 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
496 return EAP_STATUS_RETURN(m_am_tools, status); |
|
497 } |
|
498 } |
|
499 |
|
500 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
501 return EAP_STATUS_RETURN(m_am_tools, status); |
|
502 } |
|
503 |
|
504 #endif //#if defined(USE_EAP_CORE_SERVER) |
|
505 |
|
506 //-------------------------------------------------- |
|
507 |
|
508 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::set_eap_database_reference_values( |
|
509 const eap_variable_data_c * const reference) |
|
510 { |
|
511 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
512 |
|
513 EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true); |
|
514 |
|
515 eap_status_e status(eap_status_process_general_error); |
|
516 |
|
517 EAP_TRACE_DEBUG( |
|
518 m_am_tools, |
|
519 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
520 (EAPL("eap_core_client_message_if_c::set_eap_database_reference_values(): this = 0x%08x => 0x%08x.\n"), |
|
521 this, |
|
522 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
523 |
|
524 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::set_eap_database_reference_values()"); |
|
525 |
|
526 { |
|
527 // Creates message data composed of Attribute-Value Pairs. |
|
528 eap_process_tlv_message_data_c message(m_am_tools); |
|
529 |
|
530 if (message.get_is_valid() == false) |
|
531 { |
|
532 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
533 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
534 } |
|
535 |
|
536 status = message.add_parameter_data(eap_tlv_message_type_function_set_eap_database_reference_values); |
|
537 if (status != eap_status_ok) |
|
538 { |
|
539 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
540 return EAP_STATUS_RETURN(m_am_tools, status); |
|
541 } |
|
542 |
|
543 status = message.add_parameter_data(reference); |
|
544 if (status != eap_status_ok) |
|
545 { |
|
546 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
547 return EAP_STATUS_RETURN(m_am_tools, status); |
|
548 } |
|
549 |
|
550 status = process_message(&message); |
|
551 if (status != eap_status_ok) |
|
552 { |
|
553 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
554 return EAP_STATUS_RETURN(m_am_tools, status); |
|
555 } |
|
556 } |
|
557 |
|
558 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
559 return EAP_STATUS_RETURN(m_am_tools, status); |
|
560 } |
|
561 |
|
562 //-------------------------------------------------- |
|
563 |
|
564 // |
|
565 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::timer_expired( |
|
566 const u32_t id, void *data) |
|
567 { |
|
568 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
569 |
|
570 EAP_TRACE_DEBUG( |
|
571 m_am_tools, |
|
572 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
573 (EAPL("TIMER: [0x%08x]->eap_core_client_message_if_c::") |
|
574 EAPL("timer_expired(id 0x%02x, data 0x%08x), %s.\n"), |
|
575 this, |
|
576 id, |
|
577 data, |
|
578 (m_is_client == true) ? "client": "server")); |
|
579 |
|
580 |
|
581 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
582 return EAP_STATUS_RETURN(m_am_tools, eap_status_ok); |
|
583 } |
|
584 |
|
585 //-------------------------------------------------- |
|
586 |
|
587 // |
|
588 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::timer_delete_data( |
|
589 const u32_t id, void *data) |
|
590 { |
|
591 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
592 |
|
593 EAP_TRACE_DEBUG( |
|
594 m_am_tools, |
|
595 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
596 (EAPL("TIMER: [0x%08x]->eap_core_client_message_if_c::") |
|
597 EAPL("timer_delete_data(id 0x%02x, data 0x%08x).\n"), |
|
598 this, id, data)); |
|
599 |
|
600 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
601 return EAP_STATUS_RETURN(m_am_tools, eap_status_ok); |
|
602 } |
|
603 |
|
604 //-------------------------------------------------- |
|
605 |
|
606 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::cancel_all_eap_sessions() |
|
607 { |
|
608 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
609 |
|
610 EAP_TRACE_DEBUG( |
|
611 m_am_tools, |
|
612 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
613 (EAPL("eap_core_client_message_if_c::cancel_all_eap_sessions(): this = 0x%08x => 0x%08x.\n"), |
|
614 this, |
|
615 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
616 |
|
617 eap_status_e status = reset(); |
|
618 |
|
619 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
620 return EAP_STATUS_RETURN(m_am_tools, status); |
|
621 } |
|
622 |
|
623 //-------------------------------------------------- |
|
624 |
|
625 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::create_eap_session( |
|
626 const eap_am_network_id_c * const receive_network_id) |
|
627 { |
|
628 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
629 |
|
630 EAP_TRACE_DEBUG( |
|
631 m_am_tools, |
|
632 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
633 (EAPL("eap_core_client_message_if_c::create_eap_session(): this = 0x%08x => 0x%08x.\n"), |
|
634 this, |
|
635 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
636 |
|
637 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::create_eap_session()"); |
|
638 |
|
639 eap_status_e status(eap_status_process_general_error); |
|
640 |
|
641 { |
|
642 // Creates message data composed of Attribute-Value Pairs. |
|
643 eap_process_tlv_message_data_c message(m_am_tools); |
|
644 |
|
645 if (message.get_is_valid() == false) |
|
646 { |
|
647 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
648 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
649 } |
|
650 |
|
651 status = message.add_parameter_data(eap_tlv_message_type_function_create_eap_session); |
|
652 if (status != eap_status_ok) |
|
653 { |
|
654 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
655 return EAP_STATUS_RETURN(m_am_tools, status); |
|
656 } |
|
657 |
|
658 status = message.add_parameter_data(receive_network_id); |
|
659 if (status != eap_status_ok) |
|
660 { |
|
661 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
662 return EAP_STATUS_RETURN(m_am_tools, status); |
|
663 } |
|
664 |
|
665 status = process_message(&message); |
|
666 if (status != eap_status_ok) |
|
667 { |
|
668 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
669 return EAP_STATUS_RETURN(m_am_tools, status); |
|
670 } |
|
671 } |
|
672 |
|
673 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
674 return EAP_STATUS_RETURN(m_am_tools, status); |
|
675 } |
|
676 |
|
677 //-------------------------------------------------- |
|
678 |
|
679 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::remove_eap_session( |
|
680 const bool complete_to_lower_layer, |
|
681 const eap_am_network_id_c * const receive_network_id) |
|
682 { |
|
683 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
684 |
|
685 EAP_TRACE_DEBUG( |
|
686 m_am_tools, |
|
687 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
688 (EAPL("eap_core_client_message_if_c::remove_eap_session(): this = 0x%08x => 0x%08x.\n"), |
|
689 this, |
|
690 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
691 |
|
692 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::remove_eap_session()"); |
|
693 |
|
694 eap_status_e status(eap_status_process_general_error); |
|
695 |
|
696 { |
|
697 // Creates message data composed of Attribute-Value Pairs. |
|
698 eap_process_tlv_message_data_c message(m_am_tools); |
|
699 |
|
700 if (message.get_is_valid() == false) |
|
701 { |
|
702 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
703 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
704 } |
|
705 |
|
706 status = message.add_parameter_data(eap_tlv_message_type_function_remove_eap_session); |
|
707 if (status != eap_status_ok) |
|
708 { |
|
709 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
710 return EAP_STATUS_RETURN(m_am_tools, status); |
|
711 } |
|
712 |
|
713 status = message.add_parameter_data(complete_to_lower_layer); |
|
714 if (status != eap_status_ok) |
|
715 { |
|
716 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
717 return EAP_STATUS_RETURN(m_am_tools, status); |
|
718 } |
|
719 |
|
720 status = message.add_parameter_data(receive_network_id); |
|
721 if (status != eap_status_ok) |
|
722 { |
|
723 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
724 return EAP_STATUS_RETURN(m_am_tools, status); |
|
725 } |
|
726 |
|
727 status = process_message(&message); |
|
728 if (status != eap_status_ok) |
|
729 { |
|
730 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
731 return EAP_STATUS_RETURN(m_am_tools, status); |
|
732 } |
|
733 } |
|
734 |
|
735 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
736 return EAP_STATUS_RETURN(m_am_tools, status); |
|
737 } |
|
738 |
|
739 //-------------------------------------------------- |
|
740 |
|
741 eap_status_e eap_core_client_message_if_c::get_802_11_authentication_mode( |
|
742 const eap_am_network_id_c * const receive_network_id, |
|
743 const eapol_key_authentication_type_e authentication_type, |
|
744 const eap_variable_data_c * const SSID, |
|
745 const eap_variable_data_c * const preshared_key) |
|
746 { |
|
747 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
748 |
|
749 EAP_TRACE_DEBUG( |
|
750 m_am_tools, |
|
751 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
752 (EAPL("eap_core_client_message_if_c::get_802_11_authentication_mode(): this = 0x%08x => 0x%08x.\n"), |
|
753 this, |
|
754 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
755 |
|
756 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::get_802_11_authentication_mode()"); |
|
757 |
|
758 eap_status_e status(eap_status_process_general_error); |
|
759 |
|
760 { |
|
761 // Creates message data composed of Attribute-Value Pairs. |
|
762 eap_process_tlv_message_data_c message(m_am_tools); |
|
763 |
|
764 if (message.get_is_valid() == false) |
|
765 { |
|
766 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
767 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
768 } |
|
769 |
|
770 status = message.add_parameter_data(eap_tlv_message_type_function_get_802_11_authentication_mode); |
|
771 if (status != eap_status_ok) |
|
772 { |
|
773 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
774 return EAP_STATUS_RETURN(m_am_tools, status); |
|
775 } |
|
776 |
|
777 status = message.add_parameter_data(receive_network_id); |
|
778 if (status != eap_status_ok) |
|
779 { |
|
780 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
781 return EAP_STATUS_RETURN(m_am_tools, status); |
|
782 } |
|
783 |
|
784 status = message.add_parameter_data(authentication_type); |
|
785 if (status != eap_status_ok) |
|
786 { |
|
787 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
788 return EAP_STATUS_RETURN(m_am_tools, status); |
|
789 } |
|
790 |
|
791 status = message.add_parameter_data(SSID); |
|
792 if (status != eap_status_ok) |
|
793 { |
|
794 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
795 return EAP_STATUS_RETURN(m_am_tools, status); |
|
796 } |
|
797 |
|
798 status = message.add_parameter_data(preshared_key); |
|
799 if (status != eap_status_ok) |
|
800 { |
|
801 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
802 return EAP_STATUS_RETURN(m_am_tools, status); |
|
803 } |
|
804 |
|
805 status = process_message(&message); |
|
806 if (status != eap_status_ok) |
|
807 { |
|
808 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
809 return EAP_STATUS_RETURN(m_am_tools, status); |
|
810 } |
|
811 } |
|
812 |
|
813 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
814 return EAP_STATUS_RETURN(m_am_tools, status); |
|
815 } |
|
816 |
|
817 //-------------------------------------------------- |
|
818 |
|
819 eap_status_e eap_core_client_message_if_c::packet_send( |
|
820 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
|
821 { |
|
822 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
823 |
|
824 EAP_TRACE_DEBUG( |
|
825 m_am_tools, |
|
826 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
827 (EAPL("eap_core_client_message_if_c::packet_send(): this = 0x%08x => 0x%08x.\n"), |
|
828 this, |
|
829 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
830 |
|
831 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::packet_send()"); |
|
832 |
|
833 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
834 |
|
835 u32_t parameter_index(eap_message_payload_index_first_parameter); |
|
836 |
|
837 eap_process_tlv_message_data_c message_data(m_am_tools); |
|
838 |
|
839 if (message_data.get_is_valid() == false) |
|
840 { |
|
841 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
842 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
843 } |
|
844 |
|
845 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
846 |
|
847 eap_am_network_id_c send_network_id(m_am_tools); |
|
848 |
|
849 eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, &send_network_id); |
|
850 if (status != eap_status_ok) |
|
851 { |
|
852 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
853 return EAP_STATUS_RETURN(m_am_tools, status); |
|
854 } |
|
855 |
|
856 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
857 |
|
858 ++parameter_index; |
|
859 |
|
860 eap_buf_chain_wr_c packet_buffer(eap_write_buffer, m_am_tools); |
|
861 |
|
862 if (packet_buffer.get_is_valid() == false) |
|
863 { |
|
864 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
865 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
866 } |
|
867 |
|
868 { |
|
869 eap_variable_data_c packet_data(m_am_tools); |
|
870 |
|
871 if (packet_data.get_is_valid() == false) |
|
872 { |
|
873 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
874 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
875 } |
|
876 |
|
877 status = message_data.read_parameter_data(parameters, parameter_index, &packet_data); |
|
878 if (status != eap_status_ok) |
|
879 { |
|
880 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
881 return EAP_STATUS_RETURN(m_am_tools, status); |
|
882 } |
|
883 |
|
884 status = packet_buffer.add_data_to_offset(m_eap_header_offset, &packet_data); |
|
885 if (status != eap_status_ok) |
|
886 { |
|
887 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
888 return EAP_STATUS_RETURN(m_am_tools, status); |
|
889 } |
|
890 } |
|
891 |
|
892 status = m_partner->packet_send( |
|
893 &send_network_id, |
|
894 &packet_buffer, |
|
895 m_eap_header_offset, |
|
896 packet_buffer.get_data_length()-m_eap_header_offset, |
|
897 packet_buffer.get_data_length()); |
|
898 |
|
899 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
900 return EAP_STATUS_RETURN(m_am_tools, status); |
|
901 } |
|
902 |
|
903 //-------------------------------------------------- |
|
904 |
|
905 eap_status_e eap_core_client_message_if_c::state_notification( |
|
906 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
|
907 { |
|
908 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
909 |
|
910 EAP_TRACE_DEBUG( |
|
911 m_am_tools, |
|
912 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
913 (EAPL("eap_core_client_message_if_c::state_notification(): this = 0x%08x => 0x%08x.\n"), |
|
914 this, |
|
915 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
916 |
|
917 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::state_notification()"); |
|
918 |
|
919 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
920 |
|
921 u32_t parameter_index(eap_message_payload_index_first_parameter); |
|
922 |
|
923 eap_process_tlv_message_data_c message_data(m_am_tools); |
|
924 |
|
925 if (message_data.get_is_valid() == false) |
|
926 { |
|
927 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
928 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
929 } |
|
930 |
|
931 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
932 |
|
933 eap_state_notification_c * state = 0; |
|
934 |
|
935 eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, &state); |
|
936 if (status != eap_status_ok) |
|
937 { |
|
938 delete state; |
|
939 state = 0; |
|
940 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
941 return EAP_STATUS_RETURN(m_am_tools, status); |
|
942 } |
|
943 |
|
944 m_partner->state_notification( |
|
945 state); |
|
946 |
|
947 delete state; |
|
948 state = 0; |
|
949 |
|
950 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
951 return EAP_STATUS_RETURN(m_am_tools, eap_status_ok); |
|
952 } |
|
953 |
|
954 //-------------------------------------------------- |
|
955 |
|
956 eap_status_e eap_core_client_message_if_c::packet_data_crypto_keys( |
|
957 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
|
958 { |
|
959 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
960 |
|
961 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
962 |
|
963 u32_t parameter_index(eap_message_payload_index_first_parameter); |
|
964 |
|
965 eap_process_tlv_message_data_c message_data(m_am_tools); |
|
966 |
|
967 if (message_data.get_is_valid() == false) |
|
968 { |
|
969 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
970 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
971 } |
|
972 |
|
973 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
974 |
|
975 eap_am_network_id_c send_network_id(m_am_tools); |
|
976 |
|
977 eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, &send_network_id); |
|
978 if (status != eap_status_ok) |
|
979 { |
|
980 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
981 return EAP_STATUS_RETURN(m_am_tools, status); |
|
982 } |
|
983 |
|
984 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
985 |
|
986 ++parameter_index; |
|
987 |
|
988 eap_type_value_e eap_type(eap_type_none); |
|
989 |
|
990 status = message_data.read_parameter_data(parameters, parameter_index, &eap_type); |
|
991 if (status != eap_status_ok) |
|
992 { |
|
993 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
994 return EAP_STATUS_RETURN(m_am_tools, status); |
|
995 } |
|
996 |
|
997 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
998 |
|
999 ++parameter_index; |
|
1000 |
|
1001 eap_master_session_key_c master_session_key(m_am_tools, eap_type); |
|
1002 |
|
1003 status = message_data.read_parameter_data(parameters, parameter_index, &master_session_key); |
|
1004 if (status != eap_status_ok) |
|
1005 { |
|
1006 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1007 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1008 } |
|
1009 |
|
1010 master_session_key.set_eap_type(eap_type); |
|
1011 |
|
1012 |
|
1013 status = m_partner->packet_data_crypto_keys( |
|
1014 &send_network_id, |
|
1015 &master_session_key); |
|
1016 |
|
1017 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1018 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1019 } |
|
1020 |
|
1021 //-------------------------------------------------- |
|
1022 |
|
1023 eap_status_e eap_core_client_message_if_c::restart_authentication( |
|
1024 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
|
1025 { |
|
1026 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1027 |
|
1028 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1029 |
|
1030 u32_t parameter_index(eap_message_payload_index_first_parameter); |
|
1031 |
|
1032 eap_process_tlv_message_data_c message_data(m_am_tools); |
|
1033 |
|
1034 if (message_data.get_is_valid() == false) |
|
1035 { |
|
1036 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1037 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
1038 } |
|
1039 |
|
1040 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1041 |
|
1042 eap_am_network_id_c send_network_id(m_am_tools); |
|
1043 |
|
1044 eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, &send_network_id); |
|
1045 if (status != eap_status_ok) |
|
1046 { |
|
1047 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1048 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1049 } |
|
1050 |
|
1051 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1052 |
|
1053 ++parameter_index; |
|
1054 |
|
1055 bool is_client_when_true(false); |
|
1056 |
|
1057 status = message_data.read_parameter_data(parameters, parameter_index, &is_client_when_true); |
|
1058 if (status != eap_status_ok) |
|
1059 { |
|
1060 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1061 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1062 } |
|
1063 |
|
1064 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1065 |
|
1066 ++parameter_index; |
|
1067 |
|
1068 bool force_clean_restart(false); |
|
1069 |
|
1070 status = message_data.read_parameter_data(parameters, parameter_index, &force_clean_restart); |
|
1071 if (status != eap_status_ok) |
|
1072 { |
|
1073 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1074 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1075 } |
|
1076 |
|
1077 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1078 |
|
1079 ++parameter_index; |
|
1080 |
|
1081 bool from_timer(false); |
|
1082 |
|
1083 status = message_data.read_parameter_data(parameters, parameter_index, &from_timer); |
|
1084 if (status != eap_status_ok) |
|
1085 { |
|
1086 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1087 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1088 } |
|
1089 |
|
1090 |
|
1091 status = m_partner->restart_authentication( |
|
1092 &send_network_id, |
|
1093 is_client_when_true, |
|
1094 force_clean_restart, |
|
1095 from_timer); |
|
1096 |
|
1097 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1098 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1099 } |
|
1100 |
|
1101 //-------------------------------------------------- |
|
1102 |
|
1103 #if defined(USE_EAP_SIMPLE_CONFIG) |
|
1104 |
|
1105 eap_status_e eap_core_client_message_if_c::new_protected_setup_credentials( |
|
1106 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
|
1107 { |
|
1108 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1109 |
|
1110 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1111 |
|
1112 eap_status_e status(eap_status_process_general_error); |
|
1113 |
|
1114 #if defined(USE_EAP_SIMPLE_CONFIG) |
|
1115 |
|
1116 u32_t parameter_index(eap_message_payload_index_first_parameter); |
|
1117 |
|
1118 eap_process_tlv_message_data_c message_data(m_am_tools); |
|
1119 |
|
1120 if (message_data.get_is_valid() == false) |
|
1121 { |
|
1122 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1123 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
1124 } |
|
1125 |
|
1126 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1127 |
|
1128 eap_array_c<simple_config_credential_c> credential_array(m_am_tools); |
|
1129 |
|
1130 status = message_data.read_parameter_data(parameters, parameter_index, &credential_array); |
|
1131 if (status != eap_status_ok) |
|
1132 { |
|
1133 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1134 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1135 } |
|
1136 |
|
1137 status = m_partner->save_simple_config_session( |
|
1138 simple_config_state_simple_config_success, |
|
1139 &credential_array, |
|
1140 0, |
|
1141 simple_config_Device_Password_ID_Default_PIN, |
|
1142 0); |
|
1143 |
|
1144 #endif //#if defined(USE_EAP_SIMPLE_CONFIG) |
|
1145 |
|
1146 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1147 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1148 } |
|
1149 |
|
1150 #endif // #if defined(USE_EAP_SIMPLE_CONFIG) |
|
1151 |
|
1152 //-------------------------------------------------- |
|
1153 |
|
1154 eap_status_e eap_core_client_message_if_c::complete_get_802_11_authentication_mode( |
|
1155 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
|
1156 { |
|
1157 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1158 |
|
1159 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1160 |
|
1161 u32_t parameter_index(eap_message_payload_index_first_parameter); |
|
1162 |
|
1163 eap_process_tlv_message_data_c message_data(m_am_tools); |
|
1164 |
|
1165 if (message_data.get_is_valid() == false) |
|
1166 { |
|
1167 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1168 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
1169 } |
|
1170 |
|
1171 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1172 |
|
1173 eap_status_e completion_status(eap_status_process_general_error); |
|
1174 |
|
1175 eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, eap_tlv_message_type_eap_status, &completion_status); |
|
1176 if (status != eap_status_ok) |
|
1177 { |
|
1178 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1179 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1180 } |
|
1181 |
|
1182 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1183 |
|
1184 ++parameter_index; |
|
1185 |
|
1186 eap_am_network_id_c receive_network_id(m_am_tools); |
|
1187 |
|
1188 status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id); |
|
1189 if (status != eap_status_ok) |
|
1190 { |
|
1191 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1192 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1193 } |
|
1194 |
|
1195 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1196 |
|
1197 ++parameter_index; |
|
1198 |
|
1199 eapol_key_802_11_authentication_mode_e mode(eapol_key_802_11_authentication_mode_none); |
|
1200 |
|
1201 status = message_data.read_parameter_data(parameters, parameter_index, &mode); |
|
1202 if (status != eap_status_ok) |
|
1203 { |
|
1204 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1205 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1206 } |
|
1207 |
|
1208 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1209 |
|
1210 status = m_partner->complete_get_802_11_authentication_mode( |
|
1211 completion_status, |
|
1212 &receive_network_id, |
|
1213 mode); |
|
1214 |
|
1215 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1216 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1217 } |
|
1218 |
|
1219 //-------------------------------------------------- |
|
1220 |
|
1221 eap_status_e eap_core_client_message_if_c::complete_remove_eap_session( |
|
1222 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
|
1223 { |
|
1224 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1225 |
|
1226 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1227 |
|
1228 u32_t parameter_index(eap_message_payload_index_first_parameter); |
|
1229 |
|
1230 eap_process_tlv_message_data_c message_data(m_am_tools); |
|
1231 |
|
1232 if (message_data.get_is_valid() == false) |
|
1233 { |
|
1234 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1235 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
1236 } |
|
1237 |
|
1238 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1239 |
|
1240 bool complete_to_lower_layer(false); |
|
1241 |
|
1242 eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, &complete_to_lower_layer); |
|
1243 if (status != eap_status_ok) |
|
1244 { |
|
1245 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1246 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1247 } |
|
1248 |
|
1249 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1250 |
|
1251 ++parameter_index; |
|
1252 |
|
1253 eap_am_network_id_c receive_network_id(m_am_tools); |
|
1254 |
|
1255 status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id); |
|
1256 if (status != eap_status_ok) |
|
1257 { |
|
1258 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1259 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1260 } |
|
1261 |
|
1262 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
1263 |
|
1264 status = m_partner->complete_remove_eap_session( |
|
1265 complete_to_lower_layer, |
|
1266 &receive_network_id); |
|
1267 |
|
1268 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1269 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1270 } |
|
1271 |
|
1272 //-------------------------------------------------- |
|
1273 |
|
1274 eap_status_e eap_core_client_message_if_c::process_error_message( |
|
1275 const eap_status_e error_code, |
|
1276 const eap_tlv_message_type_function_e function) |
|
1277 { |
|
1278 eap_status_e status(eap_status_ok); |
|
1279 |
|
1280 { |
|
1281 // Creates message data composed of Attribute-Value Pairs. |
|
1282 eap_process_tlv_message_data_c message(m_am_tools); |
|
1283 |
|
1284 if (message.get_is_valid() == false) |
|
1285 { |
|
1286 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1287 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
1288 } |
|
1289 |
|
1290 status = message.add_parameter_data( |
|
1291 eap_tlv_message_type_error, |
|
1292 static_cast<u32_t>(error_code)); |
|
1293 if (status != eap_status_ok) |
|
1294 { |
|
1295 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1296 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1297 } |
|
1298 |
|
1299 status = message.add_parameter_data(function); |
|
1300 if (status != eap_status_ok) |
|
1301 { |
|
1302 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1303 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1304 } |
|
1305 |
|
1306 status = process_message(&message); |
|
1307 if (status != eap_status_ok) |
|
1308 { |
|
1309 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1310 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1311 } |
|
1312 } |
|
1313 |
|
1314 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1315 return EAP_STATUS_RETURN(m_am_tools, eap_status_ok); |
|
1316 } |
|
1317 |
|
1318 //-------------------------------------------------- |
|
1319 |
|
1320 eap_status_e eap_core_client_message_if_c::process_message_type_error( |
|
1321 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
|
1322 { |
|
1323 eap_status_e status(eap_status_ok); |
|
1324 |
|
1325 eap_process_tlv_message_data_c message_data(m_am_tools); |
|
1326 |
|
1327 if (message_data.get_is_valid() == false) |
|
1328 { |
|
1329 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1330 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
1331 } |
|
1332 |
|
1333 // Error payload is the first in this case. |
|
1334 status = message_data.read_parameter_data(parameters, eap_message_payload_index_function, eap_tlv_message_type_error, &m_error_code); |
|
1335 if (status != eap_status_ok) |
|
1336 { |
|
1337 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1338 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1339 } |
|
1340 |
|
1341 // Fuction payload is the second in this case. |
|
1342 status = message_data.read_parameter_data(parameters, eap_message_payload_index_first_parameter, &m_error_function); |
|
1343 if (status != eap_status_ok) |
|
1344 { |
|
1345 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1346 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1347 } |
|
1348 |
|
1349 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1350 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1351 } |
|
1352 |
|
1353 //-------------------------------------------------- |
|
1354 |
|
1355 EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::send_data(const void * const data, const u32_t length) |
|
1356 { |
|
1357 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1358 |
|
1359 EAP_TRACE_DEBUG( |
|
1360 m_am_tools, |
|
1361 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
1362 (EAPL("eap_core_client_message_if_c::send_data(): this = 0x%08x => 0x%08x.\n"), |
|
1363 this, |
|
1364 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
1365 |
|
1366 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::send_data()"); |
|
1367 |
|
1368 eap_status_e status(eap_status_process_general_error); |
|
1369 |
|
1370 // Parses message data composed of Attribute-Value Pairs. |
|
1371 eap_process_tlv_message_data_c message(m_am_tools); |
|
1372 |
|
1373 if (message.get_is_valid() == false) |
|
1374 { |
|
1375 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1376 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
1377 } |
|
1378 |
|
1379 status = message.set_message_data(length, data); |
|
1380 if (status != eap_status_ok) |
|
1381 { |
|
1382 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1383 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1384 } |
|
1385 |
|
1386 EAP_TRACE_DATA_DEBUG( |
|
1387 m_am_tools, |
|
1388 EAP_TRACE_FLAGS_MESSAGE_DATA, |
|
1389 (EAPL("eap_core_client_message_if_c::send_data()"), |
|
1390 message.get_message_data(), |
|
1391 message.get_message_data_length())); |
|
1392 |
|
1393 eap_array_c<eap_tlv_header_c> parameters(m_am_tools); |
|
1394 |
|
1395 status = message.parse_message_data(¶meters); |
|
1396 if (status != eap_status_ok) |
|
1397 { |
|
1398 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1399 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1400 } |
|
1401 |
|
1402 if (parameters.get_object_count() == 0) |
|
1403 { |
|
1404 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1405 return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter); |
|
1406 } |
|
1407 |
|
1408 const eap_tlv_header_c * const function_header = parameters.get_object(eap_message_payload_index_function); |
|
1409 if (function_header == 0 |
|
1410 || (function_header->get_type() != eap_tlv_message_type_error |
|
1411 && function_header->get_type() != eap_tlv_message_type_function)) |
|
1412 { |
|
1413 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1414 return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter); |
|
1415 } |
|
1416 |
|
1417 if (function_header->get_type() == eap_tlv_message_type_error) |
|
1418 { |
|
1419 status = process_message_type_error(¶meters); |
|
1420 } |
|
1421 else // function_header->get_type() == eap_tlv_message_type_function |
|
1422 { |
|
1423 eap_tlv_message_type_function_e function(eap_tlv_message_type_function_none); |
|
1424 |
|
1425 status = message.get_parameter_data(function_header, &function); |
|
1426 if (status != eap_status_ok) |
|
1427 { |
|
1428 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1429 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1430 } |
|
1431 |
|
1432 switch(function) |
|
1433 { |
|
1434 case eap_tlv_message_type_function_packet_send: |
|
1435 status = packet_send(¶meters); |
|
1436 break; |
|
1437 case eap_tlv_message_type_function_state_notification: |
|
1438 status = state_notification(¶meters); |
|
1439 break; |
|
1440 case eap_tlv_message_type_function_packet_data_crypto_keys: |
|
1441 status = packet_data_crypto_keys(¶meters); |
|
1442 break; |
|
1443 case eap_tlv_message_type_function_restart_authentication: |
|
1444 status = restart_authentication(¶meters); |
|
1445 break; |
|
1446 #if defined(USE_EAP_SIMPLE_CONFIG) |
|
1447 case eap_tlv_message_type_function_new_protected_setup_credentials: |
|
1448 status = new_protected_setup_credentials(¶meters); |
|
1449 break; |
|
1450 #endif // #if defined(USE_EAP_SIMPLE_CONFIG) |
|
1451 case eap_tlv_message_type_function_complete_get_802_11_authentication_mode: |
|
1452 status = complete_get_802_11_authentication_mode(¶meters); |
|
1453 break; |
|
1454 case eap_tlv_message_type_function_complete_remove_eap_session: |
|
1455 status = complete_remove_eap_session(¶meters); |
|
1456 break; |
|
1457 default: |
|
1458 EAP_TRACE_ERROR( |
|
1459 m_am_tools, |
|
1460 TRACE_FLAGS_DEFAULT, |
|
1461 (EAPL("ERROR: send_data(): unknown function %d.\n"), |
|
1462 function)); |
|
1463 |
|
1464 EAP_ASSERT_ANYWAY_TOOLS(m_am_tools); |
|
1465 |
|
1466 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1467 return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter); |
|
1468 }; |
|
1469 |
|
1470 if (status != eap_status_ok) |
|
1471 { |
|
1472 (void) process_error_message( |
|
1473 status, |
|
1474 function); |
|
1475 } |
|
1476 } |
|
1477 |
|
1478 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1479 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1480 } |
|
1481 |
|
1482 //-------------------------------------------------- |
|
1483 // End. |