eapol/eapol_framework/eapol_common/core/eapol_key_state_string.cpp
branchRCL_3
changeset 9 aa67149e0134
parent 2 1c7bc153c08e
child 18 bad0cc58d154
equal deleted inserted replaced
8:66f897dce0dc 9:aa67149e0134
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 9 %
    19 * %version: 9.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
    43 }
    43 }
    44 
    44 
    45 //--------------------------------------------------
    45 //--------------------------------------------------
    46 
    46 
    47 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_state_string(
    47 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_state_string(
    48 	const eapol_key_state_e state) const
    48 	const eapol_key_state_e state)
    49 {
    49 {
    50 #if defined(USE_EAP_TRACE_STRINGS)
    50 #if defined(USE_EAP_TRACE_STRINGS)
    51 	EAP_IF_RETURN_STRING(state, eapol_key_state_none)
    51 	EAP_IF_RETURN_STRING(state, eapol_key_state_none)
    52 	else EAP_IF_RETURN_STRING(state, eapol_key_state_preauthenticated)
    52 	else EAP_IF_RETURN_STRING(state, eapol_key_state_preauthenticated)
    53 	else EAP_IF_RETURN_STRING(state, eapol_key_state_eap_authentication_running)
    53 	else EAP_IF_RETURN_STRING(state, eapol_key_state_eap_authentication_running)
    85 }
    85 }
    86 
    86 
    87 //--------------------------------------------------
    87 //--------------------------------------------------
    88 
    88 
    89 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_handshake_type_string(
    89 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_handshake_type_string(
    90 	const eapol_key_handshake_type_e handshake_type) const
    90 	const eapol_key_handshake_type_e handshake_type)
    91 {
    91 {
    92 
    92 
    93 #if defined(USE_EAP_TRACE_STRINGS)
    93 #if defined(USE_EAP_TRACE_STRINGS)
    94 	EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_none)
    94 	EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_none)
    95 	else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_4_way_handshake)
    95 	else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_4_way_handshake)
   113 }
   113 }
   114 
   114 
   115 //--------------------------------------------------
   115 //--------------------------------------------------
   116 
   116 
   117 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_authentication_type_string(
   117 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_authentication_type_string(
   118 	const eapol_key_authentication_type_e authentication_type) const
   118 	const eapol_key_authentication_type_e authentication_type)
   119 {
   119 {
   120 
   120 
   121 #if defined(USE_EAP_TRACE_STRINGS)
   121 #if defined(USE_EAP_TRACE_STRINGS)
   122 	EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_none)
   122 	EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_none)
   123 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_RSNA_EAP)
   123 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_RSNA_EAP)
   124 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_RSNA_PSK)
   124 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_RSNA_PSK)
   125 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPA_EAP)
   125 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPA_EAP)
   126 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPA_PSK)
   126 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPA_PSK)
   127 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_802_1X)
   127 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_dynamic_WEP)
   128 #if defined(EAP_USE_WPXM)
   128 #if defined(EAP_USE_WPXM)
   129 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPXM)
   129 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPXM)
   130 #endif //#if defined(EAP_USE_WPXM)
   130 #endif //#if defined(EAP_USE_WPXM)
   131 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WFA_SC)
   131 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WFA_SC)
   132 #if defined(USE_WAPI_CORE)
   132 #if defined(USE_WAPI_CORE)
   133 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WAI_PSK)
   133 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WAI_PSK)
   134 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WAI_certificate)
   134 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WAI_certificate)
   135 #endif //#if defined(USE_WAPI_CORE)
   135 #endif //#if defined(USE_WAPI_CORE)
       
   136 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_EAP_authentication_no_encryption)
       
   137 
   136 	else
   138 	else
   137 #endif // #if defined(USE_EAP_TRACE_STRINGS)
   139 #endif // #if defined(USE_EAP_TRACE_STRINGS)
   138 	{
   140 	{
   139 		EAP_UNREFERENCED_PARAMETER(authentication_type);
   141 		EAP_UNREFERENCED_PARAMETER(authentication_type);
   140 
   142 
   143 }
   145 }
   144 
   146 
   145 //--------------------------------------------------
   147 //--------------------------------------------------
   146 
   148 
   147 eap_const_string eapol_key_state_string_c::get_eapol_key_descriptor_type_string(
   149 eap_const_string eapol_key_state_string_c::get_eapol_key_descriptor_type_string(
   148 	const eapol_key_descriptor_type_e key_descriptor_type) const
   150 	const eapol_key_descriptor_type_e key_descriptor_type)
   149 {
   151 {
   150 
   152 
   151 #if defined(USE_EAP_TRACE_STRINGS)
   153 #if defined(USE_EAP_TRACE_STRINGS)
   152 	EAP_IF_RETURN_STRING(key_descriptor_type, eapol_key_descriptor_type_none)
   154 	EAP_IF_RETURN_STRING(key_descriptor_type, eapol_key_descriptor_type_none)
   153 	else EAP_IF_RETURN_STRING(key_descriptor_type, eapol_key_descriptor_type_RC4)
   155 	else EAP_IF_RETURN_STRING(key_descriptor_type, eapol_key_descriptor_type_RC4)