|
1 /* |
|
2 * Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: EAP and WLAN authentication protocols. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // This is enumeration of EAPOL source code. |
|
20 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
21 #undef EAP_FILE_NUMBER_ENUM |
|
22 #define EAP_FILE_NUMBER_ENUM 31 |
|
23 #undef EAP_FILE_NUMBER_DATE |
|
24 #define EAP_FILE_NUMBER_DATE 1127594498 |
|
25 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
26 |
|
27 |
|
28 |
|
29 #include "eapol_ethernet_address.h" |
|
30 |
|
31 eap_eth_address_c::eap_eth_address_c() |
|
32 { |
|
33 } |
|
34 |
|
35 eap_eth_address_c::~eap_eth_address_c() |
|
36 { |
|
37 } |
|
38 |
|
39 u8_t * eap_eth_address_c::get_address() const |
|
40 { |
|
41 return const_cast<u8_t *>(m_address); |
|
42 } |
|
43 |
|
44 u32_t eap_eth_address_c::get_address_length() const |
|
45 { |
|
46 return sizeof(m_address); |
|
47 } |
|
48 |
|
49 void eap_eth_address_c::set_address(abs_eap_am_tools_c * const m_am_tools, u8_t * const p_address, const u32_t length) |
|
50 { |
|
51 EAP_UNREFERENCED_PARAMETER(m_am_tools); |
|
52 |
|
53 EAP_ASSERT_ALWAYS(length == EAPOL_ETHERNET_ADDRESS_LENGTH); |
|
54 |
|
55 for (u32_t ind = 0u; ind < length; ind++) |
|
56 { |
|
57 m_address[ind] = p_address[ind]; |
|
58 } |
|
59 } |
|
60 |
|
61 void eap_eth_address_c::reset_address() |
|
62 { |
|
63 for (u32_t ind = 0u; ind < EAPOL_ETHERNET_ADDRESS_LENGTH; ind++) |
|
64 { |
|
65 m_address[ind] = 0; |
|
66 } |
|
67 } |
|
68 |
|
69 //-------------------------------------------------- |
|
70 |
|
71 |
|
72 |
|
73 // End. |