eapol/eapol_framework/eapol_common/core/eap_general_settings_client_message_if.cpp
equal
deleted
inserted
replaced
14 * Description: Class creates and reads the messages used in EAP-general settings interface on the client side. |
14 * Description: Class creates and reads the messages used in EAP-general settings interface on the client side. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 11 % |
19 * %version: 14 % |
20 */ |
20 */ |
21 |
21 |
22 // This is enumeration of EAPOL source code. |
22 // This is enumeration of EAPOL source code. |
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
24 #undef EAP_FILE_NUMBER_ENUM |
24 #undef EAP_FILE_NUMBER_ENUM |
124 EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::process_message(eap_process_tlv_message_data_c * const message) |
124 EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::process_message(eap_process_tlv_message_data_c * const message) |
125 { |
125 { |
126 // Process message data composed of Attribute-Value Pairs. |
126 // Process message data composed of Attribute-Value Pairs. |
127 EAP_TRACE_DEBUG( |
127 EAP_TRACE_DEBUG( |
128 m_am_tools, |
128 m_am_tools, |
129 EAP_TRACE_FLAGS_MESSAGE_DATA, |
129 TRACE_FLAGS_DEFAULT, |
130 (EAPL("eap_general_settings_client_message_if_c::process_message(): this = 0x%08x, m_client_if=0x%08x.\n"), |
130 (EAPL("eap_general_settings_client_message_if_c::process_message(): this = 0x%08x, m_client_if=0x%08x.\n"), |
131 this, |
131 this, |
132 m_client_if)); |
132 m_client_if)); |
133 |
133 |
134 |
134 |
135 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::send_message()"); |
135 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::send_message()"); |
136 |
136 |
137 EAP_TRACE_DATA_DEBUG( |
137 EAP_TRACE_DATA_DEBUG( |
138 m_am_tools, |
138 m_am_tools, |
139 EAP_TRACE_FLAGS_MESSAGE_DATA, |
139 EAP_TRACE_FLAGS_MESSAGE_DATA, |
140 (EAPL("eap_general_settings_client_message_if_c::process_message()"), |
140 (EAPL("eap_general_settings_client_message_if_c::process_message()"), |
157 |
157 |
158 eap_status_e status(eap_status_process_general_error); |
158 eap_status_e status(eap_status_process_general_error); |
159 |
159 |
160 EAP_TRACE_DEBUG( |
160 EAP_TRACE_DEBUG( |
161 m_am_tools, |
161 m_am_tools, |
162 EAP_TRACE_FLAGS_MESSAGE_DATA, |
162 TRACE_FLAGS_DEFAULT, |
163 (EAPL("eap_general_settings_client_message_if_c::set_eap_methods(): this = 0x%08x.\n"), |
163 (EAPL("eap_general_settings_client_message_if_c::set_eap_methods(): this = 0x%08x.\n"), |
164 this)); |
164 this)); |
165 |
165 |
166 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::set_eap_methods()"); |
166 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::set_eap_methods()"); |
167 |
167 |
168 { |
168 { |
169 // Creates message data composed of Attribute-Value Pairs. |
169 // Creates message data composed of Attribute-Value Pairs. |
170 eap_process_tlv_message_data_c message(m_am_tools); |
170 eap_process_tlv_message_data_c message(m_am_tools); |
171 |
171 |
204 |
204 |
205 eap_status_e status(eap_status_process_general_error); |
205 eap_status_e status(eap_status_process_general_error); |
206 |
206 |
207 EAP_TRACE_DEBUG( |
207 EAP_TRACE_DEBUG( |
208 m_am_tools, |
208 m_am_tools, |
209 EAP_TRACE_FLAGS_MESSAGE_DATA, |
209 TRACE_FLAGS_DEFAULT, |
210 (EAPL("eap_general_settings_client_message_if_c::get_eap_methods(): this = 0x%08x.\n"), |
210 (EAPL("eap_general_settings_client_message_if_c::get_eap_methods(): this = 0x%08x.\n"), |
211 this)); |
211 this)); |
212 |
212 |
213 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::get_eap_methods()"); |
213 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::get_eap_methods()"); |
214 |
214 |
215 { |
215 { |
216 // Creates message data composed of Attribute-Value Pairs. |
216 // Creates message data composed of Attribute-Value Pairs. |
217 eap_process_tlv_message_data_c message(m_am_tools); |
217 eap_process_tlv_message_data_c message(m_am_tools); |
218 |
218 |
251 |
251 |
252 eap_status_e status(eap_status_process_general_error); |
252 eap_status_e status(eap_status_process_general_error); |
253 |
253 |
254 EAP_TRACE_DEBUG( |
254 EAP_TRACE_DEBUG( |
255 m_am_tools, |
255 m_am_tools, |
256 EAP_TRACE_FLAGS_MESSAGE_DATA, |
256 TRACE_FLAGS_DEFAULT, |
257 (EAPL("eap_general_settings_client_message_if_c::get_certificate_lists(): this = 0x%08x.\n"), |
257 (EAPL("eap_general_settings_client_message_if_c::get_certificate_lists(): this = 0x%08x.\n"), |
258 this)); |
258 this)); |
259 |
259 |
260 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::get_certificate_lists()"); |
260 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::get_certificate_lists()"); |
261 |
261 |
262 { |
262 { |
263 // Creates message data composed of Attribute-Value Pairs. |
263 // Creates message data composed of Attribute-Value Pairs. |
264 eap_process_tlv_message_data_c message(m_am_tools); |
264 eap_process_tlv_message_data_c message(m_am_tools); |
265 |
265 |
298 |
298 |
299 eap_status_e status(eap_status_process_general_error); |
299 eap_status_e status(eap_status_process_general_error); |
300 |
300 |
301 EAP_TRACE_DEBUG( |
301 EAP_TRACE_DEBUG( |
302 m_am_tools, |
302 m_am_tools, |
303 EAP_TRACE_FLAGS_MESSAGE_DATA, |
303 TRACE_FLAGS_DEFAULT, |
304 (EAPL("eap_general_settings_client_message_if_c::delete_all_eap_settings(): this = 0x%08x.\n"), |
304 (EAPL("eap_general_settings_client_message_if_c::delete_all_eap_settings(): this = 0x%08x.\n"), |
305 this)); |
305 this)); |
306 |
306 |
307 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::delete_all_eap_settings()"); |
307 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::delete_all_eap_settings()"); |
308 |
308 |
309 { |
309 { |
310 // Creates message data composed of Attribute-Value Pairs. |
310 // Creates message data composed of Attribute-Value Pairs. |
311 eap_process_tlv_message_data_c message(m_am_tools); |
311 eap_process_tlv_message_data_c message(m_am_tools); |
312 |
312 |
345 |
345 |
346 eap_status_e status(eap_status_process_general_error); |
346 eap_status_e status(eap_status_process_general_error); |
347 |
347 |
348 EAP_TRACE_DEBUG( |
348 EAP_TRACE_DEBUG( |
349 m_am_tools, |
349 m_am_tools, |
350 EAP_TRACE_FLAGS_MESSAGE_DATA, |
350 TRACE_FLAGS_DEFAULT, |
351 (EAPL("eap_general_settings_client_message_if_c::copy_all_eap_settings(): this = 0x%08x.\n"), |
351 (EAPL("eap_general_settings_client_message_if_c::copy_all_eap_settings(): this = 0x%08x.\n"), |
352 this)); |
352 this)); |
353 |
353 |
354 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::copy_all_eap_settings()"); |
354 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::copy_all_eap_settings()"); |
355 |
355 |
356 { |
356 { |
357 // Creates message data composed of Attribute-Value Pairs. |
357 // Creates message data composed of Attribute-Value Pairs. |
358 eap_process_tlv_message_data_c message(m_am_tools); |
358 eap_process_tlv_message_data_c message(m_am_tools); |
359 |
359 |
391 { |
391 { |
392 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
392 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
393 |
393 |
394 EAP_TRACE_DEBUG( |
394 EAP_TRACE_DEBUG( |
395 m_am_tools, |
395 m_am_tools, |
396 EAP_TRACE_FLAGS_MESSAGE_DATA, |
396 TRACE_FLAGS_DEFAULT, |
397 (EAPL("eap_general_settings_client_message_if_c::complete_set_eap_methods(): this = 0x%08x.\n"), |
397 (EAPL("eap_general_settings_client_message_if_c::complete_set_eap_methods(): this = 0x%08x.\n"), |
398 this)); |
398 this)); |
399 |
399 |
400 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::complete_set_eap_methods()"); |
400 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::complete_set_eap_methods()"); |
401 |
401 |
402 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
402 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
403 |
403 |
404 u32_t parameter_index(eap_message_payload_index_first_parameter); |
404 u32_t parameter_index(eap_message_payload_index_first_parameter); |
405 |
405 |
446 { |
446 { |
447 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
447 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
448 |
448 |
449 EAP_TRACE_DEBUG( |
449 EAP_TRACE_DEBUG( |
450 m_am_tools, |
450 m_am_tools, |
451 EAP_TRACE_FLAGS_MESSAGE_DATA, |
451 TRACE_FLAGS_DEFAULT, |
452 (EAPL("eap_general_settings_client_message_if_c::complete_get_eap_methods(): this = 0x%08x.\n"), |
452 (EAPL("eap_general_settings_client_message_if_c::complete_get_eap_methods(): this = 0x%08x.\n"), |
453 this)); |
453 this)); |
454 |
454 |
455 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::complete_get_eap_methods()"); |
455 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::complete_get_eap_methods()"); |
456 |
456 |
457 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
457 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
458 |
458 |
459 u32_t parameter_index(eap_message_payload_index_first_parameter); |
459 u32_t parameter_index(eap_message_payload_index_first_parameter); |
460 |
460 |
501 { |
501 { |
502 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
502 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
503 |
503 |
504 EAP_TRACE_DEBUG( |
504 EAP_TRACE_DEBUG( |
505 m_am_tools, |
505 m_am_tools, |
506 EAP_TRACE_FLAGS_MESSAGE_DATA, |
506 TRACE_FLAGS_DEFAULT, |
507 (EAPL("eap_general_settings_client_message_if_c::complete_get_certificate_lists(): this = 0x%08x.\n"), |
507 (EAPL("eap_general_settings_client_message_if_c::complete_get_certificate_lists(): this = 0x%08x.\n"), |
508 this)); |
508 this)); |
509 |
509 |
510 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::complete_get_certificate_lists()"); |
510 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::complete_get_certificate_lists()"); |
511 |
511 |
512 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
512 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
513 |
513 |
514 u32_t parameter_index(eap_message_payload_index_first_parameter); |
514 u32_t parameter_index(eap_message_payload_index_first_parameter); |
515 |
515 |
556 { |
556 { |
557 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
557 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
558 |
558 |
559 EAP_TRACE_DEBUG( |
559 EAP_TRACE_DEBUG( |
560 m_am_tools, |
560 m_am_tools, |
561 EAP_TRACE_FLAGS_MESSAGE_DATA, |
561 TRACE_FLAGS_DEFAULT, |
562 (EAPL("eap_general_settings_client_message_if_c::complete_delete_all_eap_settings(): this = 0x%08x.\n"), |
562 (EAPL("eap_general_settings_client_message_if_c::complete_delete_all_eap_settings(): this = 0x%08x.\n"), |
563 this)); |
563 this)); |
564 |
564 |
565 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::complete_delete_all_eap_settings()"); |
565 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::complete_delete_all_eap_settings()"); |
566 |
566 |
567 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
567 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
568 |
568 |
569 u32_t parameter_index(eap_message_payload_index_first_parameter); |
569 u32_t parameter_index(eap_message_payload_index_first_parameter); |
570 |
570 |
611 { |
611 { |
612 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
612 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
613 |
613 |
614 EAP_TRACE_DEBUG( |
614 EAP_TRACE_DEBUG( |
615 m_am_tools, |
615 m_am_tools, |
616 EAP_TRACE_FLAGS_MESSAGE_DATA, |
616 TRACE_FLAGS_DEFAULT, |
617 (EAPL("eap_general_settings_client_message_if_c::complete_copy_all_eap_settings(): this = 0x%08x.\n"), |
617 (EAPL("eap_general_settings_client_message_if_c::complete_copy_all_eap_settings(): this = 0x%08x.\n"), |
618 this)); |
618 this)); |
619 |
619 |
620 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::complete_copy_all_eap_settings()"); |
620 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::complete_copy_all_eap_settings()"); |
621 |
621 |
622 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
622 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
623 |
623 |
624 u32_t parameter_index(eap_message_payload_index_first_parameter); |
624 u32_t parameter_index(eap_message_payload_index_first_parameter); |
625 |
625 |
664 eap_status_e eap_general_settings_client_message_if_c::process_message_type_error( |
664 eap_status_e eap_general_settings_client_message_if_c::process_message_type_error( |
665 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
665 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters) |
666 { |
666 { |
667 EAP_TRACE_DEBUG( |
667 EAP_TRACE_DEBUG( |
668 m_am_tools, |
668 m_am_tools, |
669 EAP_TRACE_FLAGS_MESSAGE_DATA, |
669 TRACE_FLAGS_DEFAULT, |
670 (EAPL("eap_general_settings_client_message_if_c::process_message_type_error(): this = 0x%08x.\n"), |
670 (EAPL("eap_general_settings_client_message_if_c::process_message_type_error(): this = 0x%08x.\n"), |
671 this)); |
671 this)); |
672 |
672 |
673 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::process_message_type_error()"); |
673 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::process_message_type_error()"); |
674 |
674 |
675 eap_status_e status(eap_status_ok); |
675 eap_status_e status(eap_status_ok); |
676 |
676 |
677 eap_process_tlv_message_data_c message_data(m_am_tools); |
677 eap_process_tlv_message_data_c message_data(m_am_tools); |
678 |
678 |
703 { |
703 { |
704 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
704 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
705 |
705 |
706 EAP_TRACE_DEBUG( |
706 EAP_TRACE_DEBUG( |
707 m_am_tools, |
707 m_am_tools, |
708 EAP_TRACE_FLAGS_MESSAGE_DATA, |
708 TRACE_FLAGS_DEFAULT, |
709 (EAPL("eap_general_settings_client_message_if_c::send_data(): this = 0x%08x.\n"), |
709 (EAPL("eap_general_settings_client_message_if_c::send_data(): this = 0x%08x.\n"), |
710 this)); |
710 this)); |
711 |
711 |
712 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::send_data()"); |
712 EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_general_settings_client_message_if_c::send_data()"); |
713 |
713 |
714 eap_status_e status(eap_status_process_general_error); |
714 eap_status_e status(eap_status_process_general_error); |
715 |
715 |
716 // Parses message data composed of Attribute-Value Pairs. |
716 // Parses message data composed of Attribute-Value Pairs. |
717 eap_process_tlv_message_data_c message(m_am_tools); |
717 eap_process_tlv_message_data_c message(m_am_tools); |
772 if (status != eap_status_ok) |
772 if (status != eap_status_ok) |
773 { |
773 { |
774 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
774 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
775 return EAP_STATUS_RETURN(m_am_tools, status); |
775 return EAP_STATUS_RETURN(m_am_tools, status); |
776 } |
776 } |
|
777 |
|
778 EAP_TRACE_DEBUG( |
|
779 m_am_tools, |
|
780 TRACE_FLAGS_DEFAULT, |
|
781 (EAPL("eap_general_settings_client_message_if_c::send_data(): this = 0x%08x, message=%d=%s\n"), |
|
782 this, |
|
783 function, |
|
784 eap_process_tlv_message_data_c::get_function_string(function))); |
777 |
785 |
778 switch(function) |
786 switch(function) |
779 { |
787 { |
780 case eap_tlv_message_type_function_general_settings_complete_set_eap_methods: |
788 case eap_tlv_message_type_function_general_settings_complete_set_eap_methods: |
781 status = complete_set_eap_methods(¶meters); |
789 status = complete_set_eap_methods(¶meters); |