equal
deleted
inserted
replaced
14 * Description: EAP and WLAN authentication protocols. |
14 * Description: EAP and WLAN authentication protocols. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 14 % |
19 * %version: % |
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 |
|
368 || m_data->m_source.get_is_valid_data() == false) |
|
369 { |
|
370 return 0; |
|
371 } |
|
372 return m_data->m_source.get_data(m_data->m_source.get_data_length()); |
|
373 } |
|
374 |
|
375 //-------------------------------------------------- |
|
376 |
|
377 // |
|
378 EAP_FUNC_EXPORT const eap_variable_data_c * eap_am_network_id_c::get_destination_id() const |
|
379 { |
367 if (m_data == 0) |
380 if (m_data == 0) |
368 { |
381 { |
369 return 0; |
382 return 0; |
370 } |
383 } |
371 return m_data->m_source.get_data(m_data->m_source.get_data_length()); |
|
372 } |
|
373 |
|
374 //-------------------------------------------------- |
|
375 |
|
376 // |
|
377 EAP_FUNC_EXPORT const eap_variable_data_c * eap_am_network_id_c::get_destination_id() const |
|
378 { |
|
379 if (m_data == 0) |
|
380 { |
|
381 return 0; |
|
382 } |
|
383 return &(m_data->m_destination); |
384 return &(m_data->m_destination); |
384 } |
385 } |
385 |
386 |
386 //-------------------------------------------------- |
387 //-------------------------------------------------- |
387 |
388 |
388 // |
389 // |
389 EAP_FUNC_EXPORT const u8_t * eap_am_network_id_c::get_destination() const |
390 EAP_FUNC_EXPORT const u8_t * eap_am_network_id_c::get_destination() const |
390 { |
391 { |
391 if (m_data == 0) |
392 if (m_data == 0 |
|
393 || m_data->m_destination.get_is_valid_data() == false) |
392 { |
394 { |
393 return 0; |
395 return 0; |
394 } |
396 } |
395 return m_data->m_destination.get_data(m_data->m_destination.get_data_length()); |
397 return m_data->m_destination.get_data(m_data->m_destination.get_data_length()); |
396 } |
398 } |
398 //-------------------------------------------------- |
400 //-------------------------------------------------- |
399 |
401 |
400 // |
402 // |
401 EAP_FUNC_EXPORT u32_t eap_am_network_id_c::get_source_length() const |
403 EAP_FUNC_EXPORT u32_t eap_am_network_id_c::get_source_length() const |
402 { |
404 { |
403 if (m_data == 0) |
405 if (m_data == 0 |
|
406 || m_data->m_source.get_is_valid_data() == false) |
404 { |
407 { |
405 return 0; |
408 return 0; |
406 } |
409 } |
407 return m_data->m_source.get_data_length(); |
410 return m_data->m_source.get_data_length(); |
408 } |
411 } |
410 //-------------------------------------------------- |
413 //-------------------------------------------------- |
411 |
414 |
412 // |
415 // |
413 EAP_FUNC_EXPORT u32_t eap_am_network_id_c::get_destination_length() const |
416 EAP_FUNC_EXPORT u32_t eap_am_network_id_c::get_destination_length() const |
414 { |
417 { |
415 if (m_data == 0) |
418 if (m_data == 0 |
|
419 || m_data->m_destination.get_is_valid_data() == false) |
416 { |
420 { |
417 return 0; |
421 return 0; |
418 } |
422 } |
419 return m_data->m_destination.get_data_length(); |
423 return m_data->m_destination.get_data_length(); |
420 } |
424 } |