eapol/eapol_framework/eapol_common/core/ethernet_core.cpp
branchRCL_3
changeset 18 bad0cc58d154
parent 2 1c7bc153c08e
child 19 c74b3d9f6b9e
equal deleted inserted replaced
17:30e048a7b597 18:bad0cc58d154
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 28.1.2 %
    19 * %version: 49 %
    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 	{
   124 	{
   125 		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("####################################################################\n")));
   125 		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("####################################################################\n")));
   126 		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
   126 		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
   127 	}
   127 	}
   128 
   128 
       
   129 #if defined(EAPOL_SKIP_ETHERNET_HEADER)
       
   130 
       
   131 	{
       
   132 		eapol_header_wr_c eapol(
       
   133 			m_am_tools,
       
   134 			packet_data->get_header_buffer(packet_data->get_header_buffer_length()),
       
   135 			packet_data->get_header_buffer_length());
       
   136 		if (eapol.get_is_valid() == false)
       
   137 		{
       
   138 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
   139 			return EAP_STATUS_RETURN(m_am_tools, eap_status_header_corrupted);
       
   140 		}
       
   141 
       
   142 		status = m_eapol_core->packet_process(
       
   143 			receive_network_id,
       
   144 			&eapol,
       
   145 			packet_length);
       
   146 
       
   147 		EAP_GENERAL_HEADER_COPY_ERROR_PARAMETERS(packet_data, &eapol);
       
   148 
       
   149 		EAP_TRACE_DEBUG(
       
   150 			m_am_tools,
       
   151 			TRACE_FLAGS_DEFAULT,
       
   152 			(EAPL("####################################################################\n")));
       
   153 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
   154 		return EAP_STATUS_RETURN(m_am_tools, status);
       
   155 	}
       
   156 
       
   157 #else
       
   158 
   129 	if (packet_length < eapol_ethernet_header_rd_c::get_header_length())
   159 	if (packet_length < eapol_ethernet_header_rd_c::get_header_length())
   130 	{
   160 	{
   131 		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("####################################################################\n")));
   161 		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("####################################################################\n")));
   132 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   162 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   133 		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_illegal_packet_error);
   163 		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_illegal_packet_error);
   178 	}
   208 	}
   179 
   209 
   180 	if (eth_header.get_type() == eapol_ethernet_type_pae
   210 	if (eth_header.get_type() == eapol_ethernet_type_pae
   181 		|| eth_header.get_type() == eapol_ethernet_type_preauthentication)
   211 		|| eth_header.get_type() == eapol_ethernet_type_preauthentication)
   182 	{
   212 	{
   183 		eap_am_network_id_c receive_network_id(
   213 		eap_am_network_id_c a_receive_network_id(
   184 			m_am_tools,
   214 			m_am_tools,
   185 			eth_header.get_source(),
   215 			eth_header.get_source(),
   186 			eth_header.get_source_length(),
   216 			eth_header.get_source_length(),
   187 			eth_header.get_destination(),
   217 			eth_header.get_destination(),
   188 			eth_header.get_destination_length(),
   218 			eth_header.get_destination_length(),
   199 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   229 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   200 			return EAP_STATUS_RETURN(m_am_tools, eap_status_header_corrupted);
   230 			return EAP_STATUS_RETURN(m_am_tools, eap_status_header_corrupted);
   201 		}
   231 		}
   202 
   232 
   203 		status = m_eapol_core->packet_process(
   233 		status = m_eapol_core->packet_process(
   204 			&receive_network_id,
   234 			&a_receive_network_id,
   205 			&eapol,
   235 			&eapol,
   206 			packet_length-eapol_ethernet_header_rd_c::get_header_length());
   236 			packet_length-eapol_ethernet_header_rd_c::get_header_length());
   207 
   237 
   208 		EAP_GENERAL_HEADER_COPY_ERROR_PARAMETERS(packet_data, &eapol);
   238 		EAP_GENERAL_HEADER_COPY_ERROR_PARAMETERS(packet_data, &eapol);
   209 	}
   239 	}
   217 		m_am_tools,
   247 		m_am_tools,
   218 		TRACE_FLAGS_DEFAULT,
   248 		TRACE_FLAGS_DEFAULT,
   219 		(EAPL("####################################################################\n")));
   249 		(EAPL("####################################################################\n")));
   220 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   250 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   221 	return EAP_STATUS_RETURN(m_am_tools, status);
   251 	return EAP_STATUS_RETURN(m_am_tools, status);
       
   252 
       
   253 #endif //#if defined(EAPOL_SKIP_ETHERNET_HEADER)
       
   254 
   222 }
   255 }
   223 
   256 
   224 //--------------------------------------------------
   257 //--------------------------------------------------
   225 
   258 
   226 
   259 
   241 	if (send_network_id->get_is_valid_data() == false)
   274 	if (send_network_id->get_is_valid_data() == false)
   242 	{
   275 	{
   243 		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
   276 		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
   244 	}
   277 	}
   245 
   278 
       
   279 #if defined(EAPOL_SKIP_ETHERNET_HEADER)
       
   280 
       
   281 	{
       
   282 		sent_packet->set_is_client(m_is_client);
       
   283 
       
   284 		eap_status_e status = m_partner->packet_send(
       
   285 			send_network_id,
       
   286 			sent_packet,
       
   287 			header_offset,
       
   288 			data_length,
       
   289 			buffer_length);
       
   290 
       
   291 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
   292 		return EAP_STATUS_RETURN(m_am_tools, status);
       
   293 	}
       
   294 
       
   295 #else
       
   296 
   246 	if (header_offset < eapol_ethernet_header_wr_c::get_header_length())
   297 	if (header_offset < eapol_ethernet_header_wr_c::get_header_length())
   247 	{
   298 	{
   248 		EAP_TRACE_DEBUG(
   299 		EAP_TRACE_DEBUG(
   249 			m_am_tools,
   300 			m_am_tools,
   250 			TRACE_FLAGS_DEFAULT,
   301 			TRACE_FLAGS_DEFAULT,
   318 		data_length+eapol_ethernet_header_wr_c::get_header_length(),
   369 		data_length+eapol_ethernet_header_wr_c::get_header_length(),
   319 		buffer_length);
   370 		buffer_length);
   320 
   371 
   321 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   372 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   322 	return EAP_STATUS_RETURN(m_am_tools, status);
   373 	return EAP_STATUS_RETURN(m_am_tools, status);
       
   374 
       
   375 #endif //#if defined(EAPOL_SKIP_ETHERNET_HEADER)
       
   376 
   323 }
   377 }
   324 
   378 
   325 //--------------------------------------------------
   379 //--------------------------------------------------
   326 
   380 
   327 //
   381 //
   329 	u32_t * const MTU,
   383 	u32_t * const MTU,
   330 	u32_t * const trailer_length)
   384 	u32_t * const trailer_length)
   331 {
   385 {
   332 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
   386 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
   333 
   387 
       
   388 #if defined(EAPOL_SKIP_ETHERNET_HEADER)
       
   389 
       
   390 	const u32_t offset = m_partner->get_header_offset(MTU, trailer_length);
       
   391 
       
   392 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
   393 	return offset;
       
   394 
       
   395 #else
       
   396 
   334 	const u32_t offset = m_partner->get_header_offset(MTU, trailer_length);
   397 	const u32_t offset = m_partner->get_header_offset(MTU, trailer_length);
   335 	(*MTU) -= eapol_ethernet_header_wr_c::get_header_length();
   398 	(*MTU) -= eapol_ethernet_header_wr_c::get_header_length();
   336 
   399 
   337 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   400 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   338 	return offset+eapol_ethernet_header_wr_c::get_header_length();
   401 	return offset+eapol_ethernet_header_wr_c::get_header_length();
       
   402 
       
   403 #endif //#if defined(EAPOL_SKIP_ETHERNET_HEADER)
   339 }
   404 }
   340 
   405 
   341 //--------------------------------------------------
   406 //--------------------------------------------------
   342 
   407 
   343 //
   408 //
   445 }
   510 }
   446 
   511 
   447 //--------------------------------------------------
   512 //--------------------------------------------------
   448 
   513 
   449 //
   514 //
   450 eap_status_e ethernet_core_c::read_reassociation_parameters(
   515 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::read_reassociation_parameters(
   451 	const eap_am_network_id_c * const old_receive_network_id, ///< source includes remote address, destination includes local address.
   516 	const eap_am_network_id_c * const old_receive_network_id, ///< source includes remote address, destination includes local address.
   452 	const eap_am_network_id_c * const new_receive_network_id, ///< source includes remote address, destination includes local address.
   517 	const eap_am_network_id_c * const new_receive_network_id, ///< source includes remote address, destination includes local address.
   453 	const eapol_key_authentication_type_e authentication_type,
   518 	const eapol_key_authentication_type_e authentication_type,
   454 	eap_variable_data_c * const PMKID,
   519 	eap_variable_data_c * const PMKID,
   455 	const eap_variable_data_c * const received_WPA_ie,
   520 	const eap_variable_data_c * const received_WPA_ie,
   499 }
   564 }
   500 
   565 
   501 //--------------------------------------------------
   566 //--------------------------------------------------
   502 
   567 
   503 //
   568 //
   504 eap_status_e ethernet_core_c::complete_reassociation(
   569 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::complete_reassociation(
   505 	const eapol_wlan_authentication_state_e reassociation_result,
   570 	const eapol_wlan_authentication_state_e reassociation_result,
   506 	const eap_am_network_id_c * const receive_network_id,
   571 	const eap_am_network_id_c * const receive_network_id,
   507 	const eapol_key_authentication_type_e authentication_type,
   572 	const eapol_key_authentication_type_e authentication_type,
   508 	const eap_variable_data_c * const received_WPA_IE, // WLM must give only the WPA IE to EAPOL
   573 	const eap_variable_data_c * const received_WPA_IE, // WLM must give only the WPA IE to EAPOL
   509 	const eap_variable_data_c * const sent_WPA_IE,
   574 	const eap_variable_data_c * const sent_WPA_IE,
   776 	return EAP_STATUS_RETURN(m_am_tools, status);
   841 	return EAP_STATUS_RETURN(m_am_tools, status);
   777 }
   842 }
   778 
   843 
   779 //--------------------------------------------------
   844 //--------------------------------------------------
   780 
   845 
   781 #if defined(USE_EAPOL_KEY_STATE)
       
   782 
       
   783 //
   846 //
   784 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::check_pmksa_cache(
   847 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::check_pmksa_cache(
   785 	eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids,
   848 	eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids,
   786 	const eapol_key_authentication_type_e selected_eapol_key_authentication_type,
   849 	const eapol_key_authentication_type_e selected_eapol_key_authentication_type,
   787 	const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite,
   850 	const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite,
   803 
   866 
   804 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
   867 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
   805 	return EAP_STATUS_RETURN(m_am_tools, status);
   868 	return EAP_STATUS_RETURN(m_am_tools, status);
   806 }
   869 }
   807 
   870 
   808 #endif // #if defined(USE_EAPOL_KEY_STATE)
   871 //--------------------------------------------------
   809 
   872 
   810 //--------------------------------------------------
       
   811 
       
   812 #if defined(USE_EAPOL_KEY_STATE)
       
   813 /**
   873 /**
   814  * This function removes PMKSA from cache.
   874  * This function removes PMKSA from cache.
   815  * @param receive_network_id carries the MAC addresses.
   875  * @param receive_network_id carries the MAC addresses.
   816  * MAC address of Authenticator should be in source address.
   876  * MAC address of Authenticator should be in source address.
   817  * MAC address of Supplicant should be in destination address.
   877  * MAC address of Supplicant should be in destination address.
   831 
   891 
   832 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
   892 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
   833 	return EAP_STATUS_RETURN(m_am_tools, status);
   893 	return EAP_STATUS_RETURN(m_am_tools, status);
   834 }
   894 }
   835 
   895 
   836 #endif // #if defined(USE_EAPOL_KEY_STATE)
   896 //--------------------------------------------------
   837 
   897 
   838 //--------------------------------------------------
       
   839 
       
   840 #if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
       
   841 /**
   898 /**
   842  * Function creates a state for later use. This is for optimazing 4-Way Handshake.
   899  * Function creates a state for later use. This is for optimazing 4-Way Handshake.
   843  * @param receive_network_id carries the MAC addresses.
   900  * @param receive_network_id carries the MAC addresses.
   844  * MAC address of Authenticator should be in source address. MAC address of 
   901  * MAC address of Authenticator should be in source address. MAC address of 
   845  * Supplicant should be in destination address.
   902  * Supplicant should be in destination address.
   859 		authentication_type);
   916 		authentication_type);
   860 
   917 
   861 	return EAP_STATUS_RETURN(m_am_tools, status);
   918 	return EAP_STATUS_RETURN(m_am_tools, status);
   862 }
   919 }
   863 
   920 
   864 #endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
   921 //--------------------------------------------------
   865 
   922 
   866 //--------------------------------------------------
       
   867 
       
   868 #if defined(USE_EAPOL_KEY_STATE)
       
   869 /**
   923 /**
   870  * @param receive_network_id carries the MAC addresses.
   924  * @param receive_network_id carries the MAC addresses.
   871  * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   925  * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   872  * @param authenticator_RSNA_IE is RSN IE of authenticator. Authenticator sends this in Beacon or Probe message.
   926  * @param authenticator_RSNA_IE is RSN IE of authenticator. Authenticator sends this in Beacon or Probe message.
   873  * @param supplicant_RSNA_IE is RSN IE of supplicant. Supplicant sends this in (re)association request message.
   927  * @param supplicant_RSNA_IE is RSN IE of supplicant. Supplicant sends this in (re)association request message.
   898 		pre_shared_key);
   952 		pre_shared_key);
   899 
   953 
   900 	return EAP_STATUS_RETURN(m_am_tools, status);
   954 	return EAP_STATUS_RETURN(m_am_tools, status);
   901 }
   955 }
   902 
   956 
   903 #endif // #if defined(USE_EAPOL_KEY_STATE)
   957 //--------------------------------------------------
   904 
   958 
   905 //--------------------------------------------------
       
   906 
       
   907 #if defined(USE_EAPOL_KEY_STATE)
       
   908 /**
   959 /**
   909  * @param receive_network_id carries the MAC addresses.
   960  * @param receive_network_id carries the MAC addresses.
   910  * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   961  * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   911  */
   962  */
   912 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::disassociation(
   963 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::disassociation(
       
   964 	const bool complete_to_lower_layer,
   913 	const eap_am_network_id_c * const receive_network_id
   965 	const eap_am_network_id_c * const receive_network_id
   914 	)
   966 	)
   915 {
   967 {
   916 	eap_status_e status = eap_status_process_general_error;
   968 	eap_status_e status = eap_status_process_general_error;
   917 
   969 
   918 	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
   970 	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
   919 
   971 
   920 	status = m_eapol_core->disassociation(
   972 	status = m_eapol_core->disassociation(
       
   973 		complete_to_lower_layer,
   921 		receive_network_id);
   974 		receive_network_id);
   922 
   975 
   923 	return EAP_STATUS_RETURN(m_am_tools, status);
   976 	return EAP_STATUS_RETURN(m_am_tools, status);
   924 }
   977 }
   925 
       
   926 #endif //#if defined(USE_EAPOL_KEY_STATE)
       
   927 
   978 
   928 //--------------------------------------------------
   979 //--------------------------------------------------
   929 
   980 
   930 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list)
   981 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list)
   931 {
   982 {
   955 	return EAP_STATUS_RETURN(m_am_tools, status);
  1006 	return EAP_STATUS_RETURN(m_am_tools, status);
   956 }
  1007 }
   957 
  1008 
   958 //--------------------------------------------------
  1009 //--------------------------------------------------
   959 
  1010 
       
  1011 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::complete_check_pmksa_cache(
       
  1012 	EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids)
       
  1013 {
       
  1014 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1015 
       
  1016 	const eap_status_e status = m_partner->complete_check_pmksa_cache(
       
  1017 		bssid_sta_receive_network_ids);
       
  1018 
       
  1019 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1020 	return EAP_STATUS_RETURN(m_am_tools, status);
       
  1021 }
       
  1022 
       
  1023 //--------------------------------------------------
       
  1024 
       
  1025 #if defined(USE_EAP_SIMPLE_CONFIG)
       
  1026 
       
  1027 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::save_simple_config_session(
       
  1028 	const simple_config_state_e state,
       
  1029 	EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
       
  1030 	const eap_variable_data_c * const new_password,
       
  1031 	const simple_config_Device_Password_ID_e Device_Password_ID,
       
  1032 	const simple_config_payloads_c * const other_configuration)
       
  1033 {
       
  1034 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1035 
       
  1036 	EAP_TRACE_DEBUG(
       
  1037 		m_am_tools, 
       
  1038 		TRACE_FLAGS_DEFAULT, 
       
  1039 		(EAPL("%s: ethernet_core_c::save_simple_config_session().\n"),
       
  1040 		 (m_is_client == true) ? "client": "server"));
       
  1041 
       
  1042 	const eap_status_e status = m_partner->save_simple_config_session(
       
  1043 		state,
       
  1044 		credential_array,
       
  1045 		new_password,
       
  1046 		Device_Password_ID,
       
  1047 		other_configuration);
       
  1048 
       
  1049 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1050 	return EAP_STATUS_RETURN(m_am_tools, status);
       
  1051 }
       
  1052 
       
  1053 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
       
  1054 
       
  1055 //--------------------------------------------------
       
  1056 
       
  1057 //
       
  1058 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::set_eap_database_reference_values(
       
  1059 	const eap_variable_data_c * const reference)
       
  1060 {
       
  1061 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1062 
       
  1063 	EAP_TRACE_DEBUG(
       
  1064 		m_am_tools,
       
  1065 		TRACE_FLAGS_DEFAULT,
       
  1066 		(EAPL("ethernet_core_c::set_eap_database_reference_values()\n")));
       
  1067 
       
  1068 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: ethernet_core_c::set_eap_database_reference_values()");
       
  1069 
       
  1070 	eap_status_e status = m_eapol_core->set_eap_database_reference_values(reference);
       
  1071 
       
  1072 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1073 	return EAP_STATUS_RETURN(m_am_tools, status);
       
  1074 }
       
  1075 
       
  1076 //--------------------------------------------------
       
  1077 
       
  1078 //
       
  1079 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::get_802_11_authentication_mode(
       
  1080 	const eap_am_network_id_c * const receive_network_id,
       
  1081 	const eapol_key_authentication_type_e authentication_type,
       
  1082 	const eap_variable_data_c * const SSID,
       
  1083 	const eap_variable_data_c * const preshared_key)
       
  1084 {
       
  1085 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1086 
       
  1087 	EAP_TRACE_DEBUG(
       
  1088 		m_am_tools,
       
  1089 		TRACE_FLAGS_DEFAULT,
       
  1090 		(EAPL("ethernet_core_c::get_802_11_authentication_mode()\n")));
       
  1091 
       
  1092 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: ethernet_core_c::get_802_11_authentication_mode()");
       
  1093 
       
  1094 	eap_status_e status = m_eapol_core->get_802_11_authentication_mode(
       
  1095 		receive_network_id,
       
  1096 		authentication_type,
       
  1097 		SSID,
       
  1098 		preshared_key);
       
  1099 
       
  1100 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1101 	return EAP_STATUS_RETURN(m_am_tools, status);
       
  1102 }
       
  1103 
       
  1104 //--------------------------------------------------
       
  1105 
       
  1106 //
       
  1107 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::complete_get_802_11_authentication_mode(
       
  1108 		const eap_status_e completion_status,
       
  1109 		const eap_am_network_id_c * const receive_network_id,
       
  1110 		const eapol_key_802_11_authentication_mode_e mode)
       
  1111 {
       
  1112 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1113 
       
  1114 	EAP_TRACE_DEBUG(
       
  1115 		m_am_tools,
       
  1116 		TRACE_FLAGS_DEFAULT,
       
  1117 		(EAPL("ethernet_core_c::complete_get_802_11_authentication_mode()\n")));
       
  1118 
       
  1119 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: ethernet_core_c::complete_get_802_11_authentication_mode()");
       
  1120 
       
  1121 	eap_status_e status(eap_status_ok);
       
  1122 
       
  1123 	if (m_partner != 0)
       
  1124 	{
       
  1125 		status = m_partner->complete_get_802_11_authentication_mode(
       
  1126 			completion_status,
       
  1127 			receive_network_id,
       
  1128 			mode);
       
  1129 	}
       
  1130 
       
  1131 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1132 	return EAP_STATUS_RETURN(m_am_tools, status);
       
  1133 }
       
  1134 
       
  1135 //--------------------------------------------------
       
  1136 
       
  1137 //
       
  1138 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::complete_disassociation(
       
  1139 	const bool complete_to_lower_layer,
       
  1140 	const eap_am_network_id_c * const receive_network_id)
       
  1141 {
       
  1142 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1143 
       
  1144 	EAP_TRACE_DEBUG(
       
  1145 		m_am_tools,
       
  1146 		TRACE_FLAGS_DEFAULT,
       
  1147 		(EAPL("ethernet_core_c::complete_disassociation()\n")));
       
  1148 
       
  1149 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: ethernet_core_c::complete_disassociation()");
       
  1150 
       
  1151 	eap_status_e status(eap_status_ok);
       
  1152 
       
  1153 	if (m_partner != 0)
       
  1154 	{
       
  1155 		status = m_partner->complete_disassociation(
       
  1156 			complete_to_lower_layer,
       
  1157 			receive_network_id);
       
  1158 	}
       
  1159 
       
  1160 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
       
  1161 	return EAP_STATUS_RETURN(m_am_tools, status);
       
  1162 }
       
  1163 
       
  1164 //--------------------------------------------------
   960 // End.
  1165 // End.