eapol/eapol_framework/eapol_common/am/common/eap_am_network_id.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: %
    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
   362 //--------------------------------------------------
   362 //--------------------------------------------------
   363 
   363 
   364 // 
   364 // 
   365 EAP_FUNC_EXPORT const u8_t * eap_am_network_id_c::get_source() const
   365 EAP_FUNC_EXPORT const u8_t * eap_am_network_id_c::get_source() const
   366 {
   366 {
   367 	if (m_data == 0
   367 	if (m_data == 0)
   368 		|| m_data->m_source.get_is_valid_data() == false)
       
   369 	{
   368 	{
   370 		return 0;
   369 		return 0;
   371 	}
   370 	}
   372 	return m_data->m_source.get_data(m_data->m_source.get_data_length());
   371 	return m_data->m_source.get_data(m_data->m_source.get_data_length());
   373 }
   372 }
   387 //--------------------------------------------------
   386 //--------------------------------------------------
   388 
   387 
   389 // 
   388 // 
   390 EAP_FUNC_EXPORT const u8_t * eap_am_network_id_c::get_destination() const
   389 EAP_FUNC_EXPORT const u8_t * eap_am_network_id_c::get_destination() const
   391 {
   390 {
   392 	if (m_data == 0
   391 	if (m_data == 0)
   393 		|| m_data->m_destination.get_is_valid_data() == false)
       
   394 	{
   392 	{
   395 		return 0;
   393 		return 0;
   396 	}
   394 	}
   397 	return m_data->m_destination.get_data(m_data->m_destination.get_data_length());
   395 	return m_data->m_destination.get_data(m_data->m_destination.get_data_length());
   398 }
   396 }
   400 //--------------------------------------------------
   398 //--------------------------------------------------
   401 
   399 
   402 // 
   400 // 
   403 EAP_FUNC_EXPORT u32_t eap_am_network_id_c::get_source_length() const
   401 EAP_FUNC_EXPORT u32_t eap_am_network_id_c::get_source_length() const
   404 {
   402 {
   405 	if (m_data == 0
   403 	if (m_data == 0)
   406 		|| m_data->m_source.get_is_valid_data() == false)
       
   407 	{
   404 	{
   408 		return 0;
   405 		return 0;
   409 	}
   406 	}
   410 	return m_data->m_source.get_data_length();
   407 	return m_data->m_source.get_data_length();
   411 }
   408 }
   413 //--------------------------------------------------
   410 //--------------------------------------------------
   414 
   411 
   415 // 
   412 // 
   416 EAP_FUNC_EXPORT u32_t eap_am_network_id_c::get_destination_length() const
   413 EAP_FUNC_EXPORT u32_t eap_am_network_id_c::get_destination_length() const
   417 {
   414 {
   418 	if (m_data == 0
   415 	if (m_data == 0)
   419 		|| m_data->m_destination.get_is_valid_data() == false)
       
   420 	{
   416 	{
   421 		return 0;
   417 		return 0;
   422 	}
   418 	}
   423 	return m_data->m_destination.get_data_length();
   419 	return m_data->m_destination.get_data_length();
   424 }
   420 }