eapol/eapol_framework/eapol_common/core/ethernet_core.cpp
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 49 %
    19 * %version: 28.1.2 %
    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 
       
   159 	if (packet_length < eapol_ethernet_header_rd_c::get_header_length())
   129 	if (packet_length < eapol_ethernet_header_rd_c::get_header_length())
   160 	{
   130 	{
   161 		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("####################################################################\n")));
   131 		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("####################################################################\n")));
   162 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   132 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   163 		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_illegal_packet_error);
   133 		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_illegal_packet_error);
   208 	}
   178 	}
   209 
   179 
   210 	if (eth_header.get_type() == eapol_ethernet_type_pae
   180 	if (eth_header.get_type() == eapol_ethernet_type_pae
   211 		|| eth_header.get_type() == eapol_ethernet_type_preauthentication)
   181 		|| eth_header.get_type() == eapol_ethernet_type_preauthentication)
   212 	{
   182 	{
   213 		eap_am_network_id_c a_receive_network_id(
   183 		eap_am_network_id_c receive_network_id(
   214 			m_am_tools,
   184 			m_am_tools,
   215 			eth_header.get_source(),
   185 			eth_header.get_source(),
   216 			eth_header.get_source_length(),
   186 			eth_header.get_source_length(),
   217 			eth_header.get_destination(),
   187 			eth_header.get_destination(),
   218 			eth_header.get_destination_length(),
   188 			eth_header.get_destination_length(),
   229 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   199 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   230 			return EAP_STATUS_RETURN(m_am_tools, eap_status_header_corrupted);
   200 			return EAP_STATUS_RETURN(m_am_tools, eap_status_header_corrupted);
   231 		}
   201 		}
   232 
   202 
   233 		status = m_eapol_core->packet_process(
   203 		status = m_eapol_core->packet_process(
   234 			&a_receive_network_id,
   204 			&receive_network_id,
   235 			&eapol,
   205 			&eapol,
   236 			packet_length-eapol_ethernet_header_rd_c::get_header_length());
   206 			packet_length-eapol_ethernet_header_rd_c::get_header_length());
   237 
   207 
   238 		EAP_GENERAL_HEADER_COPY_ERROR_PARAMETERS(packet_data, &eapol);
   208 		EAP_GENERAL_HEADER_COPY_ERROR_PARAMETERS(packet_data, &eapol);
   239 	}
   209 	}
   247 		m_am_tools,
   217 		m_am_tools,
   248 		TRACE_FLAGS_DEFAULT,
   218 		TRACE_FLAGS_DEFAULT,
   249 		(EAPL("####################################################################\n")));
   219 		(EAPL("####################################################################\n")));
   250 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   220 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   251 	return EAP_STATUS_RETURN(m_am_tools, status);
   221 	return EAP_STATUS_RETURN(m_am_tools, status);
   252 
       
   253 #endif //#if defined(EAPOL_SKIP_ETHERNET_HEADER)
       
   254 
       
   255 }
   222 }
   256 
   223 
   257 //--------------------------------------------------
   224 //--------------------------------------------------
   258 
   225 
   259 
   226 
   274 	if (send_network_id->get_is_valid_data() == false)
   241 	if (send_network_id->get_is_valid_data() == false)
   275 	{
   242 	{
   276 		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
   243 		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
   277 	}
   244 	}
   278 
   245 
   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 
       
   297 	if (header_offset < eapol_ethernet_header_wr_c::get_header_length())
   246 	if (header_offset < eapol_ethernet_header_wr_c::get_header_length())
   298 	{
   247 	{
   299 		EAP_TRACE_DEBUG(
   248 		EAP_TRACE_DEBUG(
   300 			m_am_tools,
   249 			m_am_tools,
   301 			TRACE_FLAGS_DEFAULT,
   250 			TRACE_FLAGS_DEFAULT,
   369 		data_length+eapol_ethernet_header_wr_c::get_header_length(),
   318 		data_length+eapol_ethernet_header_wr_c::get_header_length(),
   370 		buffer_length);
   319 		buffer_length);
   371 
   320 
   372 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   321 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   373 	return EAP_STATUS_RETURN(m_am_tools, status);
   322 	return EAP_STATUS_RETURN(m_am_tools, status);
   374 
       
   375 #endif //#if defined(EAPOL_SKIP_ETHERNET_HEADER)
       
   376 
       
   377 }
   323 }
   378 
   324 
   379 //--------------------------------------------------
   325 //--------------------------------------------------
   380 
   326 
   381 //
   327 //
   383 	u32_t * const MTU,
   329 	u32_t * const MTU,
   384 	u32_t * const trailer_length)
   330 	u32_t * const trailer_length)
   385 {
   331 {
   386 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
   332 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
   387 
   333 
   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 
       
   397 	const u32_t offset = m_partner->get_header_offset(MTU, trailer_length);
   334 	const u32_t offset = m_partner->get_header_offset(MTU, trailer_length);
   398 	(*MTU) -= eapol_ethernet_header_wr_c::get_header_length();
   335 	(*MTU) -= eapol_ethernet_header_wr_c::get_header_length();
   399 
   336 
   400 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   337 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
   401 	return offset+eapol_ethernet_header_wr_c::get_header_length();
   338 	return offset+eapol_ethernet_header_wr_c::get_header_length();
   402 
       
   403 #endif //#if defined(EAPOL_SKIP_ETHERNET_HEADER)
       
   404 }
   339 }
   405 
   340 
   406 //--------------------------------------------------
   341 //--------------------------------------------------
   407 
   342 
   408 //
   343 //
   510 }
   445 }
   511 
   446 
   512 //--------------------------------------------------
   447 //--------------------------------------------------
   513 
   448 
   514 //
   449 //
   515 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::read_reassociation_parameters(
   450 eap_status_e ethernet_core_c::read_reassociation_parameters(
   516 	const eap_am_network_id_c * const old_receive_network_id, ///< source includes remote address, destination includes local address.
   451 	const eap_am_network_id_c * const old_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.
   452 	const eap_am_network_id_c * const new_receive_network_id, ///< source includes remote address, destination includes local address.
   518 	const eapol_key_authentication_type_e authentication_type,
   453 	const eapol_key_authentication_type_e authentication_type,
   519 	eap_variable_data_c * const PMKID,
   454 	eap_variable_data_c * const PMKID,
   520 	const eap_variable_data_c * const received_WPA_ie,
   455 	const eap_variable_data_c * const received_WPA_ie,
   564 }
   499 }
   565 
   500 
   566 //--------------------------------------------------
   501 //--------------------------------------------------
   567 
   502 
   568 //
   503 //
   569 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::complete_reassociation(
   504 eap_status_e ethernet_core_c::complete_reassociation(
   570 	const eapol_wlan_authentication_state_e reassociation_result,
   505 	const eapol_wlan_authentication_state_e reassociation_result,
   571 	const eap_am_network_id_c * const receive_network_id,
   506 	const eap_am_network_id_c * const receive_network_id,
   572 	const eapol_key_authentication_type_e authentication_type,
   507 	const eapol_key_authentication_type_e authentication_type,
   573 	const eap_variable_data_c * const received_WPA_IE, // WLM must give only the WPA IE to EAPOL
   508 	const eap_variable_data_c * const received_WPA_IE, // WLM must give only the WPA IE to EAPOL
   574 	const eap_variable_data_c * const sent_WPA_IE,
   509 	const eap_variable_data_c * const sent_WPA_IE,
   841 	return EAP_STATUS_RETURN(m_am_tools, status);
   776 	return EAP_STATUS_RETURN(m_am_tools, status);
   842 }
   777 }
   843 
   778 
   844 //--------------------------------------------------
   779 //--------------------------------------------------
   845 
   780 
       
   781 #if defined(USE_EAPOL_KEY_STATE)
       
   782 
   846 //
   783 //
   847 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::check_pmksa_cache(
   784 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::check_pmksa_cache(
   848 	eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids,
   785 	eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids,
   849 	const eapol_key_authentication_type_e selected_eapol_key_authentication_type,
   786 	const eapol_key_authentication_type_e selected_eapol_key_authentication_type,
   850 	const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite,
   787 	const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite,
   866 
   803 
   867 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
   804 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
   868 	return EAP_STATUS_RETURN(m_am_tools, status);
   805 	return EAP_STATUS_RETURN(m_am_tools, status);
   869 }
   806 }
   870 
   807 
   871 //--------------------------------------------------
   808 #endif // #if defined(USE_EAPOL_KEY_STATE)
   872 
   809 
       
   810 //--------------------------------------------------
       
   811 
       
   812 #if defined(USE_EAPOL_KEY_STATE)
   873 /**
   813 /**
   874  * This function removes PMKSA from cache.
   814  * This function removes PMKSA from cache.
   875  * @param receive_network_id carries the MAC addresses.
   815  * @param receive_network_id carries the MAC addresses.
   876  * MAC address of Authenticator should be in source address.
   816  * MAC address of Authenticator should be in source address.
   877  * MAC address of Supplicant should be in destination address.
   817  * MAC address of Supplicant should be in destination address.
   891 
   831 
   892 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
   832 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
   893 	return EAP_STATUS_RETURN(m_am_tools, status);
   833 	return EAP_STATUS_RETURN(m_am_tools, status);
   894 }
   834 }
   895 
   835 
   896 //--------------------------------------------------
   836 #endif // #if defined(USE_EAPOL_KEY_STATE)
   897 
   837 
       
   838 //--------------------------------------------------
       
   839 
       
   840 #if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
   898 /**
   841 /**
   899  * Function creates a state for later use. This is for optimazing 4-Way Handshake.
   842  * Function creates a state for later use. This is for optimazing 4-Way Handshake.
   900  * @param receive_network_id carries the MAC addresses.
   843  * @param receive_network_id carries the MAC addresses.
   901  * MAC address of Authenticator should be in source address. MAC address of 
   844  * MAC address of Authenticator should be in source address. MAC address of 
   902  * Supplicant should be in destination address.
   845  * Supplicant should be in destination address.
   916 		authentication_type);
   859 		authentication_type);
   917 
   860 
   918 	return EAP_STATUS_RETURN(m_am_tools, status);
   861 	return EAP_STATUS_RETURN(m_am_tools, status);
   919 }
   862 }
   920 
   863 
   921 //--------------------------------------------------
   864 #endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
   922 
   865 
       
   866 //--------------------------------------------------
       
   867 
       
   868 #if defined(USE_EAPOL_KEY_STATE)
   923 /**
   869 /**
   924  * @param receive_network_id carries the MAC addresses.
   870  * @param receive_network_id carries the MAC addresses.
   925  * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   871  * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   926  * @param authenticator_RSNA_IE is RSN IE of authenticator. Authenticator sends this in Beacon or Probe message.
   872  * @param authenticator_RSNA_IE is RSN IE of authenticator. Authenticator sends this in Beacon or Probe message.
   927  * @param supplicant_RSNA_IE is RSN IE of supplicant. Supplicant sends this in (re)association request message.
   873  * @param supplicant_RSNA_IE is RSN IE of supplicant. Supplicant sends this in (re)association request message.
   952 		pre_shared_key);
   898 		pre_shared_key);
   953 
   899 
   954 	return EAP_STATUS_RETURN(m_am_tools, status);
   900 	return EAP_STATUS_RETURN(m_am_tools, status);
   955 }
   901 }
   956 
   902 
   957 //--------------------------------------------------
   903 #endif // #if defined(USE_EAPOL_KEY_STATE)
   958 
   904 
       
   905 //--------------------------------------------------
       
   906 
       
   907 #if defined(USE_EAPOL_KEY_STATE)
   959 /**
   908 /**
   960  * @param receive_network_id carries the MAC addresses.
   909  * @param receive_network_id carries the MAC addresses.
   961  * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   910  * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
   962  */
   911  */
   963 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::disassociation(
   912 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::disassociation(
   964 	const bool complete_to_lower_layer,
       
   965 	const eap_am_network_id_c * const receive_network_id
   913 	const eap_am_network_id_c * const receive_network_id
   966 	)
   914 	)
   967 {
   915 {
   968 	eap_status_e status = eap_status_process_general_error;
   916 	eap_status_e status = eap_status_process_general_error;
   969 
   917 
   970 	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
   918 	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
   971 
   919 
   972 	status = m_eapol_core->disassociation(
   920 	status = m_eapol_core->disassociation(
   973 		complete_to_lower_layer,
       
   974 		receive_network_id);
   921 		receive_network_id);
   975 
   922 
   976 	return EAP_STATUS_RETURN(m_am_tools, status);
   923 	return EAP_STATUS_RETURN(m_am_tools, status);
   977 }
   924 }
       
   925 
       
   926 #endif //#if defined(USE_EAPOL_KEY_STATE)
   978 
   927 
   979 //--------------------------------------------------
   928 //--------------------------------------------------
   980 
   929 
   981 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list)
   930 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list)
   982 {
   931 {
  1006 	return EAP_STATUS_RETURN(m_am_tools, status);
   955 	return EAP_STATUS_RETURN(m_am_tools, status);
  1007 }
   956 }
  1008 
   957 
  1009 //--------------------------------------------------
   958 //--------------------------------------------------
  1010 
   959 
  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 //--------------------------------------------------
       
  1165 // End.
   960 // End.